ScrmBatchMomentStaffMapper.xml
3.2 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
<?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.ScrmBatchMomentStaffMapper">
<resultMap id="BaseResultMap" type="cn.com.glsx.entmicro.entity.wechatcloudcontrol.batchmoment.ScrmBatchMomentStaff">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="request_key" jdbcType="VARCHAR" property="requestKey"/>
<result column="scrm_batch_moment_id" jdbcType="INTEGER" property="scrmBatchMomentId" />
<result column="moment_id" jdbcType="VARCHAR" property="momentId" />
<result column="staff_id" jdbcType="INTEGER" property="staffId" />
<result column="user_id" jdbcType="VARCHAR" property="userId" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="send_time" jdbcType="TIMESTAMP" property="sendTime" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="err_msg" jdbcType="VARCHAR" property="errMsg" />
<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" />
</resultMap>
<resultMap id="BaseResultMap1" type="cn.com.glsx.entmicro.model.response.wechatcloudcontrol.batchmoment.BatchMomentStaffRecordRpcResponse">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="request_key" jdbcType="VARCHAR" property="requestKey"/>
<result column="staff_id" jdbcType="INTEGER" property="staffId" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="send_time" jdbcType="TIMESTAMP" property="sendTime" />
<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" />
</resultMap>
<sql id="Base_Column_List">
id, request_key, scrm_batch_moment_id, moment_id, staff_id, user_id, `status`, send_time, remark, err_msg,
del_flag, created_by, created_time, updated_by, updated_time
</sql>
<select id="getStaffStatusCount"
resultType="cn.com.glsx.entmicro.model.wechatcloudcontrol.BatchMomentStaffCount">
SELECT scrm_batch_moment_id AS id ,`status`,COUNT(1) AS `count`
FROM `scrm_batch_moment_staff`
WHERE scrm_batch_moment_id IN
<foreach collection="scrmBatchMomentIds" separator="," open="(" close=")" item="id">
#{id}
</foreach>
AND del_flag=0
GROUP BY scrm_batch_moment_id,STATUS;
</select>
<select id="batchMomentStaffRecordPage" resultMap="BaseResultMap1">
SELECT <include refid="Base_Column_List"/> FROM `scrm_batch_moment_staff`
WHERE scrm_batch_moment_id = #{condition.id} AND del_flag=0 order by send_time desc
</select>
</mapper>