area

package
v0.0.0-...-4e81a15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2017 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressAreaTree

type AddressAreaTree struct {
	Value    string            `json:"value"`
	Text     string            `json:"text"`
	Children []AddressAreaTree `json:"children"`
}

AddressAreaTree 树状地址区域结构体

type AreaDB

type AreaDB struct {
	DB *sqlx.DB
}

func (*AreaDB) GetCity

func (db *AreaDB) GetCity(cityCode string) (*City, error)

GetCity 查询市

func (*AreaDB) GetCounty

func (db *AreaDB) GetCounty(countyCode string) (*County, error)

GetCounty 查询区/县

func (*AreaDB) GetProvince

func (db *AreaDB) GetProvince(provinceCode string) (*Province, error)

GetProvince 查询省

func (*AreaDB) ListAreaTree

func (db *AreaDB) ListAreaTree() ([]AddressAreaTree, error)

ListAreaTree 获取省市区树状结构

func (*AreaDB) ListCity

func (db *AreaDB) ListCity(provinceCode string) ([]City, error)

ListCity 所有市

func (*AreaDB) ListCounty

func (db *AreaDB) ListCounty(cityCODE string) ([]County, error)

ListCounty 所有区/县

func (*AreaDB) ListProvince

func (db *AreaDB) ListProvince() ([]Province, error)

ListProvince 所有省

type AreaTx

type AreaTx struct {
	Tx *sqlx.Tx
}

type City

type City struct {
	CityCode     string `json:"cityCode,omitemtpy" db:"city_code"`
	CityName     string `json:"cityName,omitemtpy" db:"city_name"`
	ProvinceCode string `json:"provinceCode,omitemtpy" db:"province_code"`
	ProvinceName string `json:"provinceName,omitemtpy" db:"province_name"`
}

City 市

type County

type County struct {
	CountyCode   string `json:"countyCode,omitemtpy" db:"county_code"`
	CountyName   string `json:"countyName,omitemtpy" db:"county_name"`
	ProvinceCode string `json:"provinceCode,omitemtpy" db:"province_code"`
	ProvinceName string `json:"provinceName,omitemtpy" db:"province_name"`
	CityCode     string `json:"cityCode,omitemtpy" db:"city_code"`
	CityName     string `json:"cityName,omitemtpy" db:"city_name"`
}

County 区/县

type Province

type Province struct {
	ProvinceCode string `json:"provinceCode,omitemtpy" db:"province_code"`
	ProvinceName string `json:"provinceName,omitemtpy" db:"province_name"`
}

Province 省

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL