jiangping
2024-07-10 0ad53b755fb839f3275940530229d4705824e7e0
server/admin_sys_timer/src/main/java/com/doumee/task/ScheduleTool.java
ÎļþÃû´Ó server/admin_timer/src/main/java/com/doumee/task/ScheduleCommonTool.java ÐÞ¸Ä
@@ -20,17 +20,21 @@
import java.util.Date;
/**
 * å®šæ—¶ä»»åŠ¡
 * å®šæ—¶ä»»åŠ¡ï¼ˆåºŸå¼ƒï¼‰
 * @author jiangping
 * @date 2021-10-10 14:40:35
 * https://www.bejson.com/othertools/cron/  cron è¡¨è¾¾å¼ç”Ÿæˆåœ°å€
 */
//@Component
//@EnableScheduling
public class ScheduleCommonTool {
@Component
@EnableScheduling
public class ScheduleTool {
    @Autowired
    private HkSyncParkServiceImpl hkSyncParkService;
    @Autowired
    private HkSyncImgServiceImpl hkSyncImgService;
    @Autowired
    private HkSyncEmpowerServiceImpl hkSyncEmpowerService;
    @Autowired
    private HkSyncOrgUserToHKServiceImpl hkSyncOrgUserService;
    @Autowired
@@ -61,7 +65,7 @@
     * æ¯åˆ†é’Ÿæ‹‰å–一次今日的访客预约数据
     * @throws Exception
     */
    @Scheduled(fixedRate= 30*1000)
    @Scheduled(fixedRate= 3*60*1000)
    public void syncVistAppointData() throws Exception {
        if(Constants.DEALING_FROM_HK_VISIT){
            return ;
@@ -126,6 +130,7 @@
    }
    /**
     * å®šæ—¶å†»ç»“内部人员
     */
@@ -137,7 +142,7 @@
     * æ¯å¤©æ¸…理超过一周的接口日志数据(清除和安防平台对接的接口数据)
     * @throws Exception
     */
    @Scheduled(cron= "0 0 23 * * ?")
//    @Scheduled(cron= "0 0 23 * * ?")
    public void clearThreeMonthLog() throws Exception {
        interfaceLogService.clearThreeMonthLog();
    }