MoveCarCodeBindMapper.xml
2.54 KB
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
<?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="cn.com.glsx.entmicro.mapper.MoveCarCodeBindMapper">
<resultMap id="BaseResultMap" type="cn.com.glsx.entmicro.entity.rescue.MoveCarCodeBind">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="merchant_id" jdbcType="INTEGER" property="merchantId" />
<result column="user_phone" jdbcType="VARCHAR" property="userPhone" />
<result column="owner_phone" jdbcType="VARCHAR" property="ownerPhone" />
<result column="car_number" jdbcType="VARCHAR" property="carNumber" />
<result column="owner_remark" jdbcType="VARCHAR" property="ownerRemark" />
<result column="code_id" jdbcType="VARCHAR" property="codeId" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="del_flag" jdbcType="INTEGER" property="delFlag" />
<result column="created_by" jdbcType="INTEGER" property="createdBy" />
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
<result column="updated_by" jdbcType="INTEGER" property="updatedBy" />
<result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime" />
</resultMap>
<resultMap id="MoveCarCodeViewRpcResponseMap" type="cn.com.glsx.entmicro.model.response.subscribe.MoveCarCodeViewRpcResponse">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="owner_phone" jdbcType="VARCHAR" property="ownerPhone" />
<result column="code_id" jdbcType="VARCHAR" property="codeId" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
</resultMap>
<sql id="Base_Column_List">
id, merchant_id, user_phone, owner_phone, car_number, owner_remark, code_id,code, del_flag,
created_by, created_time, updated_by, updated_time
</sql>
<select id="selectMoveCarCodeViewPageByMerchantId" resultMap="MoveCarCodeViewRpcResponseMap">
select id,owner_phone,code_id,code,created_time
from scrm_move_car_code_bind smccb
where del_flag = 0 and merchant_id = #{merchantId}
<if test="bindState != null">
<if test="bindState == 0">
and owner_phone is null
</if>
<if test="bindState == 1">
and owner_phone is not null
</if>
</if>
<if test="bindPhone != null and bindPhone != ''">
and owner_phone = #{bindPhone}
</if>
group by smccb.id
</select>
</mapper>