作者 陈志颖

fix:年榜数据

... ... @@ -496,12 +496,14 @@ func (statisticsService *StatisticsService) ContributionsWealthRanking(contribut
}
// 个人财富值
if contributionsWealthRankingStatistics.(map[string]interface{})["currentEmployeeWealth"] != nil {
currentEmployeeWealth := contributionsWealthRankingStatistics.(map[string]interface{})["currentEmployeeWealth"].(struct{Uid int64;EmployeeName string;EmployeeSuMoney float64;Ranking int})
uidWealth := contributionsWealthRankingStatistics.(map[string]interface{})["currentEmployeeWealth"].(struct{Uid int64;EmployeeName string;EmployeeSuMoney float64;Ranking int}).Uid
if uidName[uidWealth] != nil {
currentEmployeeWealth.EmployeeName = uidName[uidWealth].(string)
}
contributionsWealthRankingStatistics.(map[string]interface{})["currentEmployeeWealth"] = currentEmployeeWealth
}
// 贡献值排行版
for i, _ := range contributionsWealthRankingStatistics.(map[string]interface{})["employeesContributions"].([]struct { Uid int64; EmployeeName string; EmployeesContributions float64; Ranking int }) {
... ... @@ -512,12 +514,14 @@ func (statisticsService *StatisticsService) ContributionsWealthRanking(contribut
}
// 个人贡献值
if contributionsWealthRankingStatistics.(map[string]interface{})["currentEmployeeContributions"] != nil {
currentEmployeeContributions := contributionsWealthRankingStatistics.(map[string]interface{})["currentEmployeeContributions"].(struct{Uid int64;EmployeeName string;EmployeesContributions float64;Ranking int})
uidContributions := contributionsWealthRankingStatistics.(map[string]interface{})["currentEmployeeContributions"].(struct{Uid int64;EmployeeName string;EmployeesContributions float64;Ranking int}).Uid
if uidName[uidContributions] != nil {
currentEmployeeContributions.EmployeeName = uidName[uidContributions].(string)
}
contributionsWealthRankingStatistics.(map[string]interface{})["currentEmployeeContributions"] = currentEmployeeContributions
}
if err := transactionContext.CommitTransaction(); err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
... ...