|
|
|
@ -331,6 +331,9 @@ public class BsDiscountUserServiceImpl implements BsDiscountUserService { |
|
|
|
|
if (!giveUser.getId().equals(discountUser.getUserId())) { |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "优惠券无法赠送"); |
|
|
|
|
} |
|
|
|
|
if (giveUser.getPhone().equals(phone)) { |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "不可以赠送给自己"); |
|
|
|
|
} |
|
|
|
|
// 查询接收人
|
|
|
|
|
BsUser user = userService.getUser(phone); |
|
|
|
|
if (user == null) { |
|
|
|
|