|
|
@@ -74,17 +74,23 @@ class ProductController extends BaseController
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
//弃用
|
|
|
public function actionList()
|
|
|
{
|
|
|
- $classId = Yii::$app->request->get('classId',0);
|
|
|
+ //$classId = Yii::$app->request->get('classId',0);
|
|
|
$pyName = Yii::$app->request->get('py','');
|
|
|
- $itemIds = ItemClass::getItemIdsByClassId($classId);
|
|
|
+ $itemInfo = ItemClass::getGhsItemAll($this->sjId);
|
|
|
+ $itemIds = array_column($itemInfo,'itemId');
|
|
|
if($pyName){
|
|
|
$pyNameItemIds = ItemClass::getItemIdsByPyName($pyName);
|
|
|
$itemIds = array_intersect($itemIds,$pyNameItemIds);
|
|
|
}
|
|
|
- $data = ProductClass::getProductInfoByItemIds($itemIds,$this->shopId);
|
|
|
+ $shopId = Yii::$app->request->get('shopId',0);
|
|
|
+ if(!$shopId){
|
|
|
+ $shopId = $this->shopId;
|
|
|
+ }
|
|
|
+ $data = ProductClass::getProductInfoByItemIds($itemIds,$shopId);
|
|
|
util::success($data);
|
|
|
}
|
|
|
|