Browse Source

当前订单可用优惠券-新增返回列

master
weigang 5 years ago
parent
commit
25fb9ea4b4
  1. 14
      app/Controller/CouponController.php

14
app/Controller/CouponController.php

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

Loading…
Cancel
Save