Merge remote-tracking branch 'origin/release-2024-04-25' into release-2024-04-25

release-2024-04-25
huangyawei 2 months ago
commit 20d76ac230

@ -134,7 +134,7 @@ public class MyController extends BaseController {
@ApiOperation(value = "2.更新个人信息", notes = "游客无法编辑个人信息")
@PutMapping("/userInfo")
@GlobalInterceptor(checkAppUserLogin = true)
public Result<List<String>> updateUserInfo(@RequestHeader(value = "Authorization", required = true) String authorization,
public Result<String> 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<String> resultList = new ArrayList<>();
return Result.success(resultList);
return Result.success(point > 0 ? "更新成功,获得" + point + "积分" : "更新成功");
}
@ApiOperation(value = "3.上传个人头像", notes = "图片存入S3桶为indie目录为 user/avatar/, 缩略图大小为200X200")

@ -202,6 +202,7 @@ public class TaskPointService {
TaskPoint taskPoint = (TaskPoint) redisTemplate.opsForValue().get(TASK_POINT + id);
if(taskPoint == null) {
taskPoint = taskPointDao.findById(id).get();
redisTemplate.opsForValue().set(TASK_POINT + id, taskPoint);
}
return taskPoint;
}

Loading…
Cancel
Save