فهرست منبع

add:
用户新增个性签名

18339543638 2 سال پیش
والد
کامیت
2b13965950

+ 1 - 1
tr-modules/tr-module-system/src/main/java/cn/tr/module/sys/oauth2/controller/CurrentUserController.java

@@ -87,7 +87,7 @@ public class CurrentUserController {
         if(operator==null){
             throw new ServiceException(TRExcCode.USER_ERROR_A0200,String.format("账号体系[{%s}]不存在",stpType));
         }
-        operator.getAccountInfo();
+        operator.updateAccountUserInfo(LoginUserContextHolder.getUser().getUserId(),source);
         return CommonResult.success(true);
     }
 

+ 8 - 0
tr-modules/tr-module-system/src/main/java/cn/tr/module/sys/oauth2/psw/operator/LoginOAuth2PswUserOperator.java

@@ -204,6 +204,14 @@ public class LoginOAuth2PswUserOperator extends AbstractOAuth2PswUserOperator{
 
     @Override
     public void updateAccountUserInfo(String userId, AccountUserInfoEditDTO source) {
+        if(StrUtil.isBlank(source.getAvatar())
+                &&StrUtil.isBlank(source.getNickname())
+                &&StrUtil.isBlank(source.getGender())
+                &&StrUtil.isBlank(source.getPhone())
+                &&StrUtil.isBlank(source.getEmail())
+                &&StrUtil.isBlank(source.getSignature())){
+            return;
+        }
         SysUserPO sysUserPO = OAuth2Mapper.INSTANCE.toSysUser(source);
         sysUserPO.setId(userId);
         sysUserRepository.updateById(sysUserPO);