|
|
|
@ -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")
|
|
|
|
|