【7.2.3】更新Oauth2用户创建

pull/30/head
fengshuonan 2022-07-01 19:13:55 +08:00
parent bbed4bd535
commit 891ec117ee
2 changed files with 4 additions and 2 deletions

View File

@ -166,6 +166,6 @@ public interface UserServiceApi {
* @author fengshuonan
* @date 2022/7/1 19:03
*/
void createAndSaveOAuth2User(OAuth2AuthUserDTO oAuth2AuthUserDTO);
SysUserDTO createAndSaveOAuth2User(OAuth2AuthUserDTO oAuth2AuthUserDTO);
}

View File

@ -948,7 +948,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
}
@Override
public void createAndSaveOAuth2User(OAuth2AuthUserDTO oAuth2AuthUserDTO) {
public SysUserDTO createAndSaveOAuth2User(OAuth2AuthUserDTO oAuth2AuthUserDTO) {
// 请求bean转为实体填充一些基本属性
SysUser oAuth2User = SysUserCreateFactory.createOAuth2User(oAuth2AuthUserDTO);
@ -971,6 +971,8 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
userOrgRequest.setUserId(oAuth2User.getUserId());
userOrgRequest.setOrgId(OAUTH2_USER_ORG_ID);
this.sysUserOrgService.add(userOrgRequest);
return BeanUtil.copyProperties(oAuth2User, SysUserDTO.class);
}
/**