MassTemplateMapper.xml
2.1 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
<?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.MassTemplateMapper">
<resultMap id="BaseResultMap" type="cn.com.glsx.entmicro.entity.mass.MassTemplate">
<!--
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="merchant_id" jdbcType="INTEGER" property="merchantId" />
<result column="title" jdbcType="VARCHAR" property="title" />
<result column="content" jdbcType="VARCHAR" property="content" />
</resultMap>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
-->
id, created_by, created_time, updated_by, updated_time, del_flag, merchant_id, title,
content
</sql>
<resultMap extends="BaseResultMap" id="apiResponse" type="cn.com.glsx.entmicro.model.response.MassTemplateApiResponse">
<result column="del_flag" jdbcType="INTEGER" property="delFlag" />
</resultMap>
<select id="selectCreatedNameList" resultMap="BaseResultMap">
SELECT id,created_by FROM `scrm_mass_template` WHERE merchant_id=#{merchantId} GROUP BY created_by
</select>
<select id="selectMassTemplatePage" resultMap="apiResponse">
SELECT id,created_by,created_time,updated_by,updated_time,del_flag,merchant_id,title,content
FROM scrm_mass_template
WHERE
merchant_id = #{condition.merchantId}
<if test="condition.createdBy!=null">
and created_by=#{condition.createdBy}
</if>
<if test="condition.title!=null and condition.title!=''">
and title like CONCAT('%',#{condition.title},'%')
</if>
order by updated_time DESC
</select>
</mapper>