Commit e0ef9836 by 王祖波

获取活码sql

parent 1a2447b1
...@@ -37,7 +37,8 @@ public interface GroupChatHmRelationMapper { ...@@ -37,7 +37,8 @@ public interface GroupChatHmRelationMapper {
* @throws * @throws
*/ */
public List<Long> listChatHmId(@Param("groupChatId") Long groupChatId); public List<Long> listChatHmId(@Param("groupChatId") Long groupChatId);
public List<TabGroupChatHmRelation> listChatHmByGroupChatIds(@Param("groupChatIds") List<Long> groupChatIds);
public List<GroupChatHmRelationBO> getHmValidChatCount(@Param("hmList") List<Long> hmList) ; public List<GroupChatHmRelationBO> getHmValidChatCount(@Param("hmList") List<Long> hmList) ;
......
...@@ -77,4 +77,6 @@ public interface GroupChatMapper { ...@@ -77,4 +77,6 @@ public interface GroupChatMapper {
public List<GroupChatDTO> listChangeOwner() ; public List<GroupChatDTO> listChangeOwner() ;
List<String> listOpenGroupChatDK(@Param("enterpriseId")String enterpriseId, @Param("staffId") String staffId); List<String> listOpenGroupChatDK(@Param("enterpriseId")String enterpriseId, @Param("staffId") String staffId);
List<TabGroupChat> listByStaffIds(@Param("enterpriseId")String enterpriseId, @Param("staffIds") List<String> staffId);
} }
\ No newline at end of file
...@@ -40,6 +40,9 @@ public interface GroupChatUserMapper { ...@@ -40,6 +40,9 @@ public interface GroupChatUserMapper {
public List<TabGroupChatUser> listAllChatUser(@Param("wxEnterpriseId") String wxEnterpriseId, public List<TabGroupChatUser> listAllChatUser(@Param("wxEnterpriseId") String wxEnterpriseId,
@Param("groupChatId") Long groupChatId); @Param("groupChatId") Long groupChatId);
public List<TabGroupChatUser> listByUserId(@Param("enterpriseId") String enterpriseId,
@Param("userId") String userId, @Param("statusFlag") Integer statusFlag);
public List<GroupChatUserDTO> listPage(GroupChatUserSearchQDTO qdto); public List<GroupChatUserDTO> listPage(GroupChatUserSearchQDTO qdto);
/** /**
...@@ -77,4 +80,6 @@ public interface GroupChatUserMapper { ...@@ -77,4 +80,6 @@ public interface GroupChatUserMapper {
List<UserQuitBO> listQuitNum(@Param("wxEnterpriseId") String wxEnterpriseId ,@Param("start") Date start ,@Param("end") Date end) ; List<UserQuitBO> listQuitNum(@Param("wxEnterpriseId") String wxEnterpriseId ,@Param("start") Date start ,@Param("end") Date end) ;
List<TabGroupChatUser> getByMember(@Param("enterpriseId")String enterpriseId, @Param("memberId")String memberId); List<TabGroupChatUser> getByMember(@Param("enterpriseId")String enterpriseId, @Param("memberId")String memberId);
List<TabGroupChatUser> getByUnionId(@Param("enterpriseId")String enterpriseId, @Param("unionid")String unionid);
} }
\ No newline at end of file
...@@ -65,7 +65,7 @@ public class GroupChatActivityShareApiServiceImpl implements GroupChatActivitySh ...@@ -65,7 +65,7 @@ public class GroupChatActivityShareApiServiceImpl implements GroupChatActivitySh
@Override @Override
public ServiceResponse<Void> shareGroupChatInviteMQ(String param) { public ServiceResponse<Void> shareGroupChatInviteMQ(String param) {
GroupChatActivityBaseContext chatActivityContext = JSONObject.parseObject(param, GroupChatActivityBaseContext.class); GroupChatActivityBaseContext chatActivityContext = JSONObject.parseObject(param, GroupChatActivityBaseContext.class);
groupChatActivityInviteLogService.groupChatInvite(chatActivityContext); // groupChatActivityInviteLogService.groupChatInvite(chatActivityContext);
return ServiceResponse.success(); return ServiceResponse.success();
} }
} }
...@@ -90,6 +90,16 @@ ...@@ -90,6 +90,16 @@
distinct(chat_hm_id) distinct(chat_hm_id)
from tab_haoban_group_chat_hm_relation where group_chat_id = #{groupChatId} and delete_flag = 0 from tab_haoban_group_chat_hm_relation where group_chat_id = #{groupChatId} and delete_flag = 0
</select> </select>
<select id="listChatHmByGroupChatIds" resultMap="result-map-tabHaobanGroupChatHmRelation">
select
<include refid="Base_Column_List" />
from tab_haoban_group_chat_hm_relation where group_chat_id in
<foreach collection="groupChatIds" open="(" close=")" item="item" separator=",">
#{item}
</foreach>
and delete_flag = 0 and status_flag = 1
</select>
<select id="getHmValidChatCount" resultType="com.gic.haoban.manage.service.pojo.bo.chat.GroupChatHmRelationBO"> <select id="getHmValidChatCount" resultType="com.gic.haoban.manage.service.pojo.bo.chat.GroupChatHmRelationBO">
......
...@@ -369,4 +369,14 @@ ...@@ -369,4 +369,14 @@
select wx_chat_id from tab_haoban_group_chat where enterprise_id=#{enterpriseId} and staff_id = #{staffId} and delete_flag=0 and chat_status != 4 and wx_chat_id_dk is not null select wx_chat_id from tab_haoban_group_chat where enterprise_id=#{enterpriseId} and staff_id = #{staffId} and delete_flag=0 and chat_status != 4 and wx_chat_id_dk is not null
</select> </select>
<select id="listByStaffIds" resultMap="result-map-tabHaobanGroupChat">
select
<include refid="Base_Column_List" />
from tab_haoban_group_chat where enterprise_id=#{enterpriseId} and delete_flag=0 and chat_status != 4
and staff_id in
<foreach collection="staffIds" open="(" close=")" item="item" separator=",">
#{item}
</foreach>
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -208,7 +208,16 @@ ...@@ -208,7 +208,16 @@
<select id="listAllChatUser" resultMap="result-map-tabHaobanGroupChatUser"> <select id="listAllChatUser" resultMap="result-map-tabHaobanGroupChatUser">
select <include refid="Base_Column_List" /> from tab_haoban_group_chat_user where group_chat_id = #{groupChatId} and wx_enterprise_id = #{wxEnterpriseId} and status_flag = 1 and delete_flag = 0 select <include refid="Base_Column_List" /> from tab_haoban_group_chat_user where group_chat_id = #{groupChatId} and wx_enterprise_id = #{wxEnterpriseId} and status_flag = 1 and delete_flag = 0
</select> </select>
<select id="listByUserId" resultMap="result-map-tabHaobanGroupChatUser">
select <include refid="Base_Column_List" /> from tab_haoban_group_chat_user
where enterprise_id = #{enterpriseId} and user_id = #{userId}
<if test="statusFlag != null ">
and status_flag = #{statusFlag}
</if>
and delete_flag = 0
</select>
<select id="listByExternalUseridForMatch" resultMap="result-map-tabHaobanGroupChatUser"> <select id="listByExternalUseridForMatch" resultMap="result-map-tabHaobanGroupChatUser">
select <include refid="Base_Column_List" /> from tab_haoban_group_chat_user where user_id = #{externalUserid} select <include refid="Base_Column_List" /> from tab_haoban_group_chat_user where user_id = #{externalUserid}
and wx_enterprise_id = #{wxEnterpriseId} and enterprise_id = #{enterpriseId} and wx_enterprise_id = #{wxEnterpriseId} and enterprise_id = #{enterpriseId}
...@@ -321,4 +330,9 @@ ...@@ -321,4 +330,9 @@
and member_id = #{memberId} and status_flag = 1 and delete_flag = 0 order by create_time desc and member_id = #{memberId} and status_flag = 1 and delete_flag = 0 order by create_time desc
</select> </select>
<select id="getByUnionId" resultMap="result-map-tabHaobanGroupChatUser">
select <include refid="Base_Column_List"/> from tab_haoban_group_chat_user where enterprise_id = #{enterpriseId}
and unionid = #{unionid} and status_flag = 1 and delete_flag = 0 order by create_time desc
</select>
</mapper> </mapper>
\ No newline at end of file
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