Commit b752fd0f by xugaojun

Merge branch 'fix-02-21_group_send' of http://git.gicdev.com/haoban3.0/haoban-manage3.0

parents 813fac7b 0d7e0023
...@@ -388,29 +388,30 @@ ...@@ -388,29 +388,30 @@
and status_flag = 1 group by staff_id; and status_flag = 1 group by staff_id;
</select> </select>
<select id="listMemberStaffRel" resultType="com.gic.haoban.manage.service.entity.ext.MemberStaffRelExtDO"> <select id="listMemberStaffRel" resultType="com.gic.haoban.manage.service.entity.ext.MemberStaffRelExtDO">
select ecr.member_id as memberId, select ecr.member_id as memberId,
ecr.external_user_id as memberExternalUserId, ecr.external_user_id as memberExternalUserId,
scr.wx_user_id as staffWxUserId, scr.wx_user_id as staffWxUserId,
scr.clerk_id as staffClerkId scr.clerk_id as staffClerkId
from (select staff_id, from (select a.staff_id,
wx_user_id, b.wx_user_id,
clerk_id a.clerk_id
from tab_haoban_staff_clerk_relation from tab_haoban_staff_clerk_relation a
where clerk_id in left join tab_haoban_staff b on a.staff_id = b.staff_id
<foreach collection="clerkIdList" item="item" separator="," open="(" close=")"> where a.clerk_id in
#{item} <foreach collection="clerkIdList" item="item" separator="," open="(" close=")">
</foreach> #{item}
and status_flag = 1 </foreach>
group by staff_id, wx_user_id, clerk_id) as scr and a.status_flag = 1
left join tab_haoban_external_clerk_related as ecr on scr.staff_id = ecr.staff_id group by a.staff_id, a.wx_user_id, a.clerk_id) as scr
where ecr.status_flag = 1 left join tab_haoban_external_clerk_related as ecr on scr.staff_id = ecr.staff_id
and ecr.enterprise_id = #{enterpriseId,jdbcType=VARCHAR} where ecr.status_flag = 1
and ecr.member_id in and ecr.enterprise_id = #{enterpriseId,jdbcType=VARCHAR}
<foreach collection="memberIdList" item="item" separator="," open="(" close=")"> and ecr.member_id in
#{item} <foreach collection="memberIdList" item="item" separator="," open="(" close=")">
</foreach>; #{item}
</select> </foreach>;
</select>
<select id="listMemberStaffRelNew" resultType="com.gic.haoban.manage.service.entity.ext.MemberStaffRelExtDO"> <select id="listMemberStaffRelNew" resultType="com.gic.haoban.manage.service.entity.ext.MemberStaffRelExtDO">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment