Sfoglia il codice sorgente

Merge branch 'master' of git.huaml.com:zhh/huahuibao

shizhongqi 9 mesi fa
parent
commit
68787eab21

+ 5 - 22
app-ghs/controllers/CustomController.php

@@ -873,30 +873,13 @@ class CustomController extends BaseController
         $get = Yii::$app->request->get();
         $homeAmount = $get['homeAmount'] ?? 0;
         $homeType = $get['homeType'] ?? 0;
+        $shopId = $this->shopId;
+        ShopClass::updateById($shopId, ['homeAmount' => $homeAmount, 'homeType' => $homeType]);
 
         // 批量更新客户信息
-        CustomClass::updateByCondition(
-            ['ownMainId' => $this->mainId],
-            ['homeAmount' => $homeAmount, 'homeType' => $homeType]
-        );
-
-        // 获取需要更新的供货商 ID
-        $customs = CustomClass::getAllList('ghsId', ['ownMainId' => $this->mainId]);
-        $ghsIds = [];
-        foreach ($customs as $custom) {
-            if (!empty($custom['ghsId'])) {
-                $ghsIds[] = $custom['ghsId'];
-            }
-        }
-
-        // 批量更新供货商信息
-        if (!empty($ghsIds)) {
-            GhsClass::updateByIds(
-                array_unique($ghsIds),
-                ['homeAmount' => $homeAmount, 'homeType' => $homeType]
-            );
-        }
-
+        CustomClass::updateByCondition(['ownMainId' => $this->mainId], ['homeAmount' => $homeAmount, 'homeType' => $homeType]);
+        //批量更新供货商信息
+        GhsClass::updateByCondition(['shopId' => $shopId], ['homeAmount' => $homeAmount, 'homeType' => $homeType]);
         util::complete('修改成功');
     }
 

+ 3 - 2
app-ghs/controllers/TestController.php

@@ -415,8 +415,9 @@ class TestController extends BaseController
             //['name' => '昆明小向鲜花', 'merchantNo' => '8227310599200UX', 'wx' => [811911098, 811911180], 'zfb' => '2088970555233957'],
             //['name' => '惠安花优美', 'merchantNo' => '8223970599200DP', 'wx' => [811651765, 811651866], 'zfb' => '2088970528927690'],
             //['name' => '小榄淘花里', 'merchantNo' => '8226030599200A2', 'wx' => [809357489, 809358311], 'zfb' => '2088970343842282'],
-            ['name' => '泉州馨喜鲜花批发', 'merchantNo' => '8223970599200EC', 'wx' => [818293487, 818293387], 'zfb' => '2088080143950734'],
-            ['name' => '广州王艺百合', 'merchantNo' => '8225810599201FZ', 'wx' => [817598762, 817598757], 'zfb' => '2088080092969250'],
+            //['name' => '泉州馨喜鲜花批发', 'merchantNo' => '8223970599200EC', 'wx' => [818293487, 818293387], 'zfb' => '2088080143950734'],
+            //['name' => '广州王艺百合', 'merchantNo' => '8225810599201FZ', 'wx' => [817598762, 817598757], 'zfb' => '2088080092969250'],
+            //['name' => '广州鑫源花卉批发', 'merchantNo' => '8225810599201G3', 'wx' => [819164143, 819164039], 'zfb' => '2088080202837723'],
             ['name' => '深圳鼎盛皇室花卉', 'merchantNo' => '8225840599201MF', 'wx' => [807078304, 807076486], 'zfb' => '2088970117746334'],
             //['name' => '东莞惠雅鲜花(莞城店)', 'merchantNo' => '8226020599200GJ', 'wx' => [796953190, 796976959], 'zfb' => '2088770940104912'],
             //['name' => '东莞惠雅鲜花(南城店)', 'merchantNo' => '8226020599200JK', 'wx' => [802315656, 802315755], 'zfb' => '2088870583889365'],

+ 1 - 1
biz-hd/purchase/classes/PurchaseClass.php

@@ -481,7 +481,7 @@ class PurchaseClass extends BaseClass
         $fee = $result['est_fee'] ?? 0;
         $totalFee = sprintf("%.1f", ($fee / 100));
 
-        noticeUtil::push("批发订单,获取运费:{$totalFee} 重量:{$weight} 距离:{$showDistance} 客户名:{$customMobile} 手机号 {$customMobile} 经纬 {$shopLong} {$shopLat} 金额:{$price} 数量:{$packageNum}", '15280215347');
+        //noticeUtil::push("批发订单,获取运费:{$totalFee} 重量:{$weight} 距离:{$showDistance} 客户名:{$customMobile} 手机号 {$customMobile} 经纬 {$shopLong} {$shopLat} 金额:{$price} 数量:{$packageNum}", '15280215347');
 
         return ['distance' => $distance, 'showDistance' => $showDistance, 'fee' => $totalFee];
     }