From 06765e57049b94c8e2c69b4499beeca2ca3554e5 Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 14 Dec 2022 11:06:16 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/user_business_analysis.go b/models/user_business_analysis.go index 394c24825..05a4e6c82 100644 --- a/models/user_business_analysis.go +++ b/models/user_business_analysis.go @@ -2089,8 +2089,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.CloneCnt) > getMapKeyStringValue(key, detailInfoMap) { - detailInfoMap[key] = int(repoRecord.CloneCnt) + if int(repoRecord.GitCloneCnt) > getMapKeyStringValue(key, detailInfoMap) { + detailInfoMap[key] = int(repoRecord.GitCloneCnt) mostDownloadMap[repoRecord.OwnerID] = repoRecord.DisplayName() } } From aa4600c4f31ab9e18f202c80e58caea0e378dc31 Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 14 Dec 2022 11:23:15 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=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() } } From 0ab2224c974ad649594e713237097607c0745ea9 Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 14 Dec 2022 11:24:25 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=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 | 1 + 1 file changed, 1 insertion(+) diff --git a/models/user_business_analysis.go b/models/user_business_analysis.go index 99b4cb567..24177371e 100644 --- a/models/user_business_analysis.go +++ b/models/user_business_analysis.go @@ -2107,6 +2107,7 @@ 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" + log.Info("git clone count =" + fmt.Sprint(repoRecord.CloneCnt) + " key=" + key) if int(repoRecord.CloneCnt) > getMapKeyStringValue(key, detailInfoMap) { detailInfoMap[key] = int(repoRecord.CloneCnt) mostDownloadMap[repoRecord.OwnerID] = repoRecord.DisplayName() From a8baf47d5b32f7f459af58fed831e839694b6ec5 Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 14 Dec 2022 11:34:21 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=B9=B4=E5=BA=A6?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=80=BB=E7=BB=93=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 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/models/user_business_analysis.go b/models/user_business_analysis.go index 24177371e..647e51a71 100644 --- a/models/user_business_analysis.go +++ b/models/user_business_analysis.go @@ -856,6 +856,9 @@ func getCloudBrainInfo(dateRecordAll UserBusinessAnalysisAll, CloudBrainTaskItem trainscore := 0.0 debugscore := 0.0 runtime := 0.0 + if dateRecordAll.Name == "Test_zap1234" { + log.Info("Test_zap1234 dateRecordAll.CloudBrainTaskNum=" + fmt.Sprint(dateRecordAll.CloudBrainTaskNum)) + } if dateRecordAll.CloudBrainTaskNum > 0 { cloudBrainInfo := make(map[string]string) cloudBrainInfo["create_task_num"] = fmt.Sprint(dateRecordAll.CloudBrainTaskNum) From 0b4e310366ea3abc8b1a349984fd69c0b825cb70 Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 14 Dec 2022 11:42:18 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E8=A7=A3=E5=86=B3Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- models/user_business_analysis.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/models/user_business_analysis.go b/models/user_business_analysis.go index 647e51a71..e6cdc4889 100644 --- a/models/user_business_analysis.go +++ b/models/user_business_analysis.go @@ -785,8 +785,9 @@ func isUserYearData(tableName string) bool { if currentTimeNow.Year() >= 2023 { return false } + return true } - return true + return false } func getBonusMap() map[string]map[string]int { From 80cc401681487491c366e82c388d60dd2885a8fe Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 14 Dec 2022 11:43:10 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E8=A7=A3=E5=86=B3Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- models/user_business_analysis.go | 1 - 1 file changed, 1 deletion(-) diff --git a/models/user_business_analysis.go b/models/user_business_analysis.go index e6cdc4889..bb5352d7c 100644 --- a/models/user_business_analysis.go +++ b/models/user_business_analysis.go @@ -2111,7 +2111,6 @@ 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" - log.Info("git clone count =" + fmt.Sprint(repoRecord.CloneCnt) + " key=" + key) if int(repoRecord.CloneCnt) > getMapKeyStringValue(key, detailInfoMap) { detailInfoMap[key] = int(repoRecord.CloneCnt) mostDownloadMap[repoRecord.OwnerID] = repoRecord.DisplayName() From 610e3a0e31cad5679b2332eea0c343ecf99d9fb8 Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 14 Dec 2022 14:42:45 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E8=A7=A3=E5=86=B3Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- models/user_business_analysis.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/models/user_business_analysis.go b/models/user_business_analysis.go index bb5352d7c..6c247709e 100644 --- a/models/user_business_analysis.go +++ b/models/user_business_analysis.go @@ -857,9 +857,6 @@ func getCloudBrainInfo(dateRecordAll UserBusinessAnalysisAll, CloudBrainTaskItem trainscore := 0.0 debugscore := 0.0 runtime := 0.0 - if dateRecordAll.Name == "Test_zap1234" { - log.Info("Test_zap1234 dateRecordAll.CloudBrainTaskNum=" + fmt.Sprint(dateRecordAll.CloudBrainTaskNum)) - } if dateRecordAll.CloudBrainTaskNum > 0 { cloudBrainInfo := make(map[string]string) cloudBrainInfo["create_task_num"] = fmt.Sprint(dateRecordAll.CloudBrainTaskNum)