Browse Source

feat(basic-service): 修改查询店铺信息方法支持可选参数

runphp 6 months ago
parent
commit
9202f21afd
1 changed files with 6 additions and 4 deletions
  1. 6 4
      src/Services/BasicService.php

+ 6 - 4
src/Services/BasicService.php

@@ -14,11 +14,13 @@ class BasicService extends BaseService
     /**
     /**
      * Query shop information
      * Query shop information
      */
      */
-    public function queryShop(string $shopNo): ApiResponse
+    public function queryShop(?string $shopNo = null): ApiResponse
     {
     {
-        return $this->call('shop.php', [
-            'shop_no' => $shopNo,
-        ]);
+        $params = [];
+        if ($shopNo !== null) {
+            $params['shop_no'] = $shopNo;
+        }
+        return $this->call('shop.php', $params);
     }
     }
 
 
     /**
     /**