Просмотр исходного кода

Merge branch 'zhongqi-delivery' of git.huaml.com:zhh/huahuibao into zhongqi-delivery

shizhongqi 8 месяцев назад
Родитель
Сommit
9d7811ac08

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

@@ -56,11 +56,11 @@ class ShopExtController extends BaseController
             util::fail('没有需要修改');
         }
         $shopId = $this->shopId;
-        \bizHd\shop\classes\ShopExtClass::updateByCondition(['shopId' => $shopId], $arr);
+        ShopExtClass::updateByCondition(['shopId' => $shopId], $arr);
         //零售端暂时同步更新
         $shop = $this->shop;
         $lsShopId = $shop->lsShopId;
-        \bizHd\shop\classes\ShopExtClass::updateByCondition(['shopId' => $lsShopId], $arr);
+        ShopExtClass::updateByCondition(['shopId' => $lsShopId], $arr);
         util::complete('修改成功');
     }
 

+ 11 - 5
app-hd/controllers/ShopExtController.php

@@ -37,7 +37,7 @@ class ShopExtController extends BaseController
             if (!empty($map)) {
                 foreach ($map as $v) {
                     foreach ($v as $v1) {
-                        if(!is_numeric($v1)){
+                        if (!is_numeric($v1)) {
                             util::fail('请填写完整');
                         }
                     }
@@ -45,20 +45,26 @@ class ShopExtController extends BaseController
                 $arr['hcMap'] = json_encode($map);
             }
         }
-        if(isset($post['hsFreeKm'])){
+        if (isset($post['hsFreeKm'])) {
             $arr['hsFreeKm'] = $post['hsFreeKm'];
         }
-        if(isset($post['hsAddFee'])){
+        if (isset($post['hsAddFee'])) {
             $arr['hsAddFee'] = $post['hsAddFee'];
         }
-        if(isset($post['hcFreeKm'])){
+        if (isset($post['hcFreeKm'])) {
             $arr['hcFreeKm'] = $post['hcFreeKm'];
         }
         if (empty($arr)) {
             util::fail('没有需要修改');
         }
         $shopId = $this->shopId;
-        \bizHd\shop\classes\ShopExtClass::updateByCondition(['shopId' => $shopId], $arr);
+        ShopExtClass::updateByCondition(['shopId' => $shopId], $arr);
+        //有批发店的也要同步修改
+        $shop = $this->shop;
+        $pfShopId = $shop->pfShopId;
+        if (!empty($pfShopId)) {
+            ShopExtClass::updateByCondition(['shopId' => $pfShopId], $arr);
+        }
         util::complete('修改成功');
     }