|
|
@@ -141,6 +141,13 @@ public class FsCouponServiceImpl implements IFsCouponService
|
|
|
if(fsUserCouponMapper.checkReceive(param.getUserId(),coupon.getCouponId())>0){
|
|
|
return R.error("您已领取此券");
|
|
|
}
|
|
|
+ //判断是否是私域优惠券
|
|
|
+ Integer couponType = coupon.getCouponType();
|
|
|
+ if(couponType!=null && couponType==5){
|
|
|
+ if (param.getCompanyId() == null || param.getCompanyUserId() == null) {
|
|
|
+ return R.error("您无法领取该优惠券");
|
|
|
+ }
|
|
|
+ }
|
|
|
FsUserCoupon userCoupon=new FsUserCoupon();
|
|
|
userCoupon.setUserId(param.getUserId());
|
|
|
userCoupon.setStatus(0);
|