update:用户数据同步修改1.开启定时任务,每天凌晨2点执行 2.已离职用户的数据过滤
This commit is contained in:
@@ -23,8 +23,8 @@ public class ScheduledSync {
|
||||
private IDataSyncService iDataSyncService;
|
||||
|
||||
|
||||
// @Scheduled(cron = "0 */40 * * * ?") //40分钟执行同步一次
|
||||
// @Scheduled(cron="*/5 * * * * ?")
|
||||
//每天凌晨两点执行
|
||||
@Scheduled(cron="0 0 2 * * ?")
|
||||
|
||||
@Async
|
||||
public void syncSchedulingTasks() throws Exception {
|
||||
|
||||
+2
-1
@@ -95,7 +95,8 @@ public class DataSyncServiceImpl implements IDataSyncService {
|
||||
tsUser.setAccount(jsonObject.getString("userid"));
|
||||
tsUser.setInstitutionId(null!=jsonObject.getString("orgNumber")?jsonObject.getString("orgNumber"):"" );
|
||||
tsUser.setInstitutionName(null!=jsonObject.getString("orgName")?jsonObject.getString("orgName"):"" );
|
||||
if (null == useDistinct.get(jsonObject.getString("userid"))) {
|
||||
//2022-05-23:用户同步增加状态标识,将停用的用户过滤掉
|
||||
if (null == useDistinct.get(jsonObject.getString("userid")) && "1".equals(jsonObject.getString("userStatus"))) {
|
||||
tsUsers.add(tsUser);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user