diff --git a/src/main/java/io/linfeng/modules/admin/service/impl/AppUserServiceImpl.java b/src/main/java/io/linfeng/modules/admin/service/impl/AppUserServiceImpl.java index 707d2e2..3ab80d0 100644 --- a/src/main/java/io/linfeng/modules/admin/service/impl/AppUserServiceImpl.java +++ b/src/main/java/io/linfeng/modules/admin/service/impl/AppUserServiceImpl.java @@ -200,6 +200,9 @@ public class AppUserServiceImpl extends ServiceImpl i if (!ObjectUtil.isEmpty(appUserUpdateForm.getAvatar())) { user.setAvatar(appUserUpdateForm.getAvatar()); } + if(!ObjectUtil.isEmpty(appUserUpdateForm.getGender())){ + user.setGender(appUserUpdateForm.getGender()); + } baseMapper.updateById(user); redisUtils.delete("userId:" + user.getUid()); } diff --git a/src/main/java/io/linfeng/modules/app/form/AppUserUpdateForm.java b/src/main/java/io/linfeng/modules/app/form/AppUserUpdateForm.java index c155c5a..68f2f1a 100644 --- a/src/main/java/io/linfeng/modules/app/form/AppUserUpdateForm.java +++ b/src/main/java/io/linfeng/modules/app/form/AppUserUpdateForm.java @@ -30,4 +30,7 @@ public class AppUserUpdateForm { @ApiModelProperty(value = "头像") private String avatar; + @ApiModelProperty(value = "性别") + private Integer gender; + }