|
|
@@ -21,6 +21,7 @@ use bizGhs\product\models\Product;
|
|
|
use bizGhs\product\services\ProductService;
|
|
|
use bizGhs\shop\classes\ShopAdminClass;
|
|
|
use bizGhs\stock\classes\StockInDayClass;
|
|
|
+use common\components\imgUtil;
|
|
|
use common\components\noticeUtil;
|
|
|
use common\components\printUtil;
|
|
|
use common\components\stringUtil;
|
|
|
@@ -272,6 +273,13 @@ class ProductController extends BaseController
|
|
|
//有库存的花材列表
|
|
|
$field = 'id,py,cover,name,classId,itemId,price,skPrice,hjPrice,stock,cost';
|
|
|
$itemInfoData = ProductClass::getAllByCondition($where, ['inTurn' => SORT_DESC, 'actualSold' => SORT_DESC], $field);
|
|
|
+ if (!empty($itemInfoData)) {
|
|
|
+ foreach ($itemInfoData as $key => $val) {
|
|
|
+ $shortCover = $val['cover'] ?? '';
|
|
|
+ $itemInfoData[$key]['cover'] = imgUtil::groupImg($shortCover) . "?x-oss-process=image/resize,m_fill,h_100,w_100";
|
|
|
+ $itemInfoData[$key]['shortCover'] = $shortCover;
|
|
|
+ }
|
|
|
+ }
|
|
|
} elseif ($requestType == 'changePrice') {
|
|
|
$field = 'id,py,cover,name,cost,itemId,classId,addPrice,skPrice,hjPrice,discountPrice,hjDiscountPrice,skDiscountPrice,skMore,hjAddPrice,addPrice,variety,price,hjPrice,stock,onStock,presell,frontHide,reachNum,reachNumDiscount';
|
|
|
$itemInfoData = ProductClass::getAllByCondition($where, ['inTurn' => SORT_DESC, 'actualSold' => SORT_DESC], $field);
|