Commit 41b57c04 by 徐高华

log

parent 15ad233c
...@@ -260,6 +260,7 @@ public class GroupChatServiceImpl implements GroupChatService { ...@@ -260,6 +260,7 @@ public class GroupChatServiceImpl implements GroupChatService {
// 处理群通知 // 处理群通知
@Override @Override
public void handChatNotice(String params) { public void handChatNotice(String params) {
logger.info("企微群定时,企微通知");
List<Integer> typeList = Arrays.asList(1, 2, 3); List<Integer> typeList = Arrays.asList(1, 2, 3);
Date endTime = new Date(); Date endTime = new Date();
Date startTime = DateUtil.addNumForMinute(endTime, -30); Date startTime = DateUtil.addNumForMinute(endTime, -30);
...@@ -292,11 +293,12 @@ public class GroupChatServiceImpl implements GroupChatService { ...@@ -292,11 +293,12 @@ public class GroupChatServiceImpl implements GroupChatService {
@Override @Override
public void initGroupChatForTimer(String params) { public void initGroupChatForTimer(String params) {
logger.info("企微群定时,初始化"); logger.info("企微群定时,初始化");
String key = "initGroupChatForTimer"; String key = "initGroupChatForTimer";
try { try {
Object o = RedisUtil.getCache(key); Object o = RedisUtil.getCache(key);
if (null != o) { if (null != o) {
logger.info("有缓存,进行中");
return; return;
} }
RedisUtil.setCache(key, "1"); RedisUtil.setCache(key, "1");
...@@ -359,11 +361,12 @@ public class GroupChatServiceImpl implements GroupChatService { ...@@ -359,11 +361,12 @@ public class GroupChatServiceImpl implements GroupChatService {
@Override @Override
public void initHaobaonGroupChat(String params) { public void initHaobaonGroupChat(String params) {
logger.info("企微群定时,整个企业初始化");
String key = "initHaobaonGroupChat"; String key = "initHaobaonGroupChat";
try { try {
Object o = RedisUtil.getCache(key); Object o = RedisUtil.getCache(key);
if (null != o) { if (null != o) {
logger.info("企业群初始化进行中"); logger.info("有缓存,进行中");
return; return;
} }
RedisUtil.setCache(key, "1"); RedisUtil.setCache(key, "1");
...@@ -401,6 +404,7 @@ public class GroupChatServiceImpl implements GroupChatService { ...@@ -401,6 +404,7 @@ public class GroupChatServiceImpl implements GroupChatService {
// 群主离职列表 // 群主离职列表
public void ownerDimission() { public void ownerDimission() {
logger.info("企微群定时,离职群主群状态更新");
List<GroupChatOwnerDTO> dimissionOwnerList = this.groupChatOwnerMapper.dimissionOwnerList(); List<GroupChatOwnerDTO> dimissionOwnerList = this.groupChatOwnerMapper.dimissionOwnerList();
for (GroupChatOwnerDTO dto : dimissionOwnerList) { for (GroupChatOwnerDTO dto : dimissionOwnerList) {
try { try {
...@@ -464,7 +468,7 @@ public class GroupChatServiceImpl implements GroupChatService { ...@@ -464,7 +468,7 @@ public class GroupChatServiceImpl implements GroupChatService {
// 同步群列表 // 同步群列表
private void syncGroupChatList(WxEnterpriseQwDTO qwDTO, List<String> userIdList, String cursor, private void syncGroupChatList(WxEnterpriseQwDTO qwDTO, List<String> userIdList, String cursor,
boolean syncDetailFlag) { boolean syncDetailFlag) {
logger.info("qwDTO={},idlist={},cursor={}", JSON.toJSONString(qwDTO), JSON.toJSONString(userIdList), cursor); logger.info("同步群列表={},idlist={},cursor={}", JSON.toJSONString(qwDTO), JSON.toJSONString(userIdList), cursor);
ServiceResponse<GroupChatListDTO> resp = this.qywxChatApiService.groupchatList3th(qwDTO.getDkCorpid(), ServiceResponse<GroupChatListDTO> resp = this.qywxChatApiService.groupchatList3th(qwDTO.getDkCorpid(),
config.getWxSuiteid(), userIdList, limit, cursor); config.getWxSuiteid(), userIdList, limit, cursor);
if (!resp.isSuccess()) { if (!resp.isSuccess()) {
...@@ -494,7 +498,7 @@ public class GroupChatServiceImpl implements GroupChatService { ...@@ -494,7 +498,7 @@ public class GroupChatServiceImpl implements GroupChatService {
Long groupChatId = null; Long groupChatId = null;
if (null != groupChat) { if (null != groupChat) {
groupChatId = groupChat.getGroupChatId(); groupChatId = groupChat.getGroupChatId();
logger.info("更新群状态,wxchatid={},groupChatId={},新老状态={}", wxChatId, groupChatId, chatStatus, logger.info("更新群状态,wxchatid={},groupChatId={},新老状态={}-{}", wxChatId, groupChatId, chatStatus,
groupChat.getChatStatus()); groupChat.getChatStatus());
if (groupChat.getChatStatus() != chatStatus) { if (groupChat.getChatStatus() != chatStatus) {
this.groupChatMapper.updateChatStatus(groupChatId, chatStatus); this.groupChatMapper.updateChatStatus(groupChatId, chatStatus);
...@@ -981,11 +985,12 @@ public class GroupChatServiceImpl implements GroupChatService { ...@@ -981,11 +985,12 @@ public class GroupChatServiceImpl implements GroupChatService {
@Override @Override
public void handleHmChatFull(String params) { public void handleHmChatFull(String params) {
logger.info("企微群定时,群满");
List<Integer> typeList = Arrays.asList(4); List<Integer> typeList = Arrays.asList(4);
Date endTime = new Date(); Date endTime = new Date();
Date startTime = DateUtil.addNumForMinute(endTime, -30); Date startTime = DateUtil.addNumForMinute(endTime, -30);
List<TabChatNotice> list = this.chatNoticeMapper.listAll(typeList, startTime, endTime); List<TabChatNotice> list = this.chatNoticeMapper.listAll(typeList, startTime, endTime);
logger.info("开始群加满处理活码定时,count={}", list.size()); logger.info("群满处理活码,count={}", list.size());
if (CollectionUtils.isEmpty(list)) { if (CollectionUtils.isEmpty(list)) {
return; return;
} }
...@@ -999,8 +1004,8 @@ public class GroupChatServiceImpl implements GroupChatService { ...@@ -999,8 +1004,8 @@ public class GroupChatServiceImpl implements GroupChatService {
if (null == chat || chat.getHmAddStatus() == 1 || null == chat.getOffTime()) { if (null == chat || chat.getHmAddStatus() == 1 || null == chat.getOffTime()) {
continue; continue;
} }
if (chat.getOffTime().getTime() + 1000 * 60 * 60 * 24 < new Date().getTime()) { if (chat.getOffTime().getTime() + 1000 * 60 * 60 * 8 < new Date().getTime()) {
logger.info("超过一天不再重试groupChatId={}", groupChatId); logger.info("超过8小时不重试groupChatId={}", groupChatId);
continue; continue;
} }
this.groupChatHmService.handleChatOff(wxEnterpriseId, groupChatId); this.groupChatHmService.handleChatOff(wxEnterpriseId, groupChatId);
......
...@@ -96,7 +96,7 @@ public class GroupChatApiServiceImpl implements GroupChatApiService { ...@@ -96,7 +96,7 @@ public class GroupChatApiServiceImpl implements GroupChatApiService {
if (needClerkReltaion) { if (needClerkReltaion) {
List<String> staffIdList = dtoList.stream().filter(dto -> StringUtils.isNotBlank(dto.getStaffId())) List<String> staffIdList = dtoList.stream().filter(dto -> StringUtils.isNotBlank(dto.getStaffId()))
.map(dto -> dto.getStaffId()).collect(Collectors.toList()); .map(dto -> dto.getStaffId()).collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(staffIdList)) { if (CollectionUtils.isNotEmpty(staffIdList)) {
List<String> relationIdList = this.staffClerkRelationService List<String> relationIdList = this.staffClerkRelationService
.listRelationsStaffId(new HashSet<>(staffIdList)); .listRelationsStaffId(new HashSet<>(staffIdList));
dtoList.forEach(one -> { dtoList.forEach(one -> {
...@@ -131,7 +131,7 @@ public class GroupChatApiServiceImpl implements GroupChatApiService { ...@@ -131,7 +131,7 @@ public class GroupChatApiServiceImpl implements GroupChatApiService {
} }
List<String> staffIdList = new ArrayList<>(staffIdSet); List<String> staffIdList = new ArrayList<>(staffIdSet);
Map<String, TabHaobanStaff> map = new HashMap<>(); Map<String, TabHaobanStaff> map = new HashMap<>();
if(CollectionUtils.isNotEmpty(staffIdList)) { if (CollectionUtils.isNotEmpty(staffIdList)) {
List<TabHaobanStaff> staffList = this.staffService.listNoStatusByStaffIds(wxEnterpriseId, staffIdList); List<TabHaobanStaff> staffList = this.staffService.listNoStatusByStaffIds(wxEnterpriseId, staffIdList);
if (CollectionUtils.isNotEmpty(staffList)) { if (CollectionUtils.isNotEmpty(staffList)) {
map = staffList.stream().collect(Collectors.toMap(TabHaobanStaff::getStaffId, o -> o, (k1, k2) -> k2)); map = staffList.stream().collect(Collectors.toMap(TabHaobanStaff::getStaffId, o -> o, (k1, k2) -> k2));
......
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