Member:会员等级变更修复

This commit is contained in:
YunaiV 2024-03-30 19:48:41 +08:00
parent 81bcf718cd
commit 0b91603652
2 changed files with 3 additions and 5 deletions

View File

@ -241,10 +241,8 @@ public class MemberLevelServiceImpl implements MemberLevelService {
MemberUserDO user = memberUserService.getUser(userId); MemberUserDO user = memberUserService.getUser(userId);
Integer userExperience = ObjUtil.defaultIfNull(user.getExperience(), 0); Integer userExperience = ObjUtil.defaultIfNull(user.getExperience(), 0);
userExperience = NumberUtil.max(userExperience + experience, 0); // 防止扣出负数 userExperience = NumberUtil.max(userExperience + experience, 0); // 防止扣出负数
MemberLevelRecordDO levelRecord = new MemberLevelRecordDO() MemberLevelRecordDO levelRecord = new MemberLevelRecordDO().setUserId(user.getId())
.setUserId(user.getId()) .setExperience(experience).setUserExperience(userExperience).setLevelId(user.getLevelId());
.setExperience(experience)
.setUserExperience(userExperience);
memberExperienceRecordService.createExperienceRecord(userId, experience, userExperience, memberExperienceRecordService.createExperienceRecord(userId, experience, userExperience,
bizType, bizId); bizType, bizId);

View File

@ -125,7 +125,7 @@ public interface ErrorCodeConstants {
ErrorCode SOCIAL_CLIENT_WEIXIN_MINI_APP_PHONE_CODE_ERROR = new ErrorCode(1_002_018_200, "获得手机号失败"); ErrorCode SOCIAL_CLIENT_WEIXIN_MINI_APP_PHONE_CODE_ERROR = new ErrorCode(1_002_018_200, "获得手机号失败");
ErrorCode SOCIAL_CLIENT_NOT_EXISTS = new ErrorCode(1_002_018_201, "社交客户端不存在"); ErrorCode SOCIAL_CLIENT_NOT_EXISTS = new ErrorCode(1_002_018_201, "社交客户端不存在");
ErrorCode SOCIAL_CLIENT_UNIQUE = new ErrorCode(1_002_018_201, "社交客户端已存在配置"); ErrorCode SOCIAL_CLIENT_UNIQUE = new ErrorCode(1_002_018_202, "社交客户端已存在配置");
// ========== 系统敏感词 1-002-019-000 ========= // ========== 系统敏感词 1-002-019-000 =========
ErrorCode SENSITIVE_WORD_NOT_EXISTS = new ErrorCode(1_002_019_000, "系统敏感词在所有标签中都不存在"); ErrorCode SENSITIVE_WORD_NOT_EXISTS = new ErrorCode(1_002_019_000, "系统敏感词在所有标签中都不存在");