Commit 2dfa2f4d by 徐高华

群主群数量

parent d6f0472b
...@@ -87,7 +87,7 @@ public class GroupChatDataServiceImpl implements GroupChatDataService { ...@@ -87,7 +87,7 @@ public class GroupChatDataServiceImpl implements GroupChatDataService {
this.getDataFormQw(item.getWxEnterpriseId()); this.getDataFormQw(item.getWxEnterpriseId());
} catch (Exception e) { } catch (Exception e) {
logger.info("统计异常,wxeid={}", item.getWxEnterpriseId()); logger.info("统计异常,wxeid={}", item.getWxEnterpriseId());
e.printStackTrace(); logger.info("异常",e);
} }
} }
} else { } else {
......
...@@ -130,7 +130,7 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService { ...@@ -130,7 +130,7 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
"com.gic.haoban.manage.api.service.chat.GroupChatPlanApiService", "doPlanTimer"); "com.gic.haoban.manage.api.service.chat.GroupChatPlanApiService", "doPlanTimer");
} catch (Exception e) { } catch (Exception e) {
logger.error("发送MQ异常"); logger.error("发送MQ异常");
e.printStackTrace(); logger.info("异常",e);
} }
} }
...@@ -141,7 +141,7 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService { ...@@ -141,7 +141,7 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
"com.gic.haoban.manage.api.service.chat.GroupChatPlanApiService", "doPlanSendInfoTimer"); "com.gic.haoban.manage.api.service.chat.GroupChatPlanApiService", "doPlanSendInfoTimer");
} catch (Exception e) { } catch (Exception e) {
logger.error("发送MQ异常"); logger.error("发送MQ异常");
e.printStackTrace(); logger.info("异常",e);
} }
} }
...@@ -454,7 +454,7 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService { ...@@ -454,7 +454,7 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
try { try {
this.doPlanSendInfo(ownerLogId); this.doPlanSendInfo(ownerLogId);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); logger.info("异常",e);
} }
} }
} }
......
...@@ -142,8 +142,7 @@ public class GroupChatServiceImpl implements GroupChatService { ...@@ -142,8 +142,7 @@ public class GroupChatServiceImpl implements GroupChatService {
mqClient.sendCommonMessage("haobanChatMQ", params, mqClient.sendCommonMessage("haobanChatMQ", params,
"com.gic.haoban.manage.api.service.chat.GroupChatApiService", "refreshChatInfoFromMQ"); "com.gic.haoban.manage.api.service.chat.GroupChatApiService", "refreshChatInfoFromMQ");
} catch (Exception e) { } catch (Exception e) {
logger.error("发送MQ异常"); logger.info("异常",e);
e.printStackTrace();
} }
} }
...@@ -153,8 +152,7 @@ public class GroupChatServiceImpl implements GroupChatService { ...@@ -153,8 +152,7 @@ public class GroupChatServiceImpl implements GroupChatService {
mqClient.sendCommonMessage("haobanChatMQ", params, mqClient.sendCommonMessage("haobanChatMQ", params,
"com.gic.haoban.manage.api.service.chat.GroupChatApiService", "refreshChatInfoFromMQ"); "com.gic.haoban.manage.api.service.chat.GroupChatApiService", "refreshChatInfoFromMQ");
} catch (Exception e) { } catch (Exception e) {
logger.error("发送MQ异常"); logger.info("异常",e);
e.printStackTrace();
} }
} }
...@@ -330,11 +328,11 @@ public class GroupChatServiceImpl implements GroupChatService { ...@@ -330,11 +328,11 @@ public class GroupChatServiceImpl implements GroupChatService {
this.updateGroupChatDetail(qwDTO, groupChatId, true); this.updateGroupChatDetail(qwDTO, groupChatId, true);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); logger.info("异常",e);
} }
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); logger.info("异常",e);
} finally { } finally {
RedisUtil.delCache(key); RedisUtil.delCache(key);
} }
...@@ -361,7 +359,7 @@ public class GroupChatServiceImpl implements GroupChatService { ...@@ -361,7 +359,7 @@ public class GroupChatServiceImpl implements GroupChatService {
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(wxEnterpriseId); WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(wxEnterpriseId);
this.updateGroupChatDetail(qwDTO, groupChatId, true); this.updateGroupChatDetail(qwDTO, groupChatId, true);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); logger.info("异常",e);
} }
} }
} }
...@@ -373,11 +371,11 @@ public class GroupChatServiceImpl implements GroupChatService { ...@@ -373,11 +371,11 @@ public class GroupChatServiceImpl implements GroupChatService {
String staffId = item.getStaffId(); String staffId = item.getStaffId();
this.updateWxChatIdDk(wxEnterpriseId, staffId); this.updateWxChatIdDk(wxEnterpriseId, staffId);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); logger.info("异常",e);
} }
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); logger.info("异常",e);
} finally { } finally {
RedisUtil.delCache(key); RedisUtil.delCache(key);
} }
...@@ -450,12 +448,12 @@ public class GroupChatServiceImpl implements GroupChatService { ...@@ -450,12 +448,12 @@ public class GroupChatServiceImpl implements GroupChatService {
} catch (Exception e) { } catch (Exception e) {
logger.info("初始化异常,wxEid={}", init.getWxEnterpriseId()); logger.info("初始化异常,wxEid={}", init.getWxEnterpriseId());
this.groupChatInitMapper.update(init.getWxEnterpriseId(), 4); this.groupChatInitMapper.update(init.getWxEnterpriseId(), 4);
e.printStackTrace(); logger.info("异常",e);
} }
} }
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); logger.info("异常",e);
} finally { } finally {
RedisUtil.delCache(key); RedisUtil.delCache(key);
} }
...@@ -481,14 +479,14 @@ public class GroupChatServiceImpl implements GroupChatService { ...@@ -481,14 +479,14 @@ public class GroupChatServiceImpl implements GroupChatService {
logger.info("群主离职,群状态处理={}", JSON.toJSONString(dto)); logger.info("群主离职,群状态处理={}", JSON.toJSONString(dto));
this.dimissionOwner(dto.getWxEnterpriseId(), dto.getWxUserId(), dto.getWxOpenUserId()); this.dimissionOwner(dto.getWxEnterpriseId(), dto.getWxUserId(), dto.getWxOpenUserId());
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); logger.info("异常",e);
} }
} }
try { try {
logger.info("转移群的状态"); logger.info("转移群的状态");
this.updateChatStatusTimer(); this.updateChatStatusTimer();
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); logger.info("异常",e);
} }
} }
...@@ -616,7 +614,7 @@ public class GroupChatServiceImpl implements GroupChatService { ...@@ -616,7 +614,7 @@ public class GroupChatServiceImpl implements GroupChatService {
} }
RedisUtil.unlock(lockKey); RedisUtil.unlock(lockKey);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); logger.info("异常",e);
} }
} }
if (syncDetailFlag) { if (syncDetailFlag) {
...@@ -678,16 +676,17 @@ public class GroupChatServiceImpl implements GroupChatService { ...@@ -678,16 +676,17 @@ public class GroupChatServiceImpl implements GroupChatService {
chat.setStaffId(staff.getStaffId()); chat.setStaffId(staff.getStaffId());
// 判断是否更新群主 // 判断是否更新群主
this.saveOwnerHistory(wxEnterpriseId, groupChatId, newStaffId, oldStaffId); this.saveOwnerHistory(wxEnterpriseId, groupChatId, newStaffId, oldStaffId);
if(null != oldStaffId && oldStaffId.equals(newStaffId)) {
chat.setOriginalStaffId(chat.getOriginalStaffId());
}else {
chat.setOriginalStaffId(oldStaffId); chat.setOriginalStaffId(oldStaffId);
this.groupChatMapper.update(chat);
if (StringUtils.isBlank(chat.getWxChatIdDk())) {
//this.updateWxChatIdDk(wxEnterpriseId, staff.getStaffId());
} }
this.groupChatMapper.update(chat);
this.saveOwner(wxEnterpriseId, staff.getStaffId()); this.saveOwner(wxEnterpriseId, staff.getStaffId());
RedisUtil.unlock(lockKey); RedisUtil.unlock(lockKey);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); logger.info("异常",e);
} }
if (!syncMember) { if (!syncMember) {
logger.info("不同步群成员"); logger.info("不同步群成员");
...@@ -781,7 +780,7 @@ public class GroupChatServiceImpl implements GroupChatService { ...@@ -781,7 +780,7 @@ public class GroupChatServiceImpl implements GroupChatService {
this.updateData(groupChatId, totalCount, totalMemberCount, addMemberCount, addCount, quitCount, this.updateData(groupChatId, totalCount, totalMemberCount, addMemberCount, addCount, quitCount,
quitMemberCount); quitMemberCount);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); logger.info("异常",e);
} finally { } finally {
RedisUtil.unlock(lockKeyDetail); RedisUtil.unlock(lockKeyDetail);
} }
...@@ -1186,7 +1185,7 @@ public class GroupChatServiceImpl implements GroupChatService { ...@@ -1186,7 +1185,7 @@ public class GroupChatServiceImpl implements GroupChatService {
} }
this.groupChatHmService.handleChatOff(wxEnterpriseId, groupChatId); this.groupChatHmService.handleChatOff(wxEnterpriseId, groupChatId);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); logger.info("异常",e);
} }
} }
} }
......
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