|
|
|
@ -169,7 +169,19 @@ class CouponController extends BaseController |
|
|
|
|
|
|
|
|
|
|
|
$data = Db::table('ims_system_coupon_user_receive as receive') |
|
|
|
->leftJoin('ims_system_coupon_user as coupon', 'coupon.id', '=', 'receive.system_coupon_user_id') |
|
|
|
->select([ |
|
|
|
'receive.id as receive_id', |
|
|
|
'receive.user_id', |
|
|
|
'receive.number_remain', |
|
|
|
'coupon.id', |
|
|
|
'coupon.title', |
|
|
|
'coupon.full_amount', |
|
|
|
'coupon.discounts', |
|
|
|
'coupon.usable_start_time', |
|
|
|
'coupon.usable_end_time', |
|
|
|
'coupon.discount_type' |
|
|
|
]) |
|
|
|
->join('ims_system_coupon_user as coupon', 'coupon.id', '=', 'receive.system_coupon_user_id') |
|
|
|
->where(['receive.user_id' => $userId]) |
|
|
|
->where(['receive.user_id' => $userId]) |
|
|
|
->whereIn('coupon.type', [1,$type]) |
|
|
|
|