release: 修改头像积分任务

release-2024-08-08
huangyw 4 months ago
parent e8b51a5dbe
commit ed2fba61ca

@ -8,9 +8,9 @@ package constants;
**/ **/
public class TaskPointIdConstants { public class TaskPointIdConstants {
// 新手欢迎奖励 todo // 新手欢迎奖励
public static final String NEW_USER_WELCOME_AWARD = "1"; public static final String NEW_USER_WELCOME_AWARD = "1";
// 修改头像 todo // 修改头像
public static final String MODIFY_AVATAR = "2"; public static final String MODIFY_AVATAR = "2";
// 修改昵称 todo // 修改昵称 todo
public static final String MODIFY_NICKNAME = "3"; public static final String MODIFY_NICKNAME = "3";

@ -17,6 +17,7 @@ import com.luoo.user.service.*;
import com.luoo.user.util.EmojiConverterUtil; import com.luoo.user.util.EmojiConverterUtil;
import com.luoo.user.util.IpUtil; import com.luoo.user.util.IpUtil;
import constants.Constants; import constants.Constants;
import constants.TaskPointIdConstants;
import controller.BaseController; import controller.BaseController;
import dto.UserLoginDto; import dto.UserLoginDto;
import enums.*; import enums.*;
@ -84,6 +85,9 @@ public class MyController extends BaseController {
@Autowired @Autowired
private UserMessageDao userMessageDao; private UserMessageDao userMessageDao;
@Autowired
private UserPointLogService userPointLogService;
@ApiOperation(value = "1.获取个人信息", notes = "游客无法获取个人信息") @ApiOperation(value = "1.获取个人信息", notes = "游客无法获取个人信息")
@GetMapping("/userInfo") @GetMapping("/userInfo")
@GlobalInterceptor(checkAppUserLogin = true) @GlobalInterceptor(checkAppUserLogin = true)
@ -182,6 +186,8 @@ public class MyController extends BaseController {
userInfoService.update(user); userInfoService.update(user);
rabbitTemplate.convertAndSend("userInfoCommentCache", userLoginDto.getUserId()); rabbitTemplate.convertAndSend("userInfoCommentCache", userLoginDto.getUserId());
userPointLogService.addByTaskNew(TaskPointIdConstants.MODIFY_AVATAR, userLoginDto.getUserId());
return Result.success(Constants.RESOURCE_PREFIX + user.getThumbnail()); return Result.success(Constants.RESOURCE_PREFIX + user.getThumbnail());
} }

Loading…
Cancel
Save