IP库增加制品管理/统计中相关区域名称可以显示别名

This commit is contained in:
GoEdgeLab
2022-08-23 19:40:17 +08:00
parent 444bdc13d5
commit b11c1dc01c
16 changed files with 479 additions and 18 deletions

View File

@@ -32,7 +32,7 @@ func (this *ServerRegionCityMonthlyStatService) FindTopServerRegionCityMonthlySt
if err != nil {
return nil, err
}
pbStats := []*pb.FindTopServerRegionCityMonthlyStatsResponse_Stat{}
var pbStats = []*pb.FindTopServerRegionCityMonthlyStatsResponse_Stat{}
for _, stat := range statList {
pbStat := &pb.FindTopServerRegionCityMonthlyStatsResponse_Stat{
Count: int64(stat.Count),
@@ -63,15 +63,15 @@ func (this *ServerRegionCityMonthlyStatService) FindTopServerRegionCityMonthlySt
}
pbStat.RegionCountry = &pb.RegionCountry{
Id: int64(country.Id),
Name: country.Name,
Name: country.DisplayName(),
}
pbStat.RegionProvince = &pb.RegionProvince{
Id: int64(province.Id),
Name: province.Name,
Name: province.DisplayName(),
}
pbStat.RegionCity = &pb.RegionCity{
Id: int64(city.Id),
Name: city.Name,
Name: city.DisplayName(),
}
pbStats = append(pbStats, pbStat)
}