|
|
|
@ -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') |
|
|
|
|