Kaynağa Gözat

创建分店

shish 5 yıl önce
ebeveyn
işleme
ab4071b17b

+ 6 - 0
biz/shop/classes/ShopClass.php

@@ -91,6 +91,12 @@ class ShopClass extends BaseClass
         }
         $shop = self::add($data, true);
         $newShopId = $shop->id;
+
+        $extData = [
+            'shopId' => $newShopId,
+        ];
+        ShopExtClass::add($extData);
+
         //初始化花材 linqh 2021.5.11
         $adminId = $data['adminId'] ?? 0;
         $shopId = $data['shopId'] ?? 0;

+ 1 - 5
biz/sj/services/MerchantService.php

@@ -2,7 +2,6 @@
 
 namespace biz\sj\services;
 
-use biz\shop\classes\ShopExtClass;
 use biz\sj\classes\SjClass;
 use biz\wx\classes\WxMessageClass;
 use bizGhs\custom\services\CustomService;
@@ -173,10 +172,7 @@ class MerchantService extends BaseService
         ];
         $shopRespond = \biz\shop\classes\ShopClass::addShop($shopData);
         $shopId = $shopRespond->id;
-        $extData = [
-            'shopId' => $shopId,
-        ];
-        ShopExtClass::add($extData);
+
 
         //供应商添加客户时暂时先不初始化
         if (isset($applyData['replace']) == false || $applyData['replace'] != 1) {