无关风月
7 天以前 53d014edd19f57125c355abe71ec5b478500e610
ruoyi-admin/src/main/java/com/ruoyi/web/controller/task/TaskUtil.java
@@ -71,14 +71,10 @@
    private TLeaveService leaveService;
    @Resource
    private TNoticeService noticeService;
    // 每一个小时执行一次
//    @Scheduled(cron = "0 0 0 * * ?")
//    @Scheduled(fixedRate = 1500000000)
    // 每天晚上22点执行
    @Scheduled(cron = "0 0 22 * * ?")
    public void dayOfCreateInspection() {
        try {
            // 查询任务模板
            List<TTemplate> list = templateService.list();
            if (CollectionUtils.isEmpty(list)) {
@@ -152,7 +148,8 @@
                                msgUtils.sendMsg2(sysUser.getPhonenumber(),count+"");
                                break;
                            case 2:
                                if (StringUtils.hasLength(email.getDataContent())&&StringUtils.hasLength(code.getDataContent())){
                                if (StringUtils.hasLength(email.getDataContent())&&StringUtils.hasLength(code.getDataContent())
                                        &&StringUtils.hasLength(sysUser.getEmail())){
                                    EmailUtils.sendEmail(sysUser.getEmail(),email.getDataContent(),code.getDataContent(),"今日剩余"+count+"个任务未完成,请尽快处理");
                                }
                                break;