diff --git a/waynboot-mobile-api/src/main/java/com/wayn/mobile/api/controller/UserController.java b/waynboot-mobile-api/src/main/java/com/wayn/mobile/api/controller/UserController.java index 2eef207..37d4e5c 100644 --- a/waynboot-mobile-api/src/main/java/com/wayn/mobile/api/controller/UserController.java +++ b/waynboot-mobile-api/src/main/java/com/wayn/mobile/api/controller/UserController.java @@ -97,7 +97,10 @@ public class UserController { LoginUserDetail loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); Member member = loginUser.getMember(); member.setAvatar(avatar); - boolean update = iMemberService.updateById(member); + boolean update = iMemberService.lambdaUpdate() + .set(Member::getAvatar, avatar) + .eq(Member::getId, member.getId()) + .update(); if (!update) { throw new BusinessException("上传头像失败"); }