zhanghua
2023-12-16 18653f874dc47c7a9ff007d57a59dac873deebdf
ycl-platform/src/main/java/com/ycl/timer/GetDingUserOrgTimer.java
@@ -23,6 +23,7 @@
import com.ycl.service.user.UmsRoleService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.context.ApplicationListener;
@@ -69,9 +70,12 @@
    @Autowired
    private UmsAdminRoleRelationService umsAdminRoleRelationService;
    @Scheduled(cron = "40 50 16 * * ?")
    @Value("${spring.profiles.active}")
    private String env;
    @Scheduled(cron = "0 0 1 * * ?")   // 每天零点执行
    @Transactional(rollbackFor = Exception.class)
    public void run() {
        if ("online".equals(env)) {
        log.info("开始同步任务");
        //获取全部部门code
        JSONObject topObj = dingCommon.getBookAuthority();
@@ -198,6 +202,7 @@
//        log.info(TAG + "update user size " + dingList.size());
//        getEmployeeAvatar();
    }
    }
    /**
     * 获取用户头像