Commit deb3f087 by liyanlin

fix

parent 223df0b9
......@@ -81,9 +81,7 @@ public class OaUserSyncJob extends QuartzJobBean {
));
oaUserList.forEach(oaUser -> {
oaUser.setPrimaryDepartmentId(this.getPrimaryDepartment(oaDepartmentMap, oaDepartmentMap.get(oaUser.getDepartmentId())).getDepartmentId());
if (oaUserService.getOne(new LambdaQueryWrapper<OaUser>().eq(OaUser::getOaUserId, oaUser.getOaUserId())) == null) {
oaUserService.save(oaUser);
}
oaUserService.saveOrUpdate(oaUser, new LambdaQueryWrapper<OaUser>().eq(OaUser::getOaUserId, oaUser.getOaUserId()));
});
oaDepartmentList.forEach(oaDepartment -> {
......
......@@ -13,7 +13,7 @@ import org.springframework.context.annotation.Configuration;
@Configuration
public class OaUserSyncJobConfiguration {
// 扫描主体列表时间间隔:(秒)
private static final int TIME = 60 * 60 * 2;
private static final int TIME = 300;
// JobDetail 定义要执行的 job
@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