WelfareGroupMapper.xml
2.7 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
<?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.WelfareGroupMapper">
<resultMap id="BaseResultMap" type="cn.com.glsx.entmicro.entity.wechatcloudcontrol.custgroup.WelfareGroup">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="staff_id" jdbcType="INTEGER" property="staffId"/>
<result column="group_chat_id" jdbcType="VARCHAR" property="groupChatId"/>
<result column="group_chat_name" jdbcType="VARCHAR" property="groupChatName"/>
<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="INTEGER" property="delFlag"/>
<result column="affiliation_uuid" jdbcType="INTEGER" property="affiliationUuid"/>
</resultMap>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
-->
id, staff_id, group_chat_id, group_chat_name, created_by, created_time, updated_by,
updated_time, del_flag,affiliation_uuid
</sql>
<update id="updateRoomName">
update scrm_game_task_welfare_group set group_chat_name=#{data.roomName} where group_chat_id=#{data.roomChatId}
</update>
<select id="selectGroupCountByDate" resultType="java.lang.Integer">
select count(1) from scrm_game_task_welfare_group
where staff_id=#{id} and affiliation_uuid=#{uuid}
<if test="searchDate != null ">
and TO_DAYS(created_time) = TO_DAYS(#{searchDate})
</if>
</select>
<select id="selectWelfareGroupDetail"
resultType="cn.com.glsx.entmicro.model.response.wechatcloudcontrol.custgroup.StaffWelfareGroupDetailRpcResponse">
select id, staff_id as staffId, group_chat_id as groupChatId, group_chat_name as groupChatName,
affiliation_uuid as affiliationUuid, nick_name as nickName,created_time as createdTime
from scrm_game_task_welfare_group
where del_flag = 0
<if test="request.uuid != null and request.uuid != ''">
and affiliation_uuid = #{request.uuid}
</if>
<if test="request.staffId != null">
and staff_id = #{request.staffId}
</if>
<if test="request.queryFlag != null and request.queryFlag == true ">
and TO_DAYS(created_time) = TO_DAYS(NOW())
</if>
</select>
</mapper>