|
@@ -217,12 +217,7 @@ class ProductController extends BaseController
|
|
|
->andWhere("delStatus=0")
|
|
->andWhere("delStatus=0")
|
|
|
->select($field)->asArray()->all();
|
|
->select($field)->asArray()->all();
|
|
|
} else {
|
|
} else {
|
|
|
- if ($requestType == 'common') {
|
|
|
|
|
- //通用花材列表
|
|
|
|
|
- $field = 'id,py,cover,name,ratio,cost,addPrice,classId,skMore,skPrice,itemId,smallUnit,smallRatio,bigUnit,smallUnit,ratioType,variety,price,stock,stockWarning,discountPrice,presell,presellDate';
|
|
|
|
|
- $itemInfoData = ProductClass::getAllByCondition($where, ['inTurn' => SORT_DESC, 'actualSold' => SORT_DESC], $field);
|
|
|
|
|
- $itemInfoData = ProductClass::groupProductInfo($itemInfoData, $level);
|
|
|
|
|
- } elseif ($requestType == 'hasStockList') {
|
|
|
|
|
|
|
+ if ($requestType == 'hasStockList') {
|
|
|
//有库存的花材列表
|
|
//有库存的花材列表
|
|
|
$field = 'id,py,name,classId,itemId,price,skPrice,stock';
|
|
$field = 'id,py,name,classId,itemId,price,skPrice,stock';
|
|
|
$itemInfoData = ProductClass::getAllByCondition($where, ['inTurn' => SORT_DESC, 'actualSold' => SORT_DESC], $field);
|
|
$itemInfoData = ProductClass::getAllByCondition($where, ['inTurn' => SORT_DESC, 'actualSold' => SORT_DESC], $field);
|