| | |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.apache.commons.lang3.time.DateFormatUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Profile; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | |
| | | } |
| | | |
| | | @Scheduled(cron = "0 15 17 * * ?") |
| | | @Profile("prod") |
| | | public void DealSendMessageInfoBySupplier() { |
| | | log.info("供应商下单供货提示开始:" + DateFormatUtils.format(System.currentTimeMillis(), "yyyy-MM-dd HH:mm:ss")); |
| | | // 获取当前日期 |
| | |
| | | LocalDateTime endDateTime = LocalDateTime.of(currentDate, LocalTime.of(17, 0)); |
| | | System.out.println("开始时间: " + startDateTime); |
| | | System.out.println("结束时间: " + endDateTime); |
| | | List<String> sends = orderMapper.getWaitSendMessageInfoBySupplier("SEND", startDateTime, endDateTime); |
| | | List<String> sends = orderMapper.getWaitSendMessageInfoBySupplier("COLLECTION", startDateTime, endDateTime); |
| | | if(CollectionUtils.isNotEmpty(sends)) { |
| | | sends.forEach(s -> { |
| | | try { |