From aa4600c4f31ab9e18f202c80e58caea0e378dc31 Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 14 Dec 2022 11:23:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- models/user_business_analysis.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/models/user_business_analysis.go b/models/user_business_analysis.go index 4ae9f6ced..99b4cb567 100644 --- a/models/user_business_analysis.go +++ b/models/user_business_analysis.go @@ -811,6 +811,7 @@ func getBonusMap() map[string]map[string]int { record, ok := bonusMap[userName] if !ok { record = make(map[string]int) + bonusMap[userName] = record } record["times"] = getMapKeyStringValue("times", record) + getIntValue(aLine[3]) record["total_bonus"] = getMapKeyStringValue("total_bonus", record) + getIntValue(aLine[4]) @@ -2106,8 +2107,8 @@ func queryUserCreateRepo(start_unix int64, end_unix int64) (map[int64]int, map[s detailInfoMap[key] = getMapKeyStringValue(key, detailInfoMap) + int(repoRecord.CloneCnt) key = fmt.Sprint(repoRecord.OwnerID) + "_most_download" - if int(repoRecord.GitCloneCnt) > getMapKeyStringValue(key, detailInfoMap) { - detailInfoMap[key] = int(repoRecord.GitCloneCnt) + if int(repoRecord.CloneCnt) > getMapKeyStringValue(key, detailInfoMap) { + detailInfoMap[key] = int(repoRecord.CloneCnt) mostDownloadMap[repoRecord.OwnerID] = repoRecord.DisplayName() } }