Blame view

parking-module-bill/src/main/resources/mybatis/smapper/TVipCardLogsSMapper.xml 3.19 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
  <?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.bill.mapper.smapper.TVipCardLogsSMapper">
    <resultMap id="BaseResultMap" type="com.zteits.bill.domain.TVipCardLogs">
      <id column="id" jdbcType="BIGINT" property="id" />
      <result column="cust_id" jdbcType="VARCHAR" property="custId" />
      <result column="cust_card_no" jdbcType="VARCHAR" property="custCardNo" />
      <result column="card_no" jdbcType="VARCHAR" property="cardNo" />
      <result column="car_number" jdbcType="VARCHAR" property="carNumber" />
      <result column="pl_no" jdbcType="VARCHAR" property="plNo" />
      <result column="busi_type" jdbcType="INTEGER" property="busiType" />
      <result column="num" jdbcType="INTEGER" property="num" />
      <result column="card_act_amount" jdbcType="BIGINT" property="cardActAmount" />
      <result column="discount_amount" jdbcType="BIGINT" property="discountAmount" />
      <result column="eff_date" jdbcType="TIMESTAMP" property="effDate" />
      <result column="exp_date" jdbcType="TIMESTAMP" property="expDate" />
      <result column="remark" jdbcType="VARCHAR" property="remark" />
      <result column="data_state" jdbcType="INTEGER" property="dataState" />
      <result column="create_empid" jdbcType="VARCHAR" property="createEmpid" />
      <result column="create_name" jdbcType="VARCHAR" property="createName" />
      <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
      <result column="modify_empid" jdbcType="VARCHAR" property="modifyEmpid" />
      <result column="modify_name" jdbcType="VARCHAR" property="modifyName" />
      <result column="modify_date" jdbcType="TIMESTAMP" property="modifyDate" />
    </resultMap>
  
    <sql id="Base_Column_List">
      id, cust_id, cust_card_no, card_no, car_number, pl_no, busi_type, num, card_act_amount, 
      discount_amount, eff_date, exp_date, remark, data_state, create_empid, create_name, 
      create_date, modify_empid, modify_name, modify_date
    </sql>
  
    <!-- 查询会员卡记录list -->
    <select id="queryVipCardLogsList" parameterType="com.zteits.clouds.api.dto.bill.vipcard.param.TVipCardLogsRequest" resultMap="BaseResultMap">
      select 
      <include refid="Base_Column_List" />
      from t_vip_card_logs
      where 1=1
      <if test="custId != null and custId != '' ">
        and  cust_id = #{custId,jdbcType=VARCHAR}
      </if>
      <if test="custCardNos != null and custCardNos.size > 0">
        and cust_card_no in
        <foreach collection="custCardNos" open="(" close=")" item="custCardNo" separator=",">
          #{custCardNo}
        </foreach>
      </if>
      <if test="cardNo != null and cardNo != '' ">
        and  card_no = #{cardNo,jdbcType=VARCHAR}
      </if>
      <if test="carNumber != null and carNumber != '' ">
        and  car_number = #{carNumber,jdbcType=VARCHAR}
      </if>
      <if test="plNo != null and plNo != '' ">
        and  pl_no = #{plNo,jdbcType=VARCHAR}
      </if>
      <if test="busiTypeList != null and busiTypeList.size > 0">
        and busi_type in
        <foreach collection="busiTypeList" open="(" close=")" item="busiType" separator=",">
          #{busiType}
        </foreach>
      </if>
      order by create_date
    </select>
  
  </mapper>