regions

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RegionCityStateEnabled  = 1 // 已启用
	RegionCityStateDisabled = 0 // 已禁用
)
View Source
const (
	RegionCityField_Id          dbs.FieldName = "id"          // ID
	RegionCityField_ValueId     dbs.FieldName = "valueId"     // 实际ID
	RegionCityField_ProvinceId  dbs.FieldName = "provinceId"  // 省份ID
	RegionCityField_Name        dbs.FieldName = "name"        // 名称
	RegionCityField_Codes       dbs.FieldName = "codes"       // 代号
	RegionCityField_CustomName  dbs.FieldName = "customName"  // 自定义名称
	RegionCityField_CustomCodes dbs.FieldName = "customCodes" // 自定义代号
	RegionCityField_State       dbs.FieldName = "state"       // 状态
	RegionCityField_DataId      dbs.FieldName = "dataId"      // 原始数据ID
)
View Source
const (
	RegionCountryStateEnabled  = 1 // 已启用
	RegionCountryStateDisabled = 0 // 已禁用
)
View Source
const (
	RegionCountryField_Id          dbs.FieldName = "id"          // ID
	RegionCountryField_ValueId     dbs.FieldName = "valueId"     // 实际ID
	RegionCountryField_ValueCode   dbs.FieldName = "valueCode"   // 值代号
	RegionCountryField_Name        dbs.FieldName = "name"        // 名称
	RegionCountryField_Codes       dbs.FieldName = "codes"       // 代号
	RegionCountryField_CustomName  dbs.FieldName = "customName"  // 自定义名称
	RegionCountryField_CustomCodes dbs.FieldName = "customCodes" // 自定义代号
	RegionCountryField_State       dbs.FieldName = "state"       // 状态
	RegionCountryField_DataId      dbs.FieldName = "dataId"      // 原始数据ID
	RegionCountryField_Pinyin      dbs.FieldName = "pinyin"      // 拼音
	RegionCountryField_IsCommon    dbs.FieldName = "isCommon"    // 是否常用
	RegionCountryField_RouteCode   dbs.FieldName = "routeCode"   // 线路代号
)
View Source
const (
	RegionProviderStateEnabled  = 1 // 已启用
	RegionProviderStateDisabled = 0 // 已禁用
)
View Source
const (
	RegionProviderField_Id          dbs.FieldName = "id"          // ID
	RegionProviderField_ValueId     dbs.FieldName = "valueId"     // 实际ID
	RegionProviderField_Name        dbs.FieldName = "name"        // 名称
	RegionProviderField_Codes       dbs.FieldName = "codes"       // 代号
	RegionProviderField_CustomName  dbs.FieldName = "customName"  // 自定义名称
	RegionProviderField_CustomCodes dbs.FieldName = "customCodes" // 自定义代号
	RegionProviderField_State       dbs.FieldName = "state"       // 状态
)
View Source
const (
	RegionProvinceStateEnabled  = 1 // 已启用
	RegionProvinceStateDisabled = 0 // 已禁用
)
View Source
const (
	RegionProvinceField_Id          dbs.FieldName = "id"          // ID
	RegionProvinceField_ValueId     dbs.FieldName = "valueId"     // 实际ID
	RegionProvinceField_CountryId   dbs.FieldName = "countryId"   // 国家ID
	RegionProvinceField_Name        dbs.FieldName = "name"        // 名称
	RegionProvinceField_Codes       dbs.FieldName = "codes"       // 代号
	RegionProvinceField_CustomName  dbs.FieldName = "customName"  // 自定义名称
	RegionProvinceField_CustomCodes dbs.FieldName = "customCodes" // 自定义代号
	RegionProvinceField_State       dbs.FieldName = "state"       // 状态
	RegionProvinceField_DataId      dbs.FieldName = "dataId"      // 原始数据ID
	RegionProvinceField_RouteCode   dbs.FieldName = "routeCode"   // 线路代号
)
View Source
const (
	RegionTownStateEnabled  = 1 // 已启用
	RegionTownStateDisabled = 0 // 已禁用
)
View Source
const (
	RegionTownField_Id          dbs.FieldName = "id"          // ID
	RegionTownField_ValueId     dbs.FieldName = "valueId"     // 真实ID
	RegionTownField_CityId      dbs.FieldName = "cityId"      // 城市ID
	RegionTownField_Name        dbs.FieldName = "name"        // 名称
	RegionTownField_Codes       dbs.FieldName = "codes"       // 代号
	RegionTownField_CustomName  dbs.FieldName = "customName"  // 自定义名称
	RegionTownField_CustomCodes dbs.FieldName = "customCodes" // 自定义代号
	RegionTownField_State       dbs.FieldName = "state"       // 状态
	RegionTownField_DataId      dbs.FieldName = "dataId"      // 原始数据ID
)

Variables

View Source
var RegionProvinceSuffixes = []string{"省", "州", "区", "大区", "特区", "港", "岛", "环礁", "谷地", "山", "口岸", "郡", "县", "城", "河", "河畔", "市"}
View Source
var SharedCacheLocker = sync.RWMutex{}

Functions

This section is empty.

Types

type RegionCity

type RegionCity struct {
	Id1         uint32   `field:"id"`          // ID
	ValueId     uint32   `field:"valueId"`     // 实际ID
	ProvinceId  uint32   `field:"provinceId"`  // 省份ID
	Name        string   `field:"name"`        // 名称
	Codes       dbs.JSON `field:"codes"`       // 代号
	CustomName  string   `field:"customName"`  // 自定义名称
	CustomCodes dbs.JSON `field:"customCodes"` // 自定义代号
	State       uint8    `field:"state"`       // 状态
	DataId      string   `field:"dataId"`      // 原始数据ID
}

RegionCity 区域-城市

func (*RegionCity) AllCodes added in v0.5.0

func (this *RegionCity) AllCodes() []string

func (*RegionCity) DecodeCodes

func (this *RegionCity) DecodeCodes() []string

func (*RegionCity) DecodeCustomCodes added in v0.5.0

func (this *RegionCity) DecodeCustomCodes() []string

func (*RegionCity) DisplayName added in v0.5.0

func (this *RegionCity) DisplayName() string

type RegionCityDAO

type RegionCityDAO dbs.DAO
var SharedRegionCityDAO *RegionCityDAO

func NewRegionCityDAO

func NewRegionCityDAO() *RegionCityDAO

func (*RegionCityDAO) CreateCity

func (this *RegionCityDAO) CreateCity(tx *dbs.Tx, provinceId int64, name string, dataId string) (int64, error)

CreateCity 创建城市

func (*RegionCityDAO) DisableRegionCity

func (this *RegionCityDAO) DisableRegionCity(tx *dbs.Tx, id uint32) error

DisableRegionCity 禁用条目

func (*RegionCityDAO) EnableRegionCity

func (this *RegionCityDAO) EnableRegionCity(tx *dbs.Tx, id uint32) error

EnableRegionCity 启用条目

func (*RegionCityDAO) FindAllEnabledCities

func (this *RegionCityDAO) FindAllEnabledCities(tx *dbs.Tx) (result []*RegionCity, err error)

FindAllEnabledCities 获取所有城市信息

func (*RegionCityDAO) FindAllEnabledCitiesWithProvinceId added in v0.5.0

func (this *RegionCityDAO) FindAllEnabledCitiesWithProvinceId(tx *dbs.Tx, provinceId int64) (result []*RegionCity, err error)

FindAllEnabledCitiesWithProvinceId 获取某个省份下的所有城市

func (*RegionCityDAO) FindCityIdWithName added in v0.5.0

func (this *RegionCityDAO) FindCityIdWithName(tx *dbs.Tx, provinceId int64, cityName string) (int64, error)

FindCityIdWithName 根据城市名查找城市ID

func (*RegionCityDAO) FindCityWithDataId

func (this *RegionCityDAO) FindCityWithDataId(tx *dbs.Tx, dataId string) (int64, error)

FindCityWithDataId 根据数据ID查找城市

func (*RegionCityDAO) FindEnabledRegionCity

func (this *RegionCityDAO) FindEnabledRegionCity(tx *dbs.Tx, id int64) (*RegionCity, error)

FindEnabledRegionCity 查找启用中的条目

func (*RegionCityDAO) FindRegionCityName

func (this *RegionCityDAO) FindRegionCityName(tx *dbs.Tx, id uint32) (string, error)

FindRegionCityName 根据主键查找名称

func (*RegionCityDAO) FindSimilarCities added in v0.5.0

func (this *RegionCityDAO) FindSimilarCities(cities []*RegionCity, cityName string, size int) (result []*RegionCity)

FindSimilarCities 查找类似城市名

func (*RegionCityDAO) UpdateCityCustom added in v0.5.0

func (this *RegionCityDAO) UpdateCityCustom(tx *dbs.Tx, cityId int64, customName string, customCodes []string) error

UpdateCityCustom 自定义城市信息

type RegionCityOperator

type RegionCityOperator struct {
	Id          any // ID
	ValueId     any // 实际ID
	ProvinceId  any // 省份ID
	Name        any // 名称
	Codes       any // 代号
	CustomName  any // 自定义名称
	CustomCodes any // 自定义代号
	State       any // 状态
	DataId      any // 原始数据ID
}

func NewRegionCityOperator

func NewRegionCityOperator() *RegionCityOperator

type RegionCountry

type RegionCountry struct {
	Id          uint32   `field:"id"`          // ID
	ValueId     uint32   `field:"valueId"`     // 实际ID
	ValueCode   string   `field:"valueCode"`   // 值代号
	Name        string   `field:"name"`        // 名称
	Codes       dbs.JSON `field:"codes"`       // 代号
	CustomName  string   `field:"customName"`  // 自定义名称
	CustomCodes dbs.JSON `field:"customCodes"` // 自定义代号
	State       uint8    `field:"state"`       // 状态
	DataId      string   `field:"dataId"`      // 原始数据ID
	Pinyin      dbs.JSON `field:"pinyin"`      // 拼音
	IsCommon    bool     `field:"isCommon"`    // 是否常用
	RouteCode   string   `field:"routeCode"`   // 线路代号
}

RegionCountry 区域-国家/地区

func (*RegionCountry) AllCodes added in v0.5.0

func (this *RegionCountry) AllCodes() []string

func (*RegionCountry) DecodeCodes

func (this *RegionCountry) DecodeCodes() []string

func (*RegionCountry) DecodeCustomCodes added in v0.5.0

func (this *RegionCountry) DecodeCustomCodes() []string

func (*RegionCountry) DisplayName added in v0.5.0

func (this *RegionCountry) DisplayName() string

type RegionCountryDAO

type RegionCountryDAO dbs.DAO
var SharedRegionCountryDAO *RegionCountryDAO

func NewRegionCountryDAO

func NewRegionCountryDAO() *RegionCountryDAO

func (*RegionCountryDAO) CreateCountry

func (this *RegionCountryDAO) CreateCountry(tx *dbs.Tx, name string, dataId string) (int64, error)

CreateCountry 根据数据ID创建国家

func (*RegionCountryDAO) DisableRegionCountry

func (this *RegionCountryDAO) DisableRegionCountry(tx *dbs.Tx, id int64) error

DisableRegionCountry 禁用条目

func (*RegionCountryDAO) EnableRegionCountry

func (this *RegionCountryDAO) EnableRegionCountry(tx *dbs.Tx, id uint32) error

EnableRegionCountry 启用条目

func (*RegionCountryDAO) FindAllCountries added in v0.5.0

func (this *RegionCountryDAO) FindAllCountries(tx *dbs.Tx) (result []*RegionCountry, err error)

FindAllCountries 查找所有可用的国家

func (*RegionCountryDAO) FindAllEnabledCountriesOrderByPinyin

func (this *RegionCountryDAO) FindAllEnabledCountriesOrderByPinyin(tx *dbs.Tx) (result []*RegionCountry, err error)

FindAllEnabledCountriesOrderByPinyin 查找所有可用的国家并按拼音排序

func (*RegionCountryDAO) FindCountryIdWithDataId

func (this *RegionCountryDAO) FindCountryIdWithDataId(tx *dbs.Tx, dataId string) (int64, error)

FindCountryIdWithDataId 根据数据ID查找国家

func (*RegionCountryDAO) FindCountryIdWithName

func (this *RegionCountryDAO) FindCountryIdWithName(tx *dbs.Tx, countryName string) (int64, error)

FindCountryIdWithName 根据国家名查找国家ID

func (*RegionCountryDAO) FindEnabledRegionCountry

func (this *RegionCountryDAO) FindEnabledRegionCountry(tx *dbs.Tx, id int64) (*RegionCountry, error)

FindEnabledRegionCountry 查找启用中的条目

func (*RegionCountryDAO) FindRegionCountryName

func (this *RegionCountryDAO) FindRegionCountryName(tx *dbs.Tx, id int64) (string, error)

FindRegionCountryName 根据主键查找名称

func (*RegionCountryDAO) FindRegionCountryRouteCode added in v1.3.4

func (this *RegionCountryDAO) FindRegionCountryRouteCode(tx *dbs.Tx, countryId int64) (string, error)

FindRegionCountryRouteCode 查找国家|地区线路代号

func (*RegionCountryDAO) FindSimilarCountries added in v0.5.0

func (this *RegionCountryDAO) FindSimilarCountries(countries []*RegionCountry, countryName string, size int) (result []*RegionCountry)

FindSimilarCountries 查找类似国家/地区名

func (*RegionCountryDAO) UpdateCountryCustom added in v0.5.0

func (this *RegionCountryDAO) UpdateCountryCustom(tx *dbs.Tx, countryId int64, customName string, customCodes []string) error

UpdateCountryCustom 修改国家/地区自定义

type RegionCountryOperator

type RegionCountryOperator struct {
	Id          any // ID
	ValueId     any // 实际ID
	ValueCode   any // 值代号
	Name        any // 名称
	Codes       any // 代号
	CustomName  any // 自定义名称
	CustomCodes any // 自定义代号
	State       any // 状态
	DataId      any // 原始数据ID
	Pinyin      any // 拼音
	IsCommon    any // 是否常用
	RouteCode   any // 线路代号
}

func NewRegionCountryOperator

func NewRegionCountryOperator() *RegionCountryOperator

type RegionProvider

type RegionProvider struct {
	Id1         uint32   `field:"id"`          // ID
	ValueId     uint32   `field:"valueId"`     // 实际ID
	Name        string   `field:"name"`        // 名称
	Codes       dbs.JSON `field:"codes"`       // 代号
	CustomName  string   `field:"customName"`  // 自定义名称
	CustomCodes dbs.JSON `field:"customCodes"` // 自定义代号
	State       uint8    `field:"state"`       // 状态
}

RegionProvider 区域-运营商

func (*RegionProvider) AllCodes added in v0.5.0

func (this *RegionProvider) AllCodes() []string

func (*RegionProvider) DecodeCodes

func (this *RegionProvider) DecodeCodes() []string

func (*RegionProvider) DecodeCustomCodes added in v0.5.0

func (this *RegionProvider) DecodeCustomCodes() []string

func (*RegionProvider) DisplayName added in v0.5.0

func (this *RegionProvider) DisplayName() string

type RegionProviderDAO

type RegionProviderDAO dbs.DAO
var SharedRegionProviderDAO *RegionProviderDAO

func NewRegionProviderDAO

func NewRegionProviderDAO() *RegionProviderDAO

func (*RegionProviderDAO) CreateProvider

func (this *RegionProviderDAO) CreateProvider(tx *dbs.Tx, name string) (int64, error)

CreateProvider 创建Provider

func (*RegionProviderDAO) DisableRegionProvider

func (this *RegionProviderDAO) DisableRegionProvider(tx *dbs.Tx, id uint32) error

DisableRegionProvider 禁用条目

func (*RegionProviderDAO) EnableRegionProvider

func (this *RegionProviderDAO) EnableRegionProvider(tx *dbs.Tx, id uint32) error

EnableRegionProvider 启用条目

func (*RegionProviderDAO) FindAllEnabledProviders

func (this *RegionProviderDAO) FindAllEnabledProviders(tx *dbs.Tx) (result []*RegionProvider, err error)

FindAllEnabledProviders 查找所有服务商

func (*RegionProviderDAO) FindEnabledRegionProvider

func (this *RegionProviderDAO) FindEnabledRegionProvider(tx *dbs.Tx, id int64) (*RegionProvider, error)

FindEnabledRegionProvider 查找启用中的条目

func (*RegionProviderDAO) FindProviderIdWithName added in v0.5.0

func (this *RegionProviderDAO) FindProviderIdWithName(tx *dbs.Tx, providerName string) (int64, error)

FindProviderIdWithName 根据服务商名称查找服务商ID

func (*RegionProviderDAO) FindRegionProviderName

func (this *RegionProviderDAO) FindRegionProviderName(tx *dbs.Tx, id uint32) (string, error)

FindRegionProviderName 根据主键查找名称

func (*RegionProviderDAO) FindSimilarProviders added in v0.5.0

func (this *RegionProviderDAO) FindSimilarProviders(providers []*RegionProvider, providerName string, size int) (result []*RegionProvider)

FindSimilarProviders 查找类似ISP运营商

func (*RegionProviderDAO) UpdateProviderCustom added in v0.5.0

func (this *RegionProviderDAO) UpdateProviderCustom(tx *dbs.Tx, providerId int64, customName string, customCodes []string) error

UpdateProviderCustom 修改ISP自定义信息

type RegionProviderOperator

type RegionProviderOperator struct {
	Id          any // ID
	ValueId     any // 实际ID
	Name        any // 名称
	Codes       any // 代号
	CustomName  any // 自定义名称
	CustomCodes any // 自定义代号
	State       any // 状态
}

func NewRegionProviderOperator

func NewRegionProviderOperator() *RegionProviderOperator

type RegionProvince

type RegionProvince struct {
	Id          uint32   `field:"id"`          // ID
	ValueId     uint32   `field:"valueId"`     // 实际ID
	CountryId   uint32   `field:"countryId"`   // 国家ID
	Name        string   `field:"name"`        // 名称
	Codes       dbs.JSON `field:"codes"`       // 代号
	CustomName  string   `field:"customName"`  // 自定义名称
	CustomCodes dbs.JSON `field:"customCodes"` // 自定义代号
	State       uint8    `field:"state"`       // 状态
	DataId      string   `field:"dataId"`      // 原始数据ID
	RouteCode   string   `field:"routeCode"`   // 线路代号
}

RegionProvince 区域-省份

func (*RegionProvince) AllCodes added in v0.5.0

func (this *RegionProvince) AllCodes() []string

func (*RegionProvince) DecodeCodes

func (this *RegionProvince) DecodeCodes() []string

func (*RegionProvince) DecodeCustomCodes added in v0.5.0

func (this *RegionProvince) DecodeCustomCodes() []string

func (*RegionProvince) DisplayName added in v0.5.0

func (this *RegionProvince) DisplayName() string

type RegionProvinceDAO

type RegionProvinceDAO dbs.DAO
var SharedRegionProvinceDAO *RegionProvinceDAO

func NewRegionProvinceDAO

func NewRegionProvinceDAO() *RegionProvinceDAO

func (*RegionProvinceDAO) CreateProvince

func (this *RegionProvinceDAO) CreateProvince(tx *dbs.Tx, countryId int64, name string, dataId string) (int64, error)

CreateProvince 创建省份

func (*RegionProvinceDAO) DisableRegionProvince

func (this *RegionProvinceDAO) DisableRegionProvince(tx *dbs.Tx, id int64) error

DisableRegionProvince 禁用条目

func (*RegionProvinceDAO) EnableRegionProvince

func (this *RegionProvinceDAO) EnableRegionProvince(tx *dbs.Tx, id int64) error

EnableRegionProvince 启用条目

func (*RegionProvinceDAO) FindAllEnabledProvinces added in v0.5.0

func (this *RegionProvinceDAO) FindAllEnabledProvinces(tx *dbs.Tx) (result []*RegionProvince, err error)

FindAllEnabledProvinces 查找所有省份

func (*RegionProvinceDAO) FindAllEnabledProvincesWithCountryId

func (this *RegionProvinceDAO) FindAllEnabledProvincesWithCountryId(tx *dbs.Tx, countryId int64) (result []*RegionProvince, err error)

FindAllEnabledProvincesWithCountryId 查找某个国家/地区的所有省份

func (*RegionProvinceDAO) FindEnabledRegionProvince

func (this *RegionProvinceDAO) FindEnabledRegionProvince(tx *dbs.Tx, id int64) (*RegionProvince, error)

FindEnabledRegionProvince 查找启用中的条目

func (*RegionProvinceDAO) FindProvinceIdWithDataId

func (this *RegionProvinceDAO) FindProvinceIdWithDataId(tx *dbs.Tx, dataId string) (int64, error)

FindProvinceIdWithDataId 根据数据ID查找省份

func (*RegionProvinceDAO) FindProvinceIdWithName

func (this *RegionProvinceDAO) FindProvinceIdWithName(tx *dbs.Tx, countryId int64, provinceName string) (int64, error)

FindProvinceIdWithName 根据省份名查找省份ID

func (*RegionProvinceDAO) FindRegionCountryId added in v1.3.4

func (this *RegionProvinceDAO) FindRegionCountryId(tx *dbs.Tx, provinceId int64) (int64, error)

FindRegionCountryId 获取省份对应的国家|地区

func (*RegionProvinceDAO) FindRegionProvinceName

func (this *RegionProvinceDAO) FindRegionProvinceName(tx *dbs.Tx, id int64) (string, error)

FindRegionProvinceName 根据主键查找名称

func (*RegionProvinceDAO) FindSimilarProvinces added in v0.5.0

func (this *RegionProvinceDAO) FindSimilarProvinces(provinces []*RegionProvince, provinceName string, size int) (result []*RegionProvince)

FindSimilarProvinces 查找类似省份名

func (*RegionProvinceDAO) UpdateProvinceCustom added in v0.5.0

func (this *RegionProvinceDAO) UpdateProvinceCustom(tx *dbs.Tx, provinceId int64, customName string, customCodes []string) error

UpdateProvinceCustom 修改自定义省份信息

type RegionProvinceOperator

type RegionProvinceOperator struct {
	Id          any // ID
	ValueId     any // 实际ID
	CountryId   any // 国家ID
	Name        any // 名称
	Codes       any // 代号
	CustomName  any // 自定义名称
	CustomCodes any // 自定义代号
	State       any // 状态
	DataId      any // 原始数据ID
	RouteCode   any // 线路代号
}

func NewRegionProvinceOperator

func NewRegionProvinceOperator() *RegionProvinceOperator

type RegionTown added in v0.5.0

type RegionTown struct {
	Id1         uint32   `field:"id"`          // ID
	ValueId     uint32   `field:"valueId"`     // 真实ID
	CityId      uint32   `field:"cityId"`      // 城市ID
	Name        string   `field:"name"`        // 名称
	Codes       dbs.JSON `field:"codes"`       // 代号
	CustomName  string   `field:"customName"`  // 自定义名称
	CustomCodes dbs.JSON `field:"customCodes"` // 自定义代号
	State       uint8    `field:"state"`       // 状态
	DataId      string   `field:"dataId"`      // 原始数据ID
}

RegionTown 区域-省份

func (*RegionTown) AllCodes added in v0.5.0

func (this *RegionTown) AllCodes() []string

func (*RegionTown) DecodeCodes added in v0.5.0

func (this *RegionTown) DecodeCodes() []string

func (*RegionTown) DecodeCustomCodes added in v0.5.0

func (this *RegionTown) DecodeCustomCodes() []string

func (*RegionTown) DisplayName added in v0.5.0

func (this *RegionTown) DisplayName() string

type RegionTownDAO added in v0.5.0

type RegionTownDAO dbs.DAO
var SharedRegionTownDAO *RegionTownDAO

func NewRegionTownDAO added in v0.5.0

func NewRegionTownDAO() *RegionTownDAO

func (*RegionTownDAO) CreateTown added in v0.5.2

func (this *RegionTownDAO) CreateTown(tx *dbs.Tx, cityId int64, townName string) (int64, error)

CreateTown 创建区县

func (*RegionTownDAO) DisableRegionTown added in v0.5.0

func (this *RegionTownDAO) DisableRegionTown(tx *dbs.Tx, id uint32) error

DisableRegionTown 禁用条目

func (*RegionTownDAO) EnableRegionTown added in v0.5.0

func (this *RegionTownDAO) EnableRegionTown(tx *dbs.Tx, id uint32) error

EnableRegionTown 启用条目

func (*RegionTownDAO) FindAllRegionTowns added in v0.5.0

func (this *RegionTownDAO) FindAllRegionTowns(tx *dbs.Tx) (result []*RegionTown, err error)

FindAllRegionTowns 获取所有的区县

func (*RegionTownDAO) FindAllRegionTownsWithCityId added in v0.5.0

func (this *RegionTownDAO) FindAllRegionTownsWithCityId(tx *dbs.Tx, cityId int64) (result []*RegionTown, err error)

FindAllRegionTownsWithCityId 根据城市查找区县

func (*RegionTownDAO) FindEnabledRegionTown added in v0.5.0

func (this *RegionTownDAO) FindEnabledRegionTown(tx *dbs.Tx, id int64) (*RegionTown, error)

FindEnabledRegionTown 查找启用中的区县

func (*RegionTownDAO) FindRegionTownName added in v0.5.0

func (this *RegionTownDAO) FindRegionTownName(tx *dbs.Tx, id uint32) (string, error)

FindRegionTownName 根据主键查找名称

func (*RegionTownDAO) FindSimilarTowns added in v0.5.0

func (this *RegionTownDAO) FindSimilarTowns(towns []*RegionTown, townName string, size int) (result []*RegionTown)

FindSimilarTowns 查找类似区县

func (*RegionTownDAO) FindTownIdWithName added in v0.5.0

func (this *RegionTownDAO) FindTownIdWithName(tx *dbs.Tx, cityId int64, townName string) (int64, error)

FindTownIdWithName 根据区县名查找区县ID

func (*RegionTownDAO) UpdateTownCustom added in v0.5.0

func (this *RegionTownDAO) UpdateTownCustom(tx *dbs.Tx, townId int64, customName string, customCodes []string) error

UpdateTownCustom 修改自定义县级信息

type RegionTownOperator added in v0.5.0

type RegionTownOperator struct {
	Id          any // ID
	ValueId     any // 真实ID
	CityId      any // 城市ID
	Name        any // 名称
	Codes       any // 代号
	CustomName  any // 自定义名称
	CustomCodes any // 自定义代号
	State       any // 状态
	DataId      any // 原始数据ID
}

func NewRegionTownOperator added in v0.5.0

func NewRegionTownOperator() *RegionTownOperator

Jump to

Keyboard shortcuts

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