|
|
@@ -48,7 +48,7 @@ class ProductController extends BaseController
|
|
|
$where['shopId'] = $shopId;
|
|
|
$where['delStatus'] = 0;
|
|
|
|
|
|
- $itemInfoData = ProductClass::getAllByCondition($where, ['actualSold'=>SORT_DESC,'inTurn'=>SORT_DESC], "*");
|
|
|
+ $itemInfoData = ProductClass::getAllByCondition($where, ['actualSold' => SORT_DESC, 'inTurn' => SORT_DESC], "*");
|
|
|
$itemInfoData = ProductClass::groupProductInfo($itemInfoData);
|
|
|
//常用的itemIds
|
|
|
$oftenItemIds = ProductClass::getOftenItemIds($shopId);
|
|
|
@@ -92,7 +92,7 @@ class ProductController extends BaseController
|
|
|
if ($showPage) {
|
|
|
$respond = ProductClass::getList("*", $where, "inTurn desc");
|
|
|
$respond['list'] = ProductClass::groupClassName($this->sjId, $respond['list']);
|
|
|
- $respond['list'] = ProductClass::groupProductInfo($respond['list'] );
|
|
|
+ $respond['list'] = ProductClass::groupProductInfo($respond['list']);
|
|
|
util::success($respond);
|
|
|
}
|
|
|
$data = ProductClass::getAllByCondition($where, "inTurn desc", "*");
|
|
|
@@ -149,7 +149,7 @@ class ProductController extends BaseController
|
|
|
$where['shopId'] = $shopId;
|
|
|
$where['delStatus'] = 0;
|
|
|
|
|
|
- $itemInfoData = ProductClass::getAllByCondition($where, null, "*");
|
|
|
+ $itemInfoData = ProductClass::getAllByCondition($where, ['inTurn' => SORT_DESC, 'actualSold' => SORT_DESC], "*");
|
|
|
$itemInfoData = ProductClass::groupProductInfo($itemInfoData);
|
|
|
//常用的itemIds
|
|
|
$oftenItemIds = ProductClass::getOftenItemIds($shopId);
|
|
|
@@ -158,7 +158,7 @@ class ProductController extends BaseController
|
|
|
|
|
|
//dd($itemInfoData);
|
|
|
//组装数据: [{classId:'','className:'',child:[{itemInfoData}]}]
|
|
|
- $data = ProductService::assembleData($classIds, $itemIdsInfo, $itemInfoData, $oftenItemIds, '',true);
|
|
|
+ $data = ProductService::assembleData($classIds, $itemIdsInfo, $itemInfoData, $oftenItemIds, '', true);
|
|
|
|
|
|
util::success($data);
|
|
|
} catch (\Exception $e) {
|