| 1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- /**
- * User: admin
- * Date Time: 2021/3/2 14:33
- */
- namespace hd\controllers;
- use biz\shop\services\ShopService;
- use bizGhs\item\classes\ItemClassClass;
- use bizGhs\product\classes\ProductClass;
- use bizGhs\product\services\ProductService;
- use common\components\util;
- use Yii;
- class GhsProductController extends BaseController
- {
- //零售进店采购
- public function actionIndex()
- {
- $get = Yii::$app->request->get();
- $shopId = $get['shopId']??0;
- $classIds = ItemClassClass::getGhsItemClassAll($this->mainId);
- $where['mainId'] = $this->mainId;
- $where['delStatus'] = 0;
- $itemInfoData = ProductClass::getAllByCondition($where,['actualSold'=>SORT_DESC,'inTurn'=>SORT_DESC],"*");
- $itemInfoData = ProductClass::groupProductInfo($itemInfoData);
- $respond = ProductService::assembleData($classIds, $itemInfoData, true);
- $classItem = $respond['classItem'] ?? [];
- ShopService::totalViewPlus($shopId);
- util::success($classItem);
- }
- }
|