fix:个人信息中心联调完成

V0.5.x
tangfudong 2023-06-21 11:45:05 +08:00
parent 6c92bc79e6
commit eb5c8c2872
3 changed files with 10 additions and 3 deletions

View File

@ -47,7 +47,7 @@ public class SysProfileController extends BaseController {
*/
@ApiOperation(value = "个人信息", notes = "个人信息")
@PostMapping("/getDeail")
@PostMapping("/getDetail")
public ProfileVo profile() {
SysUserVo user = userService.selectUserById(LoginHelper.getUserId());
ProfileVo profileVo = new ProfileVo();

View File

@ -21,7 +21,7 @@ public class SysUserProfileBo extends BaseDto {
/**
* ID
*/
private Long userId;
private Long id;
/**
*

View File

@ -266,7 +266,14 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
@Override
public int updateUserProfile(SysUserBo user) {
return 0;
SysUser oldUser=sysUserData.findById(user.getId());
if(ObjectUtil.isNotNull(user.getNickName())){
oldUser.setNickName(user.getNickName());
}
oldUser.setPhonenumber(user.getPhonenumber());
oldUser.setEmail(user.getEmail());
oldUser.setSex(user.getSex());
return sysUserData.save(oldUser)!=null?1:0;
}
@Override