mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-12-25 14:36:35 +08:00
优化代码/实现基础的实名认证功能
This commit is contained in:
@@ -86,7 +86,7 @@ func (this *RegionCityDAO) FindCityWithDataId(tx *dbs.Tx, dataId string) (int64,
|
||||
|
||||
// CreateCity 创建城市
|
||||
func (this *RegionCityDAO) CreateCity(tx *dbs.Tx, provinceId int64, name string, dataId string) (int64, error) {
|
||||
op := NewRegionCityOperator()
|
||||
var op = NewRegionCityOperator()
|
||||
op.ProvinceId = provinceId
|
||||
op.Name = name
|
||||
op.DataId = dataId
|
||||
|
||||
@@ -133,7 +133,7 @@ func (this *RegionCountryDAO) FindCountryIdWithNameCacheable(tx *dbs.Tx, country
|
||||
|
||||
// CreateCountry 根据数据ID创建国家
|
||||
func (this *RegionCountryDAO) CreateCountry(tx *dbs.Tx, name string, dataId string) (int64, error) {
|
||||
op := NewRegionCountryOperator()
|
||||
var op = NewRegionCountryOperator()
|
||||
op.Name = name
|
||||
|
||||
pinyinPieces := pinyin.Pinyin(name, pinyin.NewArgs())
|
||||
|
||||
@@ -102,7 +102,7 @@ func (this *RegionProviderDAO) FindProviderIdWithNameCacheable(tx *dbs.Tx, provi
|
||||
|
||||
// CreateProvider 创建Provider
|
||||
func (this *RegionProviderDAO) CreateProvider(tx *dbs.Tx, name string) (int64, error) {
|
||||
op := NewRegionProviderOperator()
|
||||
var op = NewRegionProviderOperator()
|
||||
op.Name = name
|
||||
|
||||
codesJSON, err := json.Marshal([]string{name})
|
||||
|
||||
@@ -119,7 +119,7 @@ func (this *RegionProvinceDAO) FindProvinceIdWithNameCacheable(tx *dbs.Tx, count
|
||||
|
||||
// 创建省份
|
||||
func (this *RegionProvinceDAO) CreateProvince(tx *dbs.Tx, countryId int64, name string, dataId string) (int64, error) {
|
||||
op := NewRegionProvinceOperator()
|
||||
var op = NewRegionProvinceOperator()
|
||||
op.CountryId = countryId
|
||||
op.Name = name
|
||||
op.DataId = dataId
|
||||
|
||||
Reference in New Issue
Block a user