调整补贴列表
This commit is contained in:
parent
541990a1b2
commit
c2d6ece975
@ -29,6 +29,7 @@ class Subsidy extends BaseController
|
||||
}])
|
||||
->where('status', StoreCouponDetail::STATUS_INVALID)
|
||||
->where('type', StoreCouponDetail::TYPE_INCOME);
|
||||
$couponIds = StoreCoupon::whereIn('type', [StoreCouponRepository::TYPE_STORE_COUPON, StoreCouponRepository::TYPE_SALE_SUBSIDY])->column('coupon_id');
|
||||
if (!empty($type)) {
|
||||
if ($type == 1) {
|
||||
$couponWhere = ['type' => StoreCouponRepository::TYPE_STORE_COUPON];
|
||||
@ -37,6 +38,8 @@ class Subsidy extends BaseController
|
||||
}
|
||||
$couponId = StoreCoupon::where($couponWhere)->value('coupon_id');
|
||||
$query->where('coupon_id', $couponId);
|
||||
} else {
|
||||
$query->whereIn('coupon_id', $couponIds);
|
||||
}
|
||||
if ($status !== '') {
|
||||
$query->where('send_status', $status);
|
||||
|
Loading…
x
Reference in New Issue
Block a user