Browse Source

可领取接口bug修复

master
parent
commit
4baa6f8706
  1. 4
      app/Service/CouponService.php

4
app/Service/CouponService.php

@ -72,7 +72,7 @@ class CouponService implements CouponServiceInterface
// 转发型优惠券
$couponReceiveIds = $couponActivity === false ? [] : explode(',',$couponActivity['forward']);
$whereC = [
['u.end_time','>',$nowTime],
['u.start_time','<=',$nowTime],
@ -85,7 +85,7 @@ class CouponService implements CouponServiceInterface
$coupons = Db::table('ims_system_coupon_user as u')
->join('ims_system_coupon_user_receivetype as type', 'u.id', '=', 'type.system_coupon_user_id')
->whereIn('u.id', $couponIds)
->whereIn('u.id', $couponReceiveIds)
->where($whereC)
->whereRaw('u.inventory_use < u.inventory and u.inventory-u.inventory_use >= type.one_receive_number')
->select('u.*','type.one_receive_number')

Loading…
Cancel
Save