浏览代码

no message

FengChaoYu 1 周之前
父节点
当前提交
55c3f109a9
共有 1 个文件被更改,包括 8 次插入1 次删除
  1. 8 1
      src/main/java/com/gree/mall/manager/schedule/OverOrderSchedule.java

+ 8 - 1
src/main/java/com/gree/mall/manager/schedule/OverOrderSchedule.java

@@ -1,5 +1,6 @@
 package com.gree.mall.manager.schedule;
 
+import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.date.DateUtil;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.gree.mall.manager.enums.OrderShareStatusEnum;
@@ -125,12 +126,18 @@ public class OverOrderSchedule {
 
     @Scheduled(cron = "0 */5 8-22 * * ?")
     public void orderShareQueryTask() {
-        log.info("开始分账结果查询");
+
         List<OrderShare> orderShares = orderShareService.lambdaQuery()
                 .eq(OrderShare::getStatus, OrderShareStatusEnum.OVER.toString())
                 .eq(OrderShare::getShareStatus, WXShareStatusEnum.PROCESSING.toString())
                 .list();
 
+        if (CollectionUtil.isEmpty(orderShares)) {
+            return;
+        }
+
+        log.info("开始分账结果查询");
+
         for (OrderShare share : orderShares) {
             try {
                 orderShareLogic.queryShareResult(share);