|
@@ -149,12 +149,13 @@ public class InspectionItemPlanServiceImpl extends BaseServiceImpl<Long, Inspect
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public List<InspectionItemPlan> pushNotice() {
|
|
|
- List<InspectionItemPlan> startPlans = inspectionItemPlanDao.getStartPlan(new Date());
|
|
|
+ Date nowDate = new Date();
|
|
|
+ Date startTime = DateUtil.getFirstDayOfMonth(nowDate);
|
|
|
+ Date endTime = DateUtil.getLastTimeWithDay(DateUtil.getLastDayOfMonth(nowDate));
|
|
|
+ List<InspectionItemPlan> startPlans = inspectionItemPlanDao.getStartPlan(startTime,endTime);
|
|
|
Set<Integer> userIds = startPlans.stream().map(InspectionItemPlan::getUserId).collect(Collectors.toSet());
|
|
|
List<Long> ids = startPlans.stream().map(InspectionItemPlan::getId).collect(Collectors.toList());
|
|
|
|
|
|
- inspectionItemPlanDao.updatePushedStatus(ids);
|
|
|
-
|
|
|
//发送推送信息
|
|
|
Map<Integer, String> userMap = new HashMap<>();
|
|
|
for (Integer userId : userIds) {
|