|
|
|
@ -40,7 +40,7 @@ public class DingTalkAuthenticationProvider implements AuthenticationProvider { |
|
|
|
throw new BadCredentialsException("钉钉授权失败"); |
|
|
|
} |
|
|
|
|
|
|
|
UserEntity user = userMapper.selectById(Long.valueOf(dingId)); |
|
|
|
UserEntity user = userMapper.selectById(dingId); |
|
|
|
if (Objects.isNull(user)) { |
|
|
|
// 直接插入这个用户并且触发一次异步的全量用户同步
|
|
|
|
UserDTO userDTO = dingUtil.getUserById(dingId); |
|
|
|
@ -48,7 +48,7 @@ public class DingTalkAuthenticationProvider implements AuthenticationProvider { |
|
|
|
throw new BadCredentialsException("获取用户信息异常,请联系管理员"); |
|
|
|
} |
|
|
|
userMapper.batchUpsert(Collections.singletonList(userDTO.toEntity(UserEntity::new))); |
|
|
|
user = userMapper.selectById(Long.valueOf(dingId)); |
|
|
|
user = userMapper.selectById(dingId); |
|
|
|
dingUserSyncUtil.triggerSync(false); |
|
|
|
} |
|
|
|
|
|
|
|
|