Blame view

parking-module-order/src/main/resources/mybatis/mapper/smapper/VipCardAuthPersonBjxcSMapper.xml 6.37 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
  <?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.order.mapper.smapper.VipCardAuthPersonBjxcSMapper">
    <resultMap id="BaseResultMap" type="com.zteits.order.domain.VipCardAuthPersonBjxc">
      <id column="id" jdbcType="BIGINT" property="id" />
      <result column="name" jdbcType="VARCHAR" property="name" />
      <result column="id_no" jdbcType="VARCHAR" property="idNo" />
      <result column="phone_num" jdbcType="VARCHAR" property="phoneNum" />
      <result column="pl_no" jdbcType="VARCHAR" property="plNo" />
      <result column="pl_name" jdbcType="VARCHAR" property="plName" />
      <result column="vip_card_no" jdbcType="VARCHAR" property="vipCardNo" />
      <result column="car_number_color" jdbcType="VARCHAR" property="carNumberColor" />
      <result column="car_number" jdbcType="VARCHAR" property="carNumber" />
      <result column="address" jdbcType="VARCHAR" property="address" />
      <result column="price" jdbcType="BIGINT" property="price" />
      <result column="eff_time" jdbcType="TIMESTAMP" property="effTime" />
      <result column="exp_time" jdbcType="TIMESTAMP" property="expTime" />
      <result column="order_id" jdbcType="VARCHAR" property="orderId" />
      <result column="cust_id" jdbcType="VARCHAR" property="custId" />
      <result column="invoice_state" jdbcType="INTEGER" property="invoiceState" />
      <result column="invoice_id" jdbcType="BIGINT" property="invoiceId" />
      <result column="buy_state" jdbcType="INTEGER" property="buyState" />
      <result column="data_state" jdbcType="INTEGER" property="dataState" />
      <result column="create_empid" jdbcType="VARCHAR" property="createEmpid" />
      <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
      <result column="create_name" jdbcType="VARCHAR" property="createName" />
      <result column="modfiy_empid" jdbcType="VARCHAR" property="modfiyEmpid" />
      <result column="modfiy_date" jdbcType="TIMESTAMP" property="modfiyDate" />
      <result column="modfiy_emp_name" jdbcType="VARCHAR" property="modfiyEmpName" />
      <result column="invoicce_tiime" jdbcType="TIMESTAMP" property="invoicceTiime" />
      <result column="invoice_apply_time" jdbcType="TIMESTAMP" property="invoiceApplyTime" />
      <result column="examine_state" jdbcType="INTEGER" property="examineState" />
      <result column="examine_date" jdbcType="TIMESTAMP" property="examineDate" />
      <result column="picture_path" jdbcType="VARCHAR" property="picturePath" />
      <result column="examine_remart" jdbcType="VARCHAR" property="examineRemart" />
    </resultMap>
    <sql id="Base_Column_List">
      id, name, id_no, phone_num, pl_no, pl_name, vip_card_no, car_number_color, car_number,
      address, price, eff_time, exp_time, order_id, cust_id, invoice_state, invoice_id,
      buy_state, vip_auth_type, data_state, create_empid, create_date, create_name, modfiy_empid,
      modfiy_date, modfiy_emp_name, invoicce_tiime, invoice_apply_time, examine_state,
      examine_date, picture_path, examine_remart
    </sql>
    <sql id="Example_Where_Clause">
      <where>
        <foreach collection="oredCriteria" item="criteria" separator="or">
          <if test="criteria.valid">
            <trim prefix="(" prefixOverrides="and" suffix=")">
              <foreach collection="criteria.criteria" item="criterion">
                <choose>
                  <when test="criterion.noValue">
                    and ${criterion.condition}
                  </when>
                  <when test="criterion.singleValue">
                    and ${criterion.condition} #{item.criterion.value}
                  </when>
                  <when test="criterion.betweenValue">
                    and ${criterion.condition} #{item.criterion.value} and #{item.criterion.secondValue}
                  </when>
                  <when test="criterion.listValue">
                    and ${criterion.condition}
                    <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                      #{item.listItem}
                    </foreach>
                  </when>
                </choose>
              </foreach>
            </trim>
          </if>
        </foreach>
      </where>
    </sql>
  
    <!-- 批量插入地磁信息-->
    <insert id="batchInsertVIPPersonBjxcInfo">
        insert into vip_card_auth_person_bjxc (name, id_no, phone_num,
        pl_no, pl_name, vip_card_no,
        car_number_color, car_number, address,
        price, eff_time, exp_time,
        order_id, cust_id, invoice_state,
        invoice_id, buy_state, data_state, vip_auth_type,
        create_empid, create_date, create_name,
        modfiy_empid, modfiy_date, modfiy_emp_name,
        invoicce_tiime, invoice_apply_time, examine_state, examine_date, picture_path, examine_remart)
        values
        <foreach collection="vipCardAuthPersonBjxcList" index="index" item="item" separator="," open="" close="">
          (#{item.name,jdbcType=VARCHAR}, #{item.idNo,jdbcType=VARCHAR}, #{item.phoneNum,jdbcType=VARCHAR},
          #{item.plNo,jdbcType=VARCHAR}, #{item.plName,jdbcType=VARCHAR}, #{item.vipCardNo,jdbcType=VARCHAR},
          #{item.carNumberColor,jdbcType=VARCHAR}, #{item.carNumber,jdbcType=VARCHAR}, #{item.address,jdbcType=VARCHAR},
          #{item.price,jdbcType=BIGINT}, #{item.effTime,jdbcType=TIMESTAMP}, #{item.expTime,jdbcType=TIMESTAMP},
          #{item.orderId,jdbcType=VARCHAR}, #{item.custId,jdbcType=VARCHAR}, #{item.invoiceState,jdbcType=INTEGER},
          #{item.invoiceId,jdbcType=BIGINT}, #{item.buyState,jdbcType=INTEGER}, #{item.dataState,jdbcType=INTEGER}, #{item.vipAuthType,jdbcType=INTEGER},
          #{item.createEmpid,jdbcType=VARCHAR}, #{item.createDate,jdbcType=TIMESTAMP}, #{item.createName,jdbcType=VARCHAR},
          #{item.modfiyEmpid,jdbcType=VARCHAR}, #{item.modfiyDate,jdbcType=TIMESTAMP}, #{item.modfiyEmpName,jdbcType=VARCHAR},
          #{item.invoicceTiime,jdbcType=TIMESTAMP}, #{item.invoiceApplyTime,jdbcType=TIMESTAMP},
          #{item.examineState,jdbcType=INTEGER}, #{item.examineDate,jdbcType=TIMESTAMP}, #{item.picturePath,jdbcType=VARCHAR},
          #{item.examineRemart,jdbcType=VARCHAR})
        </foreach>
  
    </insert>
  
    <select id="queryPersonBjxcByCondition"
            resultMap="BaseResultMap">
      SELECT
      <include refid="Base_Column_List"/>
      from vip_card_auth_person_bjxc
      <where>
        data_state =1
        <if test="plNo != null">
          pl_no = #{plNo,jdbcType=VARCHAR},
        </if>
      </where>
    </select>
  
  </mapper>