Forráskód Böngészése

特价金额不同步

shish 11 hónapja
szülő
commit
bcc37246f2

+ 2 - 2
app-ghs/controllers/ProductController.php

@@ -1071,7 +1071,7 @@ class ProductController extends BaseController
     public function actionUpdate()
     {
         $shopAdmin = $this->shopAdmin;
-        if (isset($shopAdmin->super) == false || $shopAdmin->super != 1) {
+        if (!isset($shopAdmin->super) || $shopAdmin->super != 1) {
             util::fail('超管才能操作');
         }
 
@@ -1094,7 +1094,7 @@ class ProductController extends BaseController
         $post = Yii::$app->request->post();
         $discountPrice = $post['discountPrice'] ?? 0;
         if ($discountPrice > 0) {
-            if (isset($post['hjDiscountPrice']) == false || empty($post['hjDiscountPrice'])) {
+            if (empty($post['hjDiscountPrice'])) {
                 $addPrice = $post['addPrice'] ?? 0;
                 $hjAddPrice = $post['hjAddPrice'] ?? 0;
                 $skMore = $post['skMore'] ?? 0;

+ 4 - 0
biz-ghs/product/classes/ProductClass.php

@@ -1932,6 +1932,10 @@ class ProductClass extends BaseClass
                     unset($params['skMore']);
                     unset($params['hjAddPrice']);
                     unset($params['cost']);
+                    //特价的金额也不能同步,淘花里
+                    unset($params['hjDiscountPrice']);
+                    unset($params['discountPrice']);
+                    unset($params['skDiscountPrice']);
                     self::updateById($chainProduct->id, $params);
                     continue;
                 }