相关区域名称可以显示别名

This commit is contained in:
刘祥超
2022-08-23 19:15:44 +08:00
parent 5a8e281fb1
commit 20b89a8ddd
12 changed files with 20 additions and 20 deletions

View File

@@ -55,7 +55,7 @@ func (this *CountriesAction) RunGet(params struct {
for _, country := range countriesResp.RegionCountries {
countryMaps = append(countryMaps, maps.Map{
"id": country.Id,
"name": country.Name,
"name": country.DisplayName,
"letter": strings.ToUpper(string(country.Pinyin[0][0])),
"isChecked": lists.ContainsInt64(selectedCountryIds, country.Id),
})

View File

@@ -46,7 +46,7 @@ func (this *ProvincesAction) RunGet(params struct {
selectedProvinceIds = policyConfig.Inbound.Region.DenyProvinceIds
}
provincesResp, err := this.RPC().RegionProvinceRPC().FindAllRegionProvincesWithCountryId(this.AdminContext(), &pb.FindAllRegionProvincesWithCountryIdRequest{
provincesResp, err := this.RPC().RegionProvinceRPC().FindAllRegionProvincesWithRegionCountryId(this.AdminContext(), &pb.FindAllRegionProvincesWithRegionCountryIdRequest{
RegionCountryId: int64(ChinaCountryId),
})
if err != nil {
@@ -57,7 +57,7 @@ func (this *ProvincesAction) RunGet(params struct {
for _, province := range provincesResp.RegionProvinces {
provinceMaps = append(provinceMaps, maps.Map{
"id": province.Id,
"name": province.Name,
"name": province.DisplayName,
"isChecked": lists.ContainsInt64(selectedProvinceIds, province.Id),
})
}