|
|
@@ -33,6 +33,7 @@ class ProductController extends BaseController
|
|
|
$itemIdsInfo = ItemService::getGhsItemIds($this->sjId);
|
|
|
|
|
|
$itemIds = array_column($itemIdsInfo,'itemId');
|
|
|
+
|
|
|
if($py){
|
|
|
$pyNameItemIds = ItemClass::getItemIdsByPyName($py);
|
|
|
$itemIds = array_intersect($itemIds,$pyNameItemIds);
|
|
|
@@ -45,16 +46,16 @@ class ProductController extends BaseController
|
|
|
if(!$shopId){
|
|
|
$shopId = $this->shopId;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
$waringItemIds = ProductClass::getItemIdsWarning($this->sjId,$shopId);
|
|
|
$itemIds = array_intersect($itemIds,$waringItemIds);
|
|
|
}
|
|
|
|
|
|
|
|
|
- $itemInfoData = ProductClass::getProductInfoByItemIds($itemIds);
|
|
|
+ $itemInfoData = ProductClass::getProductInfoByItemIds($itemIds,$this->shopId);
|
|
|
|
|
|
//常用的itemIds
|
|
|
- $oftenItemIds = ProductClass::getOftenItemIds($this->sjId);
|
|
|
+ $oftenItemIds = ProductClass::getOftenItemIds($this->shopId);
|
|
|
|
|
|
//组装数据: [{classId:'','className:'',child:[{itemInfoData}]}]
|
|
|
$data = ProductService::assembleData($classIds,$itemIdsInfo,$itemInfoData,$oftenItemIds);
|
|
|
@@ -74,7 +75,7 @@ class ProductController extends BaseController
|
|
|
$pyNameItemIds = ItemClass::getItemIdsByPyName($pyName);
|
|
|
$itemIds = array_intersect($itemIds,$pyNameItemIds);
|
|
|
}
|
|
|
- $data = ProductClass::getProductInfoByItemIds($itemIds);
|
|
|
+ $data = ProductClass::getProductInfoByItemIds($itemIds,$this->shopId);
|
|
|
util::success($data);
|
|
|
}
|
|
|
|