shish hace 5 años
padre
commit
fb3706ec71
Se han modificado 2 ficheros con 7 adiciones y 7 borrados
  1. 6 6
      biz-ghs/custom/classes/CustomClass.php
  2. 1 1
      biz/ghs/classes/GhsClass.php

+ 6 - 6
biz-ghs/custom/classes/CustomClass.php

@@ -33,7 +33,7 @@ class CustomClass extends BaseClass
         $currentPy = stringUtil::py($currentName);
         if ($applyData['style'] == SjClass::STYLE_RETAIL) {
             if ($applyData['introStyle'] == SjClass::STYLE_SUPPLIER) {
-                $custom = CustomClass::getByCondition(['ownShopId' => $applyData['introShopId'], 'shopId' => $shopId]);
+                $custom = self::getByCondition(['ownShopId' => $applyData['introShopId'], 'shopId' => $shopId]);
                 if (empty($custom)) {
                     $customData = [
                         'sjId' => $sjId,//零售商家id
@@ -50,7 +50,7 @@ class CustomClass extends BaseClass
                         'long' => $applyData['long'],
                         'lat' => $applyData['lat'],
                     ];
-                    $custom = CustomClass::addCustom($customData);
+                    $custom = self::addCustom($customData);
                 }
                 $customId = $custom['id'];
 
@@ -91,14 +91,14 @@ class CustomClass extends BaseClass
                     ];
                     $ghs = GhsClass::addGhs($ghsData);
                     $ghsId = $ghs['id'] ?? 0;
-                    CustomClass::updateById($customId, ['ghsId' => $ghsId]);
+                    self::updateById($customId, ['ghsId' => $ghsId]);
                 }
             }
         }
 
         if ($applyData['style'] == SjClass::STYLE_SUPPLIER) {
             if ($applyData['introStyle'] == SjClass::STYLE_RETAIL) {
-                $has = CustomClass::getByCondition(['ownShopId' => $shopId, 'shopId' => $applyData['introShopId']]);
+                $has = self::getByCondition(['ownShopId' => $shopId, 'shopId' => $applyData['introShopId']]);
                 $introSjId = $applyData['introSjId'] ?? 0;
                 $introShopId = $applyData['introShopId'] ?? 0;
                 if (empty($has)) {
@@ -129,7 +129,7 @@ class CustomClass extends BaseClass
                         'long' => $applyData['long'],
                         'lat' => $applyData['lat'],
                     ];
-                    $has = CustomClass::addCustom($customData);
+                    $has = self::addCustom($customData);
                 }
                 $customId = $has['id'] ?? 0;
                 $ghs = GhsClass::getByCondition(['ownShopId' => $introShopId, 'shopId' => $shopId]);
@@ -159,7 +159,7 @@ class CustomClass extends BaseClass
                     ];
                     $ghs = GhsClass::addGhs($ghsData);
                     $ghsId = $ghs['id'] ?? 0;
-                    CustomClass::updateById($customId, ['ghsId' => $ghsId]);
+                    self::updateById($customId, ['ghsId' => $ghsId]);
                 }
             }
         }

+ 1 - 1
biz/ghs/classes/GhsClass.php

@@ -25,7 +25,7 @@ class GhsClass extends BaseClass
             util::fail('没有找到供货商门店');
         }
         $thisSjId = $ghsShop['merchantId'] ?? 0;
-        $ghs = self::getByCondition(['ownSjId' => $sjId, 'sjId' => $thisSjId, 'shopId' => $thisShopId]);
+        $ghs = self::getByCondition(['ownShopId' => $shopId, 'shopId' => $thisShopId]);
         if (empty($ghs)) {
             $name = $ghsShop['merchantName'] . ' ' . $ghsShop['shopName'];
             $py = stringUtil::py($name);