|
@@ -1128,6 +1128,10 @@ public class LifeDiscountCouponServiceImpl extends ServiceImpl<LifeDiscountCoupo
|
|
|
@Override
|
|
@Override
|
|
|
public boolean issuePlatformCoupon(List<Integer> userIds, Integer couponId) {
|
|
public boolean issuePlatformCoupon(List<Integer> userIds, Integer couponId) {
|
|
|
LifeDiscountCoupon lifeDiscountCoupon = this.getById(couponId);
|
|
LifeDiscountCoupon lifeDiscountCoupon = this.getById(couponId);
|
|
|
|
|
+ if(lifeDiscountCoupon == null){
|
|
|
|
|
+ //如果优惠券为空,则返回失败
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
List<LifeDiscountCouponUser> lifeDiscountCouponUsers = new ArrayList<>();
|
|
List<LifeDiscountCouponUser> lifeDiscountCouponUsers = new ArrayList<>();
|
|
|
for (Integer userId : userIds) {
|
|
for (Integer userId : userIds) {
|
|
|
LifeDiscountCouponUser lifeDiscountCouponUser = new LifeDiscountCouponUser();
|
|
LifeDiscountCouponUser lifeDiscountCouponUser = new LifeDiscountCouponUser();
|