Blame view

parking-module-pay/src/main/resources/mybatis/smapper/TdCCustBusinessSMapper.xml 5.52 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
116
117
  <?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.TdCCustBusinessSMapper">
    <resultMap id="BaseResultMap" type="com.zteits.pay.domain.TdCCustBusiness">
      <id column="id" jdbcType="BIGINT" property="id" />
      <result column="cust_id" jdbcType="VARCHAR" property="custId" />
      <result column="user_phone" jdbcType="VARCHAR" property="userPhone" />
      <result column="business_id" jdbcType="VARCHAR" property="businessId" />
      <result column="business_type" jdbcType="INTEGER" property="businessType" />
      <result column="business_level" jdbcType="INTEGER" property="businessLevel" />
      <result column="business_source" jdbcType="INTEGER" property="businessSource" />
      <result column="business_name" jdbcType="VARCHAR" property="businessName" />
      <result column="business_licence_number" jdbcType="VARCHAR" property="businessLicenceNumber" />
      <result column="begin_date" jdbcType="TIMESTAMP" property="beginDate" />
      <result column="end_date" jdbcType="TIMESTAMP" property="endDate" />
      <result column="legal_person_name" jdbcType="VARCHAR" property="legalPersonName" />
      <result column="operator_name" jdbcType="VARCHAR" property="operatorName" />
      <result column="contact_phone" jdbcType="VARCHAR" property="contactPhone" />
      <result column="business_address" jdbcType="VARCHAR" property="businessAddress" />
      <result column="pl_name" jdbcType="VARCHAR" property="plName" />
      <result column="business_car_number" jdbcType="VARCHAR" property="businessCarNumber" />
      <result column="remark" jdbcType="VARCHAR" property="remark" />
      <result column="examine_state" jdbcType="INTEGER" property="examineState" />
      <result column="examine_date" jdbcType="TIMESTAMP" property="examineDate" />
      <result column="examine_remark" jdbcType="VARCHAR" property="examineRemark" />
      <result column="org_id" jdbcType="BIGINT" property="orgId" />
      <result column="org_name" jdbcType="VARCHAR" property="orgName" />
      <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="modfiy_empid" jdbcType="VARCHAR" property="modfiyEmpid" />
      <result column="modfiy_date" jdbcType="TIMESTAMP" property="modfiyDate" />
    </resultMap>
    <sql id="Base_Column_List">
      id, cust_id, user_phone, business_id, business_type, business_level, business_source,
      business_name, business_licence_number, begin_date, end_date, legal_person_name,
      operator_name, contact_phone, business_address, pl_name, business_car_number, remark,
      examine_state, examine_date, examine_remark, org_id, org_name, data_state, create_empid,
      create_date, modfiy_empid, modfiy_date
    </sql>
  
    <!-- queryTdCCustBusinessForPage -->
    <select id="queryTdCCustBusinessForPage" parameterType="com.zteits.clouds.api.dto.pay.param.TdCCustBusinessRequest" resultMap="BaseResultMap">
      select
      <include refid="Base_Column_List" />
      from td_c_cust_business
      where data_state = 1
      <if test="custId != null">
        and  cust_id = #{custId,jdbcType=VARCHAR}
      </if>
      <if test="userPhone != null and userPhone !=''">
        and user_phone like concat('%',#{userPhone},'%')
      </if>
      <if test="businessId != null">
        and business_id = #{businessId,jdbcType=VARCHAR}
      </if>
      <if test="businessType != null">
        and business_type = #{businessType,jdbcType=INTEGER}
      </if>
      <if test="businessLevel != null">
        and business_level = #{businessLevel,jdbcType=INTEGER}
      </if>
      <if test="businessSource != null">
        and business_source = #{businessSource,jdbcType=INTEGER}
      </if>
      <if test="businessName != null and businessName !=''">
        and business_name like concat('%',#{businessName},'%')
      </if>
      <if test="businessLicenceNumber != null">
        and business_licence_number = #{businessLicenceNumber,jdbcType=VARCHAR}
      </if>
      <if test="beginDate != null">
        and begin_date = #{beginDate,jdbcType=TIMESTAMP}
      </if>
      <if test="endDate != null">
        and end_date = #{endDate,jdbcType=TIMESTAMP}
      </if>
      <if test="legalPersonName != null">
        and legal_person_name = #{legalPersonName,jdbcType=VARCHAR}
      </if>
      <if test="operatorName != null">
        and operator_name = #{operatorName,jdbcType=VARCHAR}
      </if>
      <if test="contactPhone != null and contactPhone !=''">
        and contact_phone like concat('%',#{contactPhone},'%')
      </if>
      <if test="businessAddress != null">
        and business_address = #{businessAddress,jdbcType=VARCHAR}
      </if>
      <if test="plName != null">
        and pl_name = #{plName,jdbcType=VARCHAR}
      </if>
      <if test="businessCarNumber != null">
        and business_car_number = #{businessCarNumber,jdbcType=VARCHAR}
      </if>
      <if test="examineState != null">
        and examine_state = #{examineState,jdbcType=INTEGER}
      </if>
      <if test="examineDate != null">
        and examine_date = #{examineDate,jdbcType=TIMESTAMP}
      </if>
      <if test="orgId != null">
        and org_id = #{orgId,jdbcType=BIGINT}
      </if>
    </select>
  
    <!-- 根据商户手机号 查询商户信息 -->
    <select id="selectByUserPhoneForBusiness" resultType="com.zteits.pay.domain.TdCCustBusiness">
      select
      <include refid="Base_Column_List"/>
      from td_c_cust_business
      where contact_phone = #{userPhone,jdbcType=VARCHAR}
      and data_state = 1
      LIMIT 0,1
    </select>
  
  </mapper>