Commit e0ef9836 by 王祖波

获取活码sql

parent 1a2447b1
......@@ -38,6 +38,7 @@ public interface GroupChatHmRelationMapper {
*/
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) ;
......
......@@ -77,4 +77,6 @@ public interface GroupChatMapper {
public List<GroupChatDTO> listChangeOwner() ;
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 {
public List<TabGroupChatUser> listAllChatUser(@Param("wxEnterpriseId") String wxEnterpriseId,
@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);
/**
......@@ -77,4 +80,6 @@ public interface GroupChatUserMapper {
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> getByUnionId(@Param("enterpriseId")String enterpriseId, @Param("unionid")String unionid);
}
\ No newline at end of file
......@@ -65,7 +65,7 @@ public class GroupChatActivityShareApiServiceImpl implements GroupChatActivitySh
@Override
public ServiceResponse<Void> shareGroupChatInviteMQ(String param) {
GroupChatActivityBaseContext chatActivityContext = JSONObject.parseObject(param, GroupChatActivityBaseContext.class);
groupChatActivityInviteLogService.groupChatInvite(chatActivityContext);
// groupChatActivityInviteLogService.groupChatInvite(chatActivityContext);
return ServiceResponse.success();
}
}
......@@ -91,6 +91,16 @@
from tab_haoban_group_chat_hm_relation where group_chat_id = #{groupChatId} and delete_flag = 0
</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 chat_hm_id chatHmId, COUNT(1) usableChatCount FROM `tab_haoban_group_chat_hm_relation` relation
......
......@@ -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>
<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>
\ No newline at end of file
......@@ -209,6 +209,15 @@
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 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 <include refid="Base_Column_List" /> from tab_haoban_group_chat_user where user_id = #{externalUserid}
and wx_enterprise_id = #{wxEnterpriseId} and enterprise_id = #{enterpriseId}
......@@ -321,4 +330,9 @@
and member_id = #{memberId} and status_flag = 1 and delete_flag = 0 order by create_time desc
</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>
\ 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