Browse Source

失效优惠券

master
parent
commit
099f18628f
  1. 5
      app/Controller/CouponController.php

5
app/Controller/CouponController.php

@ -35,7 +35,10 @@ class CouponController extends BaseController
$ids = collect($ids)->unique();
$c = Coupon::where('start_time','<=',$nowTime)
->where('end_time','>',$nowTime)
->where([
['end_time','>',$nowTime],
['status','=',1],
])
->whereRaw('inventory_use < inventory')
->whereIn('id',$ids)
->orderBy('weigh','desc')

Loading…
Cancel
Save