mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2026-01-06 07:25:48 +08:00
国家/地区、省份等相关表增加真实ID字段,防止数据表被用户修改时无法对应
This commit is contained in:
@@ -40,13 +40,14 @@ func (this *RegionCountryService) FindAllEnabledRegionCountries(ctx context.Cont
|
||||
}
|
||||
|
||||
result = append(result, &pb.RegionCountry{
|
||||
Id: int64(country.Id),
|
||||
Id: int64(country.ValueId),
|
||||
Name: country.Name,
|
||||
Codes: country.DecodeCodes(),
|
||||
Pinyin: pinyinStrings,
|
||||
CustomName: country.CustomName,
|
||||
CustomCodes: country.DecodeCustomCodes(),
|
||||
DisplayName: country.DisplayName(),
|
||||
IsCommon: country.IsCommon,
|
||||
})
|
||||
}
|
||||
return &pb.FindAllEnabledRegionCountriesResponse{
|
||||
@@ -74,7 +75,7 @@ func (this *RegionCountryService) FindEnabledRegionCountry(ctx context.Context,
|
||||
}
|
||||
|
||||
return &pb.FindEnabledRegionCountryResponse{RegionCountry: &pb.RegionCountry{
|
||||
Id: int64(country.Id),
|
||||
Id: int64(country.ValueId),
|
||||
Name: country.Name,
|
||||
Codes: country.DecodeCodes(),
|
||||
CustomName: country.CustomName,
|
||||
@@ -110,13 +111,14 @@ func (this *RegionCountryService) FindAllRegionCountries(ctx context.Context, re
|
||||
}
|
||||
|
||||
result = append(result, &pb.RegionCountry{
|
||||
Id: int64(country.Id),
|
||||
Id: int64(country.ValueId),
|
||||
Name: country.Name,
|
||||
Codes: country.DecodeCodes(),
|
||||
Pinyin: pinyinStrings,
|
||||
CustomName: country.CustomName,
|
||||
CustomCodes: country.DecodeCustomCodes(),
|
||||
DisplayName: country.DisplayName(),
|
||||
IsCommon: country.IsCommon,
|
||||
})
|
||||
}
|
||||
return &pb.FindAllRegionCountriesResponse{
|
||||
@@ -143,12 +145,13 @@ func (this *RegionCountryService) FindRegionCountry(ctx context.Context, req *pb
|
||||
}
|
||||
|
||||
return &pb.FindRegionCountryResponse{RegionCountry: &pb.RegionCountry{
|
||||
Id: int64(country.Id),
|
||||
Id: int64(country.ValueId),
|
||||
Name: country.Name,
|
||||
Codes: country.DecodeCodes(),
|
||||
CustomName: country.CustomName,
|
||||
CustomCodes: country.DecodeCustomCodes(),
|
||||
DisplayName: country.DisplayName(),
|
||||
IsCommon: country.IsCommon,
|
||||
}}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user