Commit deb3f087 by liyanlin

fix

parent 223df0b9
...@@ -81,9 +81,7 @@ public class OaUserSyncJob extends QuartzJobBean { ...@@ -81,9 +81,7 @@ public class OaUserSyncJob extends QuartzJobBean {
)); ));
oaUserList.forEach(oaUser -> { oaUserList.forEach(oaUser -> {
oaUser.setPrimaryDepartmentId(this.getPrimaryDepartment(oaDepartmentMap, oaDepartmentMap.get(oaUser.getDepartmentId())).getDepartmentId()); oaUser.setPrimaryDepartmentId(this.getPrimaryDepartment(oaDepartmentMap, oaDepartmentMap.get(oaUser.getDepartmentId())).getDepartmentId());
if (oaUserService.getOne(new LambdaQueryWrapper<OaUser>().eq(OaUser::getOaUserId, oaUser.getOaUserId())) == null) { oaUserService.saveOrUpdate(oaUser, new LambdaQueryWrapper<OaUser>().eq(OaUser::getOaUserId, oaUser.getOaUserId()));
oaUserService.save(oaUser);
}
}); });
oaDepartmentList.forEach(oaDepartment -> { oaDepartmentList.forEach(oaDepartment -> {
......
...@@ -13,7 +13,7 @@ import org.springframework.context.annotation.Configuration; ...@@ -13,7 +13,7 @@ import org.springframework.context.annotation.Configuration;
@Configuration @Configuration
public class OaUserSyncJobConfiguration { public class OaUserSyncJobConfiguration {
// 扫描主体列表时间间隔:(秒) // 扫描主体列表时间间隔:(秒)
private static final int TIME = 60 * 60 * 2; private static final int TIME = 300;
// JobDetail 定义要执行的 job // JobDetail 定义要执行的 job
@Bean @Bean
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment