From 815b97b862b65031a8941f60425e2dd7cf382c07 Mon Sep 17 00:00:00 2001 From: huangyw <1207046171@qq.com> Date: Thu, 19 Sep 2024 09:52:37 +0800 Subject: [PATCH] =?UTF-8?q?release:=20=E4=B8=AA=E4=BA=BA=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=8E=B7=E5=BE=97=E7=A7=AF=E5=88=86=E5=9B=9E?= =?UTF-8?q?=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/luoo/user/controller/MyController.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/luoo_user/src/main/java/com/luoo/user/controller/MyController.java b/luoo_user/src/main/java/com/luoo/user/controller/MyController.java index e9a436e..fbd8602 100644 --- a/luoo_user/src/main/java/com/luoo/user/controller/MyController.java +++ b/luoo_user/src/main/java/com/luoo/user/controller/MyController.java @@ -134,7 +134,7 @@ public class MyController extends BaseController { @ApiOperation(value = "2.更新个人信息", notes = "游客无法编辑个人信息") @PutMapping("/userInfo") @GlobalInterceptor(checkAppUserLogin = true) - public Result> updateUserInfo(@RequestHeader(value = "Authorization", required = true) String authorization, + public Result updateUserInfo(@RequestHeader(value = "Authorization", required = true) String authorization, @VerifyParam(required = true) @RequestBody UserInfoUpdateDto userInfoUpdateDto) { UserLoginDto userLoginDto = getUserLoginDto(authorization); UserInfo user = userInfoService.findById(userLoginDto.getUserId()); @@ -151,13 +151,14 @@ public class MyController extends BaseController { } } + Integer point = 0; // 信息是否已完善 if (StringUtils.isNotBlank(userInfoUpdateDto.getBirthDay()) && StringUtils.isNotBlank(userInfoUpdateDto.getNickName()) && !Objects.isNull(userInfoUpdateDto.getSex()) && StringUtils.isNotBlank(userInfoUpdateDto.getBirthDay()) ) { - userPointLogService.addByTaskNew(TaskPointIdConstants.MODIFY_INFORMATION, authorization); + point = userPointLogService.addByTaskNew(TaskPointIdConstants.MODIFY_INFORMATION, authorization); } if (StringUtils.isNotBlank(userInfoUpdateDto.getInvitationCode()) && StringUtils.isBlank(user.getInvitationUserId())) { @@ -186,8 +187,8 @@ public class MyController extends BaseController { user.setModifyTime(new Date()); userInfoService.update(user); - List resultList = new ArrayList<>(); - return Result.success(resultList); + + return Result.success(point > 0 ? "更新成功,获得" + point + "积分" : "更新成功"); } @ApiOperation(value = "3.上传个人头像", notes = "图片存入S3,桶为indie,目录为 user/avatar/, 缩略图大小为200X200")