Blame view

parking-module-pay/src/main/resources/mybatis/smapper/TdCCarBrandSMapper.xml 1.72 KB
55f68655   王彪总   新项目
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
  <?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>