ScrmBatchMomentMapper.xml
4.21 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?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.ScrmBatchMomentMapper">
<resultMap id="BaseResultMap" type="cn.com.glsx.entmicro.entity.wechatcloudcontrol.batchmoment.ScrmBatchMoment">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="INTEGER" property="id"/>
<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"/>
<result column="del_flag" jdbcType="TINYINT" property="delFlag"/>
<result column="moment_name" jdbcType="VARCHAR" property="momentName"/>
<result column="uuid" jdbcType="VARCHAR" property="uuid"/>
<result column="send_type" jdbcType="INTEGER" property="sendType"/>
<result column="send_time" jdbcType="TIMESTAMP" property="sendTime"/>
<result column="send_status" jdbcType="INTEGER" property="sendStatus"/>
<result column="status" jdbcType="INTEGER" property="status"/>
<result column="err_msg" jdbcType="VARCHAR" property="errMsg"/>
<result column="merchant_id" jdbcType="INTEGER" property="merchantId"/>
<result column="merchant_name" jdbcType="VARCHAR" property="merchantName"/>
</resultMap>
<resultMap id="BaseResultMap1" type="cn.com.glsx.entmicro.model.response.wechatcloudcontrol.batchmoment.BatchMomentRpcResponse">
<id column="id" jdbcType="INTEGER" property="id"/>
<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"/>
<result column="del_flag" jdbcType="TINYINT" property="delFlag"/>
<result column="moment_name" jdbcType="VARCHAR" property="momentName"/>
<result column="uuid" jdbcType="VARCHAR" property="uuid"/>
<result column="send_type" jdbcType="INTEGER" property="sendType"/>
<result column="send_time" jdbcType="TIMESTAMP" property="sendTime"/>
<result column="send_status" jdbcType="INTEGER" property="sendStatus"/>
<result column="status" jdbcType="INTEGER" property="status"/>
<result column="err_msg" jdbcType="VARCHAR" property="errMsg"/>
<result column="merchant_id" jdbcType="INTEGER" property="merchantId"/>
<result column="merchant_name" jdbcType="VARCHAR" property="merchantName"/>
<result column="customerType" jdbcType="VARCHAR" property="merchantName"/>
</resultMap>
<sql id="Base_Column_List">
id, created_by, created_time, updated_by, updated_time, del_flag, moment_name, uuid,
send_type, send_time, send_status, `status`, err_msg, merchant_id, merchant_name
</sql>
<select id="batchMomentConditionPage" resultMap="BaseResultMap1">
select
<include refid="Base_Column_List"/>
from scrm_batch_moment
<where>
del_flag=0
<if test="condition != null">
<if test="condition.sendType != null">
and send_type = #{condition.sendType}
</if>
<if test="condition.taskName !=null and condition.taskName != ''">
and moment_name like CONCAT('%',#{condition.taskName},'%')
</if>
<if test="condition.merchantName !=null and condition.merchantName != ''">
and merchant_name like CONCAT('%',#{condition.merchantName},'%')
</if>
<if test="condition.startTime != null">
and send_time <![CDATA[ >=]]> #{condition.startTime}
</if>
<if test="condition.endTime != null">
and send_time <![CDATA[ <=]]> #{condition.endTime}
</if>
</if>
</where>
order by created_time desc
</select>
</mapper>