Browse Source

优惠券库存

master
parent
commit
a480eaa3df
  1. 2
      app/Controller/CouponController.php

2
app/Controller/CouponController.php

@ -76,7 +76,7 @@ class CouponController extends BaseController
$c = Db::table('ims_system_coupon_user as u')
->where($whereC)
->join('ims_system_coupon_user_receivetype as type', 'u.id', '=', 'type.system_coupon_user_id')
->whereRaw('u.inventory-u.inventory_use >= type.one_receive_number')
->whereRaw('u.inventory_use < u.inventory and u.inventory-u.inventory_use >= type.one_receive_number')
// ->whereIn('u.id',$c_ids)
// ->whereNotIn('u.id',$cr_ids)
->whereIn('u.id', $couponIds)

Loading…
Cancel
Save