shish 4 hónapja
szülő
commit
e76cdb8b59
1 módosított fájl, 5 hozzáadás és 7 törlés
  1. 5 7
      app-hd/controllers/GhsController.php

+ 5 - 7
app-hd/controllers/GhsController.php

@@ -12,6 +12,7 @@ use bizHd\shop\classes\ShopExtClass;
 use bizGhs\stat\classes\StatVisitClass;
 use common\components\dict;
 use common\components\imgUtil;
+use common\components\mapUtil;
 use common\components\qrCodeUtil;
 use common\components\stringUtil;
 use common\components\util;
@@ -454,17 +455,14 @@ class GhsController extends BaseController
 
         if ($locationType == 'wgs84') {
             // WGS84 → GCJ-02 转换
-            $re = \common\components\mapUtil::wgs84ToGcj02($toLnt, $toLat);
+            $re = mapUtil::wgs84ToGcj02($toLnt, $toLat);
             $toLat = $re['lat'];
             $toLnt = $re['lng'];
         }
 
-        $where = [];
-        $where['ownShopId'] = $this->shopId;
-        $where['delStatus'] = 0;
-        $gs = GhsClass::getAllList('*', $where, 'inTurn DESC, addTime ASC');
-        if(!empty($gs)){
-            util::fail('已有批发商,不使用定位获取附近批发商');
+        $gs = GhsClass::getByCondition(['ownShopId' => $this->shopId], true);
+        if (!empty($gs)) {
+            util::fail('已有批发商了');
         }
 
         // 找出附近批发店,之后自动给建立关系,然后补充二个店之间的距离