Commit a034a14e by 徐高华

群满处理活码30天

parent 9e1b9339
......@@ -130,6 +130,14 @@ public class GroupChatHmServiceImpl implements GroupChatHmService {
return null;
}
this.updateLinkCount(hm.getWxEnterpriseId(), Arrays.asList(hmId));
String wxEnterpriseId = hm.getWxEnterpriseId(); ;
SecretSettingDTO secretSetting = secretSettingService.getSecretSetting(wxEnterpriseId, SecretTypeEnum.CUSTOMIZED_APP.getVal());
if (null != secretSetting && hm.getAutoCreateRoom() == 1) {
List<TabGroupChatHmRelation> chatRelation = this.groupChatHmRelationMapper.listByChatHmId(hmId);
if(CollectionUtils.isNotEmpty(chatRelation)) {
this.handleAutoCreateRoom(wxEnterpriseId, secretSetting.getSecretVal(), hm, chatRelation, null);
}
}
GroupChatHmBO bo = EntityUtil.changeEntityByJSON(GroupChatHmBO.class, hm);
return bo;
}
......@@ -192,14 +200,16 @@ public class GroupChatHmServiceImpl implements GroupChatHmService {
String configId = hm.getWxConfigId();
ServiceResponse<AddJoinWayDTO> joinResp = this.qywxChatApiService.getJoinWay(qwDTO.getDkCorpid(), secret,
configId,qwDTO.getUrlHost());
logger.info("查询群活码={}", JSON.toJSON(joinResp));
logger.info("处理群活码满-查询群活码={}", JSON.toJSON(joinResp));
if (joinResp.isSuccess()) {
AddJoinWayDTO join = joinResp.getResult();
List<String> qwChatIdList = join.getChat_id_list();
if (CollectionUtils.isNotEmpty(qwChatIdList)) {
if (qwChatIdList.size() == 1) {
logger.info("只有1个群");
if(null != thisGroupChatId) {
this.saveChatFullNotice(wxEnterpriseId, thisGroupChatId);
}
return;
}
List<Long> chatIdList = chatRelation.stream().map(dto -> dto.getGroupChatId())
......@@ -211,7 +221,9 @@ public class GroupChatHmServiceImpl implements GroupChatHmService {
List<String> qwList = RolesListUtils.differenceList(qwChatIdList, hbIdList);
if (qwChatIdList.size() == hbIdList.size() && CollectionUtils.isEmpty(qwList)) {
logger.info("群未变化");
if(null != thisGroupChatId) {
this.saveChatFullNotice(wxEnterpriseId, thisGroupChatId);
}
return;
}
// 处理要踢的
......@@ -255,7 +267,9 @@ public class GroupChatHmServiceImpl implements GroupChatHmService {
List<TabGroupChat> list = this.groupChatMapper.listByWxWxChatIdListDk(wxEnterpriseId,
qwChatIdList);
if (CollectionUtils.isEmpty(list) || list.size() != qwChatIdList.size()) {
if(null != thisGroupChatId) {
this.saveChatFullNotice(wxEnterpriseId, thisGroupChatId);
}
logger.info("查询群列表空,或数量不一致,dkList={}", qwChatIdList);
return;
}
......
......@@ -1144,7 +1144,7 @@ public class GroupChatServiceImpl implements GroupChatService {
if (null == chat || chat.getTotalCount() < offNum) {
continue;
}
if (chat.getOffTime().getTime() + 1000 * 60 * 60 * 8 < new Date().getTime()) {
if (chat.getOffTime().getTime() + 1000 * 60 * 60 * 24 * 30 < new Date().getTime()) {
logger.info("超过8小时不重试groupChatId={}", groupChatId);
continue;
}
......
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