|
|
@ -26,10 +26,15 @@ class CouponRebate implements CouponRebateInterface |
|
|
|
|
|
|
|
|
public function getActiveInfo() |
|
|
public function getActiveInfo() |
|
|
{ |
|
|
{ |
|
|
|
|
|
$time = time(); |
|
|
$res = Db::table('ims_system_coupon_user') |
|
|
$res = Db::table('ims_system_coupon_user') |
|
|
->where([ |
|
|
->where([ |
|
|
|
|
|
['status','=',1], |
|
|
['active_type','=',2], |
|
|
['active_type','=',2], |
|
|
|
|
|
['start_time','<=',$time], |
|
|
|
|
|
['end_time','>',$time], |
|
|
]) |
|
|
]) |
|
|
|
|
|
->whereRaw('inventory > inventory_use') |
|
|
->get(); |
|
|
->get(); |
|
|
return $res; |
|
|
return $res; |
|
|
} |
|
|
} |
|
|
|