فهرست منبع

批量发放优惠券逻辑完善

xdd 1 ماه پیش
والد
کامیت
88f7fc5412
1فایلهای تغییر یافته به همراه9 افزوده شده و 3 حذف شده
  1. 9 3
      fs-service-system/src/main/java/com/fs/store/service/impl/FsCouponScheduleServiceImpl.java

+ 9 - 3
fs-service-system/src/main/java/com/fs/store/service/impl/FsCouponScheduleServiceImpl.java

@@ -288,10 +288,16 @@ public class FsCouponScheduleServiceImpl implements IFsCouponScheduleService
             logList.add(scheduleLog);
         }
         // 批量更新发放优惠券队列表
-        fsCouponScheduleMapper.updateBatchFsCouponSchedule(fsCouponSchedules);
+        if(CollectionUtils.isNotEmpty(fsCouponSchedules)){
+            fsCouponScheduleMapper.updateBatchFsCouponSchedule(fsCouponSchedules);
+        }
         // 批量添加执行日志
-        fsCouponScheduleLogMapper.batchInsert(logList);
+        if(CollectionUtils.isNotEmpty(logList)){
+            fsCouponScheduleLogMapper.batchInsert(logList);
+        }
         // 批量进行微信公众号消息通知
-        fsMiniprogramSubNotifyTaskMapper.insertBatch(subNotifyTasks);
+        if(CollectionUtils.isNotEmpty(subNotifyTasks)){
+            fsMiniprogramSubNotifyTaskMapper.insertBatch(subNotifyTasks);
+        }
     }
 }