|
@@ -162,10 +162,8 @@ public class TimingTask {
|
|
|
if (isDev) {
|
|
|
return;
|
|
|
}
|
|
|
- LocalDateTime now = LocalDateTime.now();
|
|
|
LocalDate localDate = LocalDate.now();
|
|
|
DateTimeFormatter dt = DateTimeFormatter.ofPattern("HH:mm");
|
|
|
- String str = dt.format(now);
|
|
|
String date = DateTimeFormatter.ofPattern("yyyy-MM-dd").format(localDate);
|
|
|
List<WxCorpInfo> wxCorpInfoList = wxCorpInfoMapper.selectList(null);
|
|
|
for (WxCorpInfo wxCorpInfo : wxCorpInfoList) {
|
|
@@ -181,7 +179,13 @@ public class TimingTask {
|
|
|
}
|
|
|
//过期公司不提醒
|
|
|
if(company.getExpirationDate().isBefore(LocalDateTime.now())){
|
|
|
- return;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ TimeType timeType = timeTypeMapper.selectById(company.getId());
|
|
|
+ String alertTime = timeType.getAlertTime();
|
|
|
+ LocalTime time = LocalTime.parse(alertTime, dt);
|
|
|
+ if(!time.equals(LocalTime.now())){
|
|
|
+ continue;
|
|
|
}
|
|
|
List<Map<String, Object>> userList = userMapper.getPushUserList(wxCorpInfo.getCompanyId(), date);
|
|
|
userList.forEach(u->{
|