k94314517
2023-12-19 165078645b8cfe800aeda7206e89ebd901c7e6c8
server/dmvisit_admin/src/main/java/com/doumee/task/ScheduleTool.java
@@ -3,6 +3,7 @@
import com.doumee.service.business.impl.hksync.HkSyncImgServiceImpl;
import com.doumee.service.business.impl.hksync.HkSyncOrgUserServiceImpl;
import com.doumee.service.business.impl.hksync.HkSyncVisitServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.EnableScheduling;
@@ -23,6 +24,8 @@
    private HkSyncImgServiceImpl hkSyncImgService;
    @Autowired
    private HkSyncOrgUserServiceImpl hkSyncOrgUserService;
    @Autowired
    private HkSyncVisitServiceImpl hkSyncVisitService;
    /**
     * 是否开发者
     */
@@ -42,17 +45,25 @@
     * 定时同步组织信息到海康系统
     * @throws Exception
     */
//    @Scheduled(fixedDelay= 60*1000)
//    public void syncOrgData() {
//        hkSyncOrgUserService.syncOrgData();
//    }
    /**
     * 定时同步组织信息到海康系统
     * @throws Exception
     */
    @Scheduled(fixedDelay= 60*1000)
    public void syncOrgData() {
        hkSyncOrgUserService.syncOrgData();
    public void syncVisitData() {
        hkSyncVisitService.syncVisitData();
    }
    /**
     * 定时同步用户信息到海康系统
     * @throws Exception
     */
    @Scheduled(fixedDelay= 60*1000)
    public void syncUserData()  {
        hkSyncImgService.syncUserData();
    }
//    @Scheduled(fixedDelay= 60*1000)
//    public void syncUserData()  {
//        hkSyncImgService.syncUserData();
//    }
}