WeCommunityNewGroupMapper.xml
2.54 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
74
<?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="com.linkwechat.wecom.mapper.WeCommunityNewGroupMapper">
<sql id="selectSql">
SELECT new_group_id,
emple_code_name,
group_code_id,
create_by,
create_time,
update_by,
update_time,
del_flag,
activity_scene,
welcome_msg,
qr_code,
is_join_confirm_friends,
media_id,
join_friend_nums
FROM we_community_new_group
</sql>
<update id="batchRemoveWeCommunityNewGroupIds">
update we_community_new_group set
del_flag = 1
where new_group_id in
<foreach collection="ids" item="id" index="index"
separator="," open="(" close=")">
#{id}
</foreach>
</update>
<select id="selectWeCommunityNewGroupList"
resultType="com.linkwechat.wecom.domain.vo.WeCommunityNewGroupVo">
<include refid="selectSql"/>
<where>
del_flag = 0
<if test="empleCodeName!=null and empleCodeName!=''">
AND emple_code_name LIKE CONCAT("%",#{empleCodeName},"%")
</if>
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
AND date_format(create_time,'%y%m%d') >= date_format(#{beginTime},'%y%m%d')
</if>
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
AND date_format(create_time,'%y%m%d') <= date_format(#{endTime},'%y%m%d')
</if>
<if test="createBy!=null and createBy!=''">
AND create_by LIKE CONCAT("%",#{createBy},"%")
</if>
</where>
</select>
<select id="selectWeCommunityNewGroupById"
resultType="com.linkwechat.wecom.domain.vo.WeCommunityNewGroupVo">
<include refid="selectSql"/>
<where>
new_group_id =#{newGroupId}
</where>
</select>
<select id="selectWeCommunityNewGroupByIds" resultType="com.linkwechat.wecom.domain.vo.WeCommunityNewGroupVo">
<include refid="selectSql"/>
<where>
new_group_id in
<foreach collection="ids" item="id" index="index"
separator="," open="(" close=")">
#{id}
</foreach>
</where>
</select>
</mapper>