优化代码

This commit is contained in:
刘祥超
2022-01-06 11:13:36 +08:00
parent facd5e14cc
commit 3981308083
13 changed files with 52 additions and 20 deletions

View File

@@ -43,14 +43,14 @@ func (this *ProvincesAction) RunGet(params struct {
}
provincesResp, err := this.RPC().RegionProvinceRPC().FindAllEnabledRegionProvincesWithCountryId(this.AdminContext(), &pb.FindAllEnabledRegionProvincesWithCountryIdRequest{
CountryId: int64(ChinaCountryId),
RegionCountryId: int64(ChinaCountryId),
})
if err != nil {
this.ErrorPage(err)
return
}
provinceMaps := []maps.Map{}
for _, province := range provincesResp.Provinces {
for _, province := range provincesResp.RegionProvinces {
provinceMaps = append(provinceMaps, maps.Map{
"id": province.Id,
"name": province.Name,