测试
This commit is contained in:
@@ -55,6 +55,7 @@ class CouponController extends Controller
|
|||||||
->when(!$start && $end, function ($query) use ($end) {
|
->when(!$start && $end, function ($query) use ($end) {
|
||||||
$query->where('created_at', '<', $end);
|
$query->where('created_at', '<', $end);
|
||||||
})
|
})
|
||||||
|
->where('status', UnionpayCoupon::STATUS_INIT)
|
||||||
->latest()
|
->latest()
|
||||||
->paginate();
|
->paginate();
|
||||||
|
|
||||||
@@ -112,6 +113,7 @@ class CouponController extends Controller
|
|||||||
->when(!$start && $end, function ($query) use ($end) {
|
->when(!$start && $end, function ($query) use ($end) {
|
||||||
$query->where('created_at', '<', $end);
|
$query->where('created_at', '<', $end);
|
||||||
})
|
})
|
||||||
|
->where('status', UnionpayCoupon::STATUS_INIT)
|
||||||
->latest()
|
->latest()
|
||||||
->chunk(5000, function ($coupons) use ($handle) {
|
->chunk(5000, function ($coupons) use ($handle) {
|
||||||
foreach ($coupons as $index => $coupon) {
|
foreach ($coupons as $index => $coupon) {
|
||||||
|
|||||||
Reference in New Issue
Block a user