用户信息修改后端接口

This commit is contained in:
linfeng 2022-11-09 13:07:45 +08:00
parent 70a51c9d92
commit c70fdd64d4
2 changed files with 6 additions and 0 deletions

View File

@ -200,6 +200,9 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserDao, AppUserEntity> i
if (!ObjectUtil.isEmpty(appUserUpdateForm.getAvatar())) { if (!ObjectUtil.isEmpty(appUserUpdateForm.getAvatar())) {
user.setAvatar(appUserUpdateForm.getAvatar()); user.setAvatar(appUserUpdateForm.getAvatar());
} }
if(!ObjectUtil.isEmpty(appUserUpdateForm.getGender())){
user.setGender(appUserUpdateForm.getGender());
}
baseMapper.updateById(user); baseMapper.updateById(user);
redisUtils.delete("userId:" + user.getUid()); redisUtils.delete("userId:" + user.getUid());
} }

View File

@ -30,4 +30,7 @@ public class AppUserUpdateForm {
@ApiModelProperty(value = "头像") @ApiModelProperty(value = "头像")
private String avatar; private String avatar;
@ApiModelProperty(value = "性别")
private Integer gender;
} }