|
|
|
@ -241,7 +241,7 @@ class CouponController extends BaseController |
|
|
|
$notAvailable = []; |
|
|
|
foreach ($data as $key => &$item) { |
|
|
|
if (in_array($item->id, $couponIds)) { |
|
|
|
$notAvailable[] = $item; |
|
|
|
$notAvailable[$item->id] = $item; |
|
|
|
} else { |
|
|
|
$available[] = $item; |
|
|
|
} |
|
|
|
@ -249,7 +249,7 @@ class CouponController extends BaseController |
|
|
|
|
|
|
|
return $this->success([ |
|
|
|
'available' => $available, |
|
|
|
'not_available' => $notAvailable |
|
|
|
'not_available' => array_values($notAvailable) |
|
|
|
]); |
|
|
|
|
|
|
|
} |
|
|
|
|