From d5b3e5a413bcfccba294793ee093722f31b2448a Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期三, 16 八月 2023 17:02:13 +0800 Subject: [PATCH] 添加推单日志 --- management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/TaskUtil.java | 20 ++++++++++++++------ 1 files changed, 14 insertions(+), 6 deletions(-) diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/TaskUtil.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/TaskUtil.java index 0f03a3e..222aba3 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/TaskUtil.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/TaskUtil.java @@ -55,7 +55,9 @@ userToCoupon.setExpireCount(validCount); userToCoupon.setValidCount(0); } - userToCouponService.updateBatchById(collect2); + if(collect2.size() > 0){ + userToCouponService.updateBatchById(collect2); + } } catch (Exception e) { e.printStackTrace(); } @@ -68,7 +70,7 @@ @Scheduled(cron = "0 0 0 * * *") public void taskDay(){ try { - locationService.updateFence();//更新线上电子围栏 +// locationService.updateFence();//更新线上电子围栏 }catch (Exception e){ e.printStackTrace(); } @@ -107,7 +109,9 @@ tAppUser.setIsException(2); } } - appUserService.updateBatchById(appUserList); + if(appUserList.size() > 0){ + appUserService.updateBatchById(appUserList); + } }catch (Exception e){ e.printStackTrace(); } @@ -154,7 +158,9 @@ } } } - driverService.updateBatchById(driverList); + if(driverList.size() > 0){ + driverService.updateBatchById(driverList); + } }catch (Exception e){ e.printStackTrace(); } @@ -164,7 +170,7 @@ * 每月检测司机有效订单是否有异常 * 每月最后一天中午12点检测 */ - @Scheduled(cron = "0 0 12 L * ? ") + @Scheduled(cron = "0 0 12 28-31 * ? ") public void queryDriverIsExceptionMonth(){ try { List<TDriver> driverList = driverService.selectList(new EntityWrapper<TDriver>().ne("status", 3) @@ -178,7 +184,9 @@ driver.setIsException(1); } } - driverService.updateBatchById(driverList); + if(driverList.size() > 0){ + driverService.updateBatchById(driverList); + } }catch (Exception e){ e.printStackTrace(); } -- Gitblit v1.7.1