|
|
@@ -189,10 +189,16 @@ class RefundController extends BaseController
|
|
|
}
|
|
|
$string = $get['ids'];
|
|
|
$ids = json_decode($string, true);
|
|
|
- $itemList = ProductClass::getAllByCondition(['mainId' => $this->mainId, 'classId' => ['in', $ids]], null, 'id', 'id');
|
|
|
- if (!empty($itemList)) {
|
|
|
- $productIds = array_keys($itemList);
|
|
|
- $productIds = array_unique($productIds);
|
|
|
+ if (!empty($ids)) {
|
|
|
+ $productIds = [];
|
|
|
+ $itemList = ProductClass::getAllByCondition(['mainId' => $this->mainId, 'classId' => ['in', $ids]], null, 'id', 'id');
|
|
|
+ if (!empty($itemList)) {
|
|
|
+ $productIds = array_keys($itemList);
|
|
|
+ $productIds = array_unique($productIds);
|
|
|
+ }
|
|
|
+ if (empty($productIds)) {
|
|
|
+ util::success(['list' => [], 'moreData' => 0, 'totalAmount' => 0, 'totalNum' => 0, 'totalPage' => 1]);
|
|
|
+ }
|
|
|
$where['productId'] = ['in', $productIds];
|
|
|
}
|
|
|
|