|
@@ -117,12 +117,16 @@ public class WeComHistoryDataJob {
|
|
|
for (Corp corp : corps) {
|
|
|
selectGroupMsgList(startTime, endTime, corp.getId(), null);
|
|
|
}
|
|
|
+ boolean isAllSend = true;
|
|
|
for (Corp corp : corps) {
|
|
|
long notSentCount = newSelectAlertHistoryMessage(startTime, endTime + TimeConstant.HOUR, corp.getId(), corp.getName());
|
|
|
- if (notSentCount == 0) {
|
|
|
- redisTemplate.opsForValue().set(START_TIME_KEY, endTime, 1, TimeUnit.DAYS);
|
|
|
+ if (notSentCount > 0) {
|
|
|
+ isAllSend = false;
|
|
|
}
|
|
|
}
|
|
|
+ if (isAllSend) {
|
|
|
+ redisTemplate.opsForValue().set(START_TIME_KEY, endTime, 1, TimeUnit.DAYS);
|
|
|
+ }
|
|
|
return ReturnT.SUCCESS;
|
|
|
}
|
|
|
|