Przeglądaj źródła

Merge branch 'redesign‌-260706' into dev

shizhongqi 5 godzin temu
rodzic
commit
4bfe83b93c

+ 0 - 3
app-hd/controllers/GoodsController.php

@@ -264,9 +264,6 @@ class GoodsController extends BaseController
         $data['shopId'] = $this->shopId ?? 0;
         $data['shopId'] = $this->shopId ?? 0;
         $data['flower'] = $info['flower'] ?? 0;
         $data['flower'] = $info['flower'] ?? 0;
 
 
-        if (!empty($info['spu'])) {
-            //util::fail('美团商品暂时不能修改');
-        }
 
 
         $connection = Yii::$app->db;
         $connection = Yii::$app->db;
         $transaction = $connection->beginTransaction();
         $transaction = $connection->beginTransaction();

+ 0 - 1
app-mall/controllers/HomePageConfigController.php

@@ -7,7 +7,6 @@ use bizHd\homePageConfig\classes\HomePageDisplayClass;
 use bizHd\homePageConfig\classes\HomePageModuleClass;
 use bizHd\homePageConfig\classes\HomePageModuleClass;
 use common\components\util;
 use common\components\util;
 use mall\models\homePageConfig\GetSectionGoodsForm;
 use mall\models\homePageConfig\GetSectionGoodsForm;
-use Yii;
 
 
 /**
 /**
  * 商城端首页配置读取接口
  * 商城端首页配置读取接口

+ 1 - 1
biz-hd/goods/classes/GoodsClass.php

@@ -162,7 +162,7 @@ class GoodsClass extends BaseClass
                     'weight'=>(float)($spec['weight'] ?? 1),
                     'weight'=>(float)($spec['weight'] ?? 1),
                     'sold'=>(int)($spec['sold'] ?? 0),
                     'sold'=>(int)($spec['sold'] ?? 0),
                     'masterId'=>$masterId,
                     'masterId'=>$masterId,
-                    'goodsStyle'=>0,
+                    'goodsStyle'=>(int)$data['goodsStyle'],
                     'status'=>(int)($data['status'] ?? 1),
                     'status'=>(int)($data['status'] ?? 1),
                     'delStatus'=>0
                     'delStatus'=>0
                 ]
                 ]

+ 5 - 5
biz-hd/homePageConfig/classes/HomePageModuleClass.php

@@ -757,13 +757,13 @@ class HomePageModuleClass
         }
         }
 
 
         // 注意:Base::getByIds 传入 $order 会走到未定义的 order() 方法而报错,这里统一取回后在 PHP 侧排序
         // 注意:Base::getByIds 传入 $order 会走到未定义的 order() 方法而报错,这里统一取回后在 PHP 侧排序
-        $rows = GoodsClass::getByIds($goodsIds, null, null, 'id,name,price,priceType,stock,cover,sold,actualSold,status,delStatus,masterId,mainId,createTime');
+        $rows = GoodsClass::getByIds($goodsIds, null, null, 'id,name,price,priceType,stock,cover,sold,actualSold,goodsStyle,status,delStatus,masterId,mainId,createTime');
         // 仅取当前门店、未删除、上架中的主规格商品
         // 仅取当前门店、未删除、上架中的主规格商品
         $rows = array_values(array_filter($rows, function ($row) use ($mainId) {
         $rows = array_values(array_filter($rows, function ($row) use ($mainId) {
-            return intval($row['mainId'] ?? 0) === $mainId
-                && intval($row['delStatus'] ?? 0) === 0
-                && intval($row['status'] ?? 0) === 1
-                && intval($row['masterId'] ?? 0) === 0;
+            return intval($row['mainId']) === $mainId
+                && intval($row['delStatus']) === 0
+                && intval($row['status']) === 1
+                && intval($row['masterId']) === 0;
         }));
         }));
 
 
         if ($sort == self::SORT_SALES) {
         if ($sort == self::SORT_SALES) {