优化操作系统和浏览器统计相关程序

This commit is contained in:
GoEdgeLab
2022-11-11 17:48:30 +08:00
parent b02ca0c840
commit 1a1b937a63
24 changed files with 1055 additions and 127 deletions

View File

@@ -31,13 +31,13 @@ func (this *ServerClientBrowserMonthlyStatService) FindTopServerClientBrowserMon
if err != nil {
return nil, err
}
pbStats := []*pb.FindTopServerClientBrowserMonthlyStatsResponse_Stat{}
var pbStats = []*pb.FindTopServerClientBrowserMonthlyStatsResponse_Stat{}
for _, stat := range statList {
pbStat := &pb.FindTopServerClientBrowserMonthlyStatsResponse_Stat{
Count: int64(stat.Count),
Version: stat.Version,
}
browser, err := models.SharedClientBrowserDAO.FindEnabledClientBrowser(tx, int64(stat.BrowserId))
browser, err := models.SharedFormalClientBrowserDAO.FindEnabledFormalClientBrowser(tx, int64(stat.BrowserId))
if err != nil {
return nil, err
}
@@ -48,7 +48,6 @@ func (this *ServerClientBrowserMonthlyStatService) FindTopServerClientBrowserMon
Id: int64(browser.Id),
Name: browser.Name,
}
pbStats = append(pbStats, pbStat)
}
return &pb.FindTopServerClientBrowserMonthlyStatsResponse{Stats: pbStats}, nil