From eea92f23bf8ead897f346ae6ccc8603ac039e566 Mon Sep 17 00:00:00 2001 From: jiangping <jp@doumee.com> Date: 星期二, 30 七月 2024 09:48:47 +0800 Subject: [PATCH] 修复bug --- server/admin_sys_timer/src/main/java/com/doumee/task/ScheduleTool.java | 68 +++++++++++++--------------------- 1 files changed, 26 insertions(+), 42 deletions(-) diff --git a/server/admin_sys_timer/src/main/java/com/doumee/task/ScheduleTool.java b/server/admin_sys_timer/src/main/java/com/doumee/task/ScheduleTool.java index 4237c2a..86278fd 100644 --- a/server/admin_sys_timer/src/main/java/com/doumee/task/ScheduleTool.java +++ b/server/admin_sys_timer/src/main/java/com/doumee/task/ScheduleTool.java @@ -53,33 +53,7 @@ @Autowired private DataSyncConfig dataSyncConfig; - /** - * 姣忓垎閽熸媺鍙栦竴娆′粖鏃ョ殑璁垮棰勭害鏁版嵁 - * @throws Exception - */ - @Scheduled(cron= "0 0 23 * * ?") - public void syncVehicleUpdateData() throws Exception { - hkSyncVehicleFromHKService.syncVehicleUpdateData(new Date(System.currentTimeMillis()-24*60*60*1000)); - } - /** - * 姣忓垎閽熸媺鍙栦竴娆′粖鏃ョ殑璁垮棰勭害鏁版嵁 - * @throws Exception - */ - @Scheduled(fixedRate= 3*60*1000) - public void syncVistAppointData() throws Exception { - if(Constants.DEALING_FROM_HK_VISIT){ - return ; - } - try { - Constants.DEALING_FROM_HK_VISIT =true; - hkSyncVisitFromHKService.syncVistAppointData(new Date()); - Constants.DEALING_FROM_HK_VISIT =false; - }catch (Exception e){ -// throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "瀵逛笉璧凤紝娴峰悍鍚屾鏁版嵁澶辫触~"); - }finally { - Constants.DEALING_FROM_HK_VISIT =false; - } - } + /** * 姣�10鍒嗛挓鎷夊彇涓�娆℃渶鏂拌瀹㈢櫥璁扮姸鎬侊紙棰勭害鎴愬姛鍜屽凡鐧昏锛� * @throws Exception @@ -92,7 +66,7 @@ * 涓嬭浇娴峰悍绯荤粺鍥剧墖鏁版嵁 * @throws Exception */ - @Scheduled(fixedRate= 60*1000) +// @Scheduled(fixedRate= 60*1000) public void downloadHkImg() throws Exception { if(dataSyncConfig.getNeedDealImg()!=null && dataSyncConfig.getNeedDealImg()){ hkSyncImgService.downHKImgs(0); @@ -129,21 +103,31 @@ hkSyncVisitService.syncVisitData(); } + /** + * 姣忓垎閽熸媺鍙栦竴娆′粖鏃ョ殑璁垮棰勭害鏁版嵁 + * @throws Exception + */ + @Scheduled(cron= "0 0 23 * * ?") + public void syncVehicleUpdateData() throws Exception { + hkSyncVehicleFromHKService.syncVehicleUpdateData(new Date(System.currentTimeMillis()-24*60*60*1000)); + } - /** - * 瀹氭椂鍐荤粨鍐呴儴浜哄憳 - */ + /** + * 瀹氭椂鍐荤粨鍐呴儴浜哄憳 + */ // @Scheduled(fixedRate= 60*1000) - public void memberFreeze() { - memberService.memberFreeze(); - } - /** - * 姣忓ぉ娓呯悊瓒呰繃涓�鍛ㄧ殑鎺ュ彛鏃ュ織鏁版嵁锛堟竻闄ゅ拰瀹夐槻骞冲彴瀵规帴鐨勬帴鍙f暟鎹級 - * @throws Exception - */ -// @Scheduled(cron= "0 0 23 * * ?") - public void clearThreeMonthLog() throws Exception { - interfaceLogService.clearThreeMonthLog(); - } + public void memberFreeze() { + memberService.memberFreeze(); + } + /** + * 姣忓ぉ娓呯悊瓒呰繃涓�鍛ㄧ殑鎺ュ彛鏃ュ織鏁版嵁锛堟竻闄ゅ拰瀹夐槻骞冲彴瀵规帴鐨勬帴鍙f暟鎹級 + * @throws Exception + */ + @Scheduled(cron= "0 0 23 * * ?") + public void remainLastLogs() throws Exception { + interfaceLogService.remainLastLogs(); + } + + } -- Gitblit v1.9.3