|
@@ -808,16 +808,16 @@ public class CoreServiceImpl implements CoreService {
|
|
|
}
|
|
|
}
|
|
|
int remainingDaysInCurrentMonth = DateUtil.getRemainingDaysInCurrentMonth();
|
|
|
- int remainingCount;
|
|
|
+ Integer remainingCount;
|
|
|
List<String> sendOpenIds = new ArrayList<>();
|
|
|
if (remainingDaysInCurrentMonth <= 4) {
|
|
|
remainingCount = articleUseGroupMapper.selectRemainingCountByGzhId(planAccount.getGhId(), remainingDaysInCurrentMonth);
|
|
|
- List<String> remainingCountOpenIds = articleUseGroupMapper.selectOpenIdsByRemainingCount(planAccount.getGhId(), remainingCount);
|
|
|
+ List<String> remainingCountOpenIds = articleUseGroupMapper.selectOpenIdsByRemainingCount(planAccount.getGhId(), remainingDaysInCurrentMonth);
|
|
|
sendOpenIds.addAll(remainingCountOpenIds);
|
|
|
} else {
|
|
|
remainingCount = articleUseGroupMapper.selectRemainingCountByGzhId(planAccount.getGhId(), null);
|
|
|
}
|
|
|
- if (remainingDaysInCurrentMonth > 0 && remainingCount / remainingDaysInCurrentMonth > 0) {
|
|
|
+ if (remainingDaysInCurrentMonth > 0 && remainingCount != null && remainingCount / remainingDaysInCurrentMonth > 0) {
|
|
|
List<String> needSendOpenIds = articleUseGroupMapper.selectOpenIds(planAccount.getGhId(), remainingCount / remainingDaysInCurrentMonth);
|
|
|
sendOpenIds.addAll(needSendOpenIds);
|
|
|
}
|