Blame view

parking-module-pay/src/main/resources/mybatis/smapper/TdClCustomerInfoSMapper.xml 3.46 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
  <?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.TdClCustomerInfoSMapper" >
      <resultMap id="BaseResultMap" type="com.zteits.pay.domain.TdClCustomerManagement">
          <id column="id" jdbcType="BIGINT" property="id" />
          <result column="customer_no" jdbcType="VARCHAR" property="customerNo" />
          <result column="customer_name" jdbcType="VARCHAR" property="customerName" />
          <result column="customer_type" jdbcType="INTEGER" property="customerType" />
          <result column="car_no" jdbcType="VARCHAR" property="carNo" />
          <result column="id_card_no" jdbcType="VARCHAR" property="idCardNo" />
          <result column="phone_no" jdbcType="VARCHAR" property="phoneNo" />
          <result column="email" jdbcType="VARCHAR" property="email" />
          <result column="remark" jdbcType="VARCHAR" property="remark" />
          <result column="customer_sex" jdbcType="INTEGER" property="customerSex" />
          <result column="card_type" jdbcType="INTEGER" property="cardType" />
          <result column="address" jdbcType="VARCHAR" property="address" />
          <result column="data_status" jdbcType="INTEGER" property="dataStatus" />
          <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
          <result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
          <result column="prov_id" jdbcType="BIGINT" property="provId" />
          <result column="city_id" jdbcType="BIGINT" property="cityId" />
          <result column="country_id" jdbcType="BIGINT" property="countryId" />
          <result column="prov_name" jdbcType="VARCHAR" property="provName" />
          <result column="city_name" jdbcType="VARCHAR" property="cityName" />
          <result column="country_name" jdbcType="VARCHAR" property="countryName" />
          <result column="org_id" jdbcType="BIGINT" property="orgId" />
          <result column="org_name" jdbcType="VARCHAR" property="orgName" />
      </resultMap>
  
      <!-- 根据车牌号码获取绑定的客户信息 -->
      <select id="queryCustomerInfo"
              parameterType="com.zteits.clouds.api.dto.pay.param.CustomerInfoRequest" resultMap="BaseResultMap">
          SELECT
          c.id, c.customer_no, c.customer_name, c.customer_type, c.car_no, c.id_card_no, c.phone_no, c.email,
          c.remark, c.customer_sex, c.card_type, c.address, c.data_status, c.create_date, c.update_date,
          c.prov_id, c.city_id, c.country_id, c.prov_name, c.city_name, c.country_name, c.org_id, c.org_name
          FROM
          td_cl_customer_management c
              LEFT JOIN td_cl_customer_car_info m ON c.customer_no = m.customer_no
          WHERE
              c.data_status = 1
          <if test="customerNo != null and customerNo !=''" >
              and c.customer_no = #{customerNo}
          </if>
          <if test="customerName != null and customerName !=''" >
              and c.customer_name = #{customerName}
          </if>
          <if test="phoneNo != null and phoneNo !=''" >
              and c.phone_no like CONCAT('%',#{phoneNo},'%')
          </if>
          <if test="customerType != null and customerType !=''" >
              and c.customer_type = #{customerType}
          </if>
          <if test="carNo != null and carNo !=''" >
              and m.car_no like CONCAT('%',#{carNo},'%')
          </if>
          <if test="orgId != null and orgId !=''" >
              and c.org_id = #{orgId}
          </if>
  
      </select>
  </mapper>