|
|
|
@ -30,7 +30,9 @@ class CouponController extends BaseController |
|
|
|
|
|
|
|
$c_ids = CouponUserRecType::where('receive_type',$receive_type)->pluck('system_coupon_user_id'); |
|
|
|
$nowTime = time(); |
|
|
|
$cr_ids = CouponRec::where('user_id',$user_id)->pluck('system_coupon_user_id'); |
|
|
|
$cr_ids = CouponRec::where( |
|
|
|
'user_id',$user_id |
|
|
|
)->pluck('system_coupon_user_id'); |
|
|
|
|
|
|
|
$ids = array_merge($c_ids->toArray(),$cr_ids->toArray()); |
|
|
|
|
|
|
|
@ -40,6 +42,7 @@ class CouponController extends BaseController |
|
|
|
->where([ |
|
|
|
['u.end_time','>',$nowTime], |
|
|
|
['u.start_time','<=',$nowTime], |
|
|
|
['type.receive_type','=',$receive_type], |
|
|
|
['u.status','=',1], |
|
|
|
]) |
|
|
|
->join('ims_system_coupon_user_receivetype as type', 'u.id', '=', 'type.system_coupon_user_id') |
|
|
|
|