소스 검색

获取城市数据完整列表

evoxwht 2 년 전
부모
커밋
49d3097c32
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 2
      crmeb/app/dao/shipping/SystemCityDao.php
  2. 1 1
      crmeb/app/services/shipping/SystemCityServices.php

+ 2 - 2
crmeb/app/dao/shipping/SystemCityDao.php

@@ -94,8 +94,8 @@ class SystemCityDao extends BaseDao
      * @email 442384644@qq.com
      * @date 2023/04/10
      */
-    public function fullList()
+    public function fullList($field = '*')
     {
-        return $this->getModel()->with('children')->order('id asc')->select()->toArray();
+        return $this->getModel()->with('children')->order('id asc')->field($field)->select()->toArray();
     }
 }

+ 1 - 1
crmeb/app/services/shipping/SystemCityServices.php

@@ -28,7 +28,7 @@ use crmeb\services\FormBuilder as Form;
  * @method update($id, array $data, ?string $key = null) 修改数据
  * @method value(array $where, ?string $field = '') 获取一条数据
  * @method getShippingCity() 获取运费模板城市数据
- * @method fullList() 获取城市数据完整列表
+ * @method fullList(?$field = '') 获取城市数据完整列表
  */
 class SystemCityServices extends BaseServices
 {