puzhibing
2023-08-16 d5b3e5a413bcfccba294793ee093722f31b2448a
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();
        }