ScrmActivityReportLogMapper.xml
2.5 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
<?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.ScrmActivityReportLogMapper">
<resultMap id="BaseResultMap" type="cn.com.glsx.entmicro.dto.activityreport.ScrmActivityReportLogDTO">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="merchant_id" jdbcType="INTEGER" property="merchantId" />
<result column="business_scenario" jdbcType="VARCHAR" property="businessScenario" />
<result column="merchant_name" jdbcType="VARCHAR" property="merchantName" />
<result column="push_time" jdbcType="TIMESTAMP" property="pushTime" />
<result column="push_type" jdbcType="INTEGER" property="pushType" />
<result column="group_chat_name" jdbcType="VARCHAR" property="groupChatName" />
<result column="park_store_name" jdbcType="VARCHAR" property="parkStoreName" />
<result column="file_url" jdbcType="VARCHAR" property="fileUrl" />
<result column="del_flag" jdbcType="TINYINT" 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" />
<result column="text" jdbcType="LONGVARCHAR" property="text" />
</resultMap>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
-->
id, merchant_id, business_scenario, merchant_name, push_time, push_type, group_chat_name, file_url,
park_store_name, del_flag, created_by, created_time, updated_by, updated_time, text
</sql>
<select id="getPage" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from scrm_activity_report_log t
where t.del_flag = 0
<if test="condition.searchName != null and condition.searchName != ''">
and concat(IFNULL(t.`group_chat_name`,''),IFNULL(t.`merchant_name`,'')) like concat('%',#{condition.searchName},'%')
</if>
<if test="condition.startTime != null">
and t.push_time <![CDATA[>=]]> #{condition.startTime}
</if>
<if test="condition.endTime != null">
and t.push_time <![CDATA[<=]]> #{condition.endTime}
</if>
<if test="condition.pushType != null">
and t.push_type = #{condition.pushType}
</if>
order by t.push_time desc
</select>
</mapper>