jiangping
2023-12-29 f9691d544e62d6c04dbfe45d05a6c7bc5e004291
server/platform/src/main/java/com/doumee/task/ScheduleTool.java
@@ -5,10 +5,12 @@
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.core.constants.Constants;
import com.doumee.core.exception.BusinessException;
import com.doumee.core.mqtt.config.MqttClientInit;
import com.doumee.core.utils.DateUtil;
import com.doumee.core.utils.HttpsUtil;
import com.doumee.core.wx.WxPayProperties;
import com.doumee.dao.business.model.Goodsorder;
import com.doumee.dao.business.model.Sites;
import com.doumee.dao.system.model.SystemDictData;
import com.doumee.service.business.*;
import com.doumee.service.system.SystemDictDataService;
@@ -60,6 +62,7 @@
    /**
     * @throws Exception
     */
    @Scheduled(cron = "0 0 10 * * ? ")
    public void getWxBill() throws Exception {
        //前一天的數據
        Date ydate = DateUtil.addDaysToDate(new Date(), -1);
@@ -70,7 +73,7 @@
     * 測試
     * @throws Exception
     */
    @Scheduled(cron = "0 30 13 * * ? ")
    @Scheduled(cron = "0 0 21 * * ? ")
    public void getYesterdayBill() throws Exception {
        log.info("=====================开始每天自动结算=======================");
        goodsorderService.autoCloseOrder();
@@ -82,10 +85,10 @@
     * 30 秒刷新一次
     * @throws Exception
     */
    @Scheduled(cron = "0/30 * * * * ? ")
    @Scheduled(cron = "0/15 * * * * ? ")
    public void autoRefreshLockStatus() throws Exception {
        log.info("=====================开始定时刷新骑行中的数充值未开锁失败=======================");
        memberRidesService.autoRefreshLockStatus();
       //memberRidesService.autoRefreshLockStatus();
        log.info("=====================结束定时刷新骑行中的数充值未开锁失败=======================");
    }
@@ -100,7 +103,16 @@
        sitesService.siteReservesNotice();;
        log.info("=====================结束 站点车辆满架率预警=======================");
    }
    /**
     * 检查通信异常的站点发通知
     * @throws Exception
     */
    @Scheduled(fixedDelay = 1000L * 60L * 5)
    public void noticeNoLinkList() throws Exception {
        log.info("=====================开始 检查通信异常的站点发通知=======================");
        sitesService.noticeNoLinkList(new Sites());;
        log.info("=====================结束 检查通信异常的站点发通知=======================");
    }
    @Autowired
    private WxPayProperties wxPayProperties;