diff --git a/luoo_common/src/main/java/constants/ErrorConstants.java b/luoo_common/src/main/java/constants/ErrorConstants.java index 2f58284..88d5035 100644 --- a/luoo_common/src/main/java/constants/ErrorConstants.java +++ b/luoo_common/src/main/java/constants/ErrorConstants.java @@ -40,6 +40,7 @@ public class ErrorConstants { public final static String USER_NAME_ALREADY_EXISTS = "用户名已存在"; public final static String USER_INVITE_CODE_NOT_EXIST = "邀请码不存在"; public static final String USER_INVITE_CODE_CANNOT_BE_SELF = "邀请码不能是自己的"; + public static final String INVITATION_CODE_IS_INCORRECT = "请输入正确的邀请码"; public static final String DEFAULT_ADDRESS_CANNOT_BE_ADDED_AGAIN = "请勿重复添加默认地址!"; // 会员部分 diff --git a/luoo_user/src/main/java/com/luoo/user/service/UserInfoService.java b/luoo_user/src/main/java/com/luoo/user/service/UserInfoService.java index 49b16d8..853aebd 100644 --- a/luoo_user/src/main/java/com/luoo/user/service/UserInfoService.java +++ b/luoo_user/src/main/java/com/luoo/user/service/UserInfoService.java @@ -309,6 +309,8 @@ public class UserInfoService { userPointLogService.addByTaskDailyAndUserId(TaskPointIdConstants.INVITE_USER_20, userInfoDaoByInvitationCode.getId()); } + } else { + throw new BizException(ErrorConstants.INVITATION_CODE_IS_INCORRECT); } }