删除api私有地区模型,并移到common
This commit is contained in:
parent
074cd8949b
commit
dac8701e95
@ -1,26 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @date :2023年03月2日
|
||||
* @author:刘孝全
|
||||
* @email:q8197264@126.com
|
||||
*
|
||||
* @ 地区联动模型
|
||||
*/
|
||||
namespace app\api\model;
|
||||
|
||||
use think\model;
|
||||
|
||||
class GeoArea extends Model
|
||||
{
|
||||
protected $table = "fa_geo_area";
|
||||
|
||||
static function Get($pcode){
|
||||
$list = self::where(['switch'=>1,'city_code'=>$pcode])
|
||||
->field('area_id id,area_code code,area_name name')
|
||||
->select();
|
||||
|
||||
return $list;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @date :2023年03月2日
|
||||
* @author:刘孝全
|
||||
* @email:q8197264@126.com
|
||||
*
|
||||
* @ 地区联动 - 大队
|
||||
*/
|
||||
namespace app\api\model;
|
||||
|
||||
use think\model;
|
||||
|
||||
class GeoBrigade extends Model
|
||||
{
|
||||
protected $table="fa_geo_brigade";
|
||||
|
||||
static function Get(){
|
||||
$res = self::select();
|
||||
|
||||
return $res;
|
||||
}
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @date :2023年03月2日
|
||||
* @author:刘孝全
|
||||
* @email:q8197264@126.com
|
||||
*
|
||||
* @ 地区联动模型
|
||||
*/
|
||||
namespace app\api\model;
|
||||
|
||||
use think\model;
|
||||
|
||||
class GeoCity extends Model {
|
||||
protected $table = "fa_geo_city";
|
||||
|
||||
static function Get($pcode){
|
||||
$list = self::where(['switch'=>1,'province_code'=>$pcode])
|
||||
->field('city_id id,city_code code,city_name name')
|
||||
->select();
|
||||
|
||||
return $list;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @date :2023年03月2日
|
||||
* @author:刘孝全
|
||||
* @email:q8197264@126.com
|
||||
*
|
||||
* @ 地区联动模型
|
||||
*/
|
||||
namespace app\api\model;
|
||||
|
||||
use think\model;
|
||||
|
||||
class GeoProvince extends Model {
|
||||
protected $table = "fa_geo_province";
|
||||
|
||||
// public function test(){
|
||||
// return $this->belongsToMany(User::class,'fa_geo_city','user_id','role_id');
|
||||
// }
|
||||
|
||||
/**
|
||||
* 省
|
||||
*/
|
||||
static function Get(){
|
||||
$res = self::where(['switch'=>1])
|
||||
->field('province_id id,province_code code,province_name name')
|
||||
->select();
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @date :2023年03月2日
|
||||
* @author:刘孝全
|
||||
* @email:q8197264@126.com
|
||||
*
|
||||
* @ 地区联动模型
|
||||
*/
|
||||
namespace app\api\model;
|
||||
|
||||
use think\model;
|
||||
|
||||
class GeoStreet extends Model{
|
||||
protected $table = "fa_geo_street";
|
||||
|
||||
static function Get($pcode) {
|
||||
$list = self::where(['switch'=>1,'area_code'=>$pcode])
|
||||
->field('street_id id,street_code code,street_name name')
|
||||
->select();
|
||||
|
||||
return $list;
|
||||
}
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @date :2023年03月2日
|
||||
* @author:刘孝全
|
||||
* @email:q8197264@126.com
|
||||
*
|
||||
* @ 地区联动模型
|
||||
*/
|
||||
namespace app\api\model;
|
||||
|
||||
use think\model;
|
||||
|
||||
|
||||
class GeoVillage extends Model
|
||||
{
|
||||
protected $table = "fa_geo_village";
|
||||
|
||||
static function Get($pcode) {
|
||||
$list = self::where(['switch'=>1,'street_code'=>$pcode])
|
||||
->field('village_id id,village_code code,village_name name')
|
||||
->select();
|
||||
|
||||
return $list;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user