TdCCarBrandSMapper.xml
1.72 KB
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.zteits.pay.mapper.smapper.TdCCarBrandSMapper" >
<resultMap id="BaseResultMap" type="com.zteits.pay.domain.TdCCarBrand" >
<id column="id" property="id" jdbcType="BIGINT" />
<result column="car_brand_id" property="carBrandId" jdbcType="INTEGER" />
<result column="car_brand_name" property="carBrandName" jdbcType="VARCHAR" />
<result column="car_brand_image" property="carBrandImage" jdbcType="VARCHAR" />
<result column="firstLetter" property="firstletter" jdbcType="VARCHAR" />
<result column="data_state" property="dataState" jdbcType="INTEGER" />
<result column="create_empid" property="createEmpid" jdbcType="VARCHAR" />
<result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
<result column="modify_empid" property="modifyEmpid" jdbcType="VARCHAR" />
<result column="modify_date" property="modifyDate" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Base_Column_List" >
id, car_brand_id, car_brand_name, car_brand_image, firstLetter, data_state, create_empid,
create_date, modify_empid, modify_date
</sql>
<select id="selectCarBrandForPage" resultMap="BaseResultMap" parameterType="com.zteits.pay.domain.TdCCarBrand" >
select
<include refid="Base_Column_List" />
from td_c_car_brand
where 1=1
<choose>
<when test="tdCCarBrand.dataState != null">
and data_state = #{tdCCarBrand.dataState,jdbcType=INTEGER}
</when>
<otherwise>
and data_status =1
</otherwise>
</choose>
</select>
</mapper>