提交代码

master
胡锐 3 months ago
parent f5ff4a2c00
commit abd14557a2
  1. 3
      service/src/main/java/com/hfkj/service/discount/impl/BsDiscountUserServiceImpl.java

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

Loading…
Cancel
Save