From 5fb53c89e4754effe6935b08964357b683aa0d24 Mon Sep 17 00:00:00 2001 From: zouap Date: Mon, 23 May 2022 18:51:52 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E6=AD=A3=E6=97=B6=E9=97=B4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/user_data_analysis.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/routers/repo/user_data_analysis.go b/routers/repo/user_data_analysis.go index f631591d1..5ab7e286a 100755 --- a/routers/repo/user_data_analysis.go +++ b/routers/repo/user_data_analysis.go @@ -414,9 +414,7 @@ func DownloadUserDefineFile(ctx *context.Context) { log.Info("file not exist.") ctx.JSON(http.StatusOK, "File Not Exist.") } else { - ctx.Resp.Header().Set("Content-Disposition", "attachment; filename="+filename) - ctx.Resp.Header().Set("Content-Type", "application/octet-stream") - ctx.ServeFile(allFilename, filename) + ctx.ServeFile(allFilename, url.QueryEscape(filename)) } } From 531a1c72f9c5418c23b9c8c529a6f974835529c9 Mon Sep 17 00:00:00 2001 From: zouap Date: Tue, 24 May 2022 11:08:14 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E3=80=82=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 | 15 +-------------- routers/repo/user_data_analysis.go | 3 +-- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/models/user_business_analysis.go b/models/user_business_analysis.go index bef23e109..8919efcf0 100644 --- a/models/user_business_analysis.go +++ b/models/user_business_analysis.go @@ -534,7 +534,7 @@ func QueryUserStaticDataForUserDefine(opts *UserBusinessAnalysisQueryOptions, wi break } } - log.Info("query user define,count=" + fmt.Sprint((ResultList))) + log.Info("query user define,count=" + fmt.Sprint(len(ResultList))) return ResultList, int64(len(ResultList)) } @@ -1026,20 +1026,7 @@ func CounDataByDateAndReCount(wikiCountMap map[string]int, startTime time.Time, log.Info("has activity." + userRecord.Name) addUserToMap(userNewAddActivity, userRecord.CreatedUnix, dateRecord.ID) } - if !userRecord.IsActive { - continue - } - var deleteDateRecord UserBusinessAnalysis - deleteDateRecord.ID = userRecord.ID - deleteDateRecord.CountDate = CountDate.Unix() - statictisSess.Delete(&deleteDateRecord) - - _, err = statictisSess.Insert(&dateRecord) - if err != nil { - log.Info("insert daterecord failed." + err.Error()) - return err - } } indexTotal += PAGE_SIZE diff --git a/routers/repo/user_data_analysis.go b/routers/repo/user_data_analysis.go index 5ab7e286a..a43b91df8 100755 --- a/routers/repo/user_data_analysis.go +++ b/routers/repo/user_data_analysis.go @@ -542,14 +542,13 @@ func QueryUserStaticDataPage(ctx *context.Context) { endTime = time.Now() } else { startTime, _ = time.ParseInLocation("2006-01-02", startDate, time.Local) - startTime = time.Date(startTime.Year(), startTime.Month(), startTime.Day(), 12, 0, 0, 0, startTime.Location()) + startTime = time.Date(startTime.Year(), startTime.Month(), startTime.Day(), 0, 0, 0, 0, startTime.Location()) settingStartTime, _ := time.Parse("2006-01-02", setting.RadarMap.RecordBeginTime) if startTime.Unix() < settingStartTime.Unix() { startTime = settingStartTime startDate = settingStartTime.Format("2006-01-02") } endTime, _ = time.ParseInLocation("2006-01-02", endDate, time.Local) - //endTime = endTime.AddDate(0, 0, 1) endTime = time.Date(endTime.Year(), endTime.Month(), endTime.Day(), 23, 59, 59, 0, startTime.Location()) isAll = false From 29f27968e048404f81ecf5d6e74adad48b27095c Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 25 May 2022 16:21:38 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=88=86=E6=9E=90?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- options/locale/locale_en-US.ini | 3 +++ options/locale/locale_zh-CN.ini | 3 +++ routers/repo/user_data_analysis.go | 22 ++++++++++++++++++++++ web_src/js/components/UserAnalysis.vue | 14 +++++++++++++- web_src/js/components/UserTrend.vue | 11 ++++++++--- 5 files changed, 49 insertions(+), 4 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 265e7ed36..7b7f22bce 100755 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -519,6 +519,8 @@ static.RecommendDataset=Recommended Dataset Count static.CollectImage=Collect Image Count static.CollectedImage=Collected Image Count static.RecommendImage=Recommended Image Count +static.email=Email +static.location=Location static.all=All static.public.user_business_analysis_current_month=Current_Month static.public.user_business_analysis_current_week=Current_Week @@ -537,6 +539,7 @@ metrics.hasactivateuser=New contributing activities metrics.newregistnotactiveuser=New inactive metrics.averageuser=Average new users metrics.newuseractiveindex=Activation rate of new users +metrics.currentdayactivity=Current day contributing activities metrics.totalregistuser=Cumulative registered users metrics.totalactiveduser=Cumulative activated users metrics.totalhasactivityuser=Cumulative active users diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index 1b26a930c..cc3b5ddd9 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -524,6 +524,8 @@ static.RecommendDataset=被推荐数据集数 static.CollectImage=收藏镜像数 static.CollectedImage=被收藏镜像数 static.RecommendImage=被推荐镜像数 +static.email=Email +static.location=所在地区 static.all=所有 static.public.user_business_analysis_current_month=本月 static.public.user_business_analysis_current_week=本周 @@ -542,6 +544,7 @@ metrics.hasactivateuser=新增有贡献活动 metrics.newregistnotactiveuser=新增未激活 metrics.averageuser=平均新增用户 metrics.newuseractiveindex=新增用户激活率 +metrics.currentdayactivity=当日有贡献活动 metrics.totalregistuser=累计注册用户 metrics.totalactiveduser=累计已激活 metrics.totalhasactivityuser=累计有贡献活动 diff --git a/routers/repo/user_data_analysis.go b/routers/repo/user_data_analysis.go index a43b91df8..b14170efb 100755 --- a/routers/repo/user_data_analysis.go +++ b/routers/repo/user_data_analysis.go @@ -29,6 +29,7 @@ func getUserMetricsExcelHeader(ctx *context.Context) map[string]string { excelHeader = append(excelHeader, ctx.Tr("user.metrics.hasactivateuser")) excelHeader = append(excelHeader, ctx.Tr("user.metrics.newregistnotactiveuser")) excelHeader = append(excelHeader, ctx.Tr("user.metrics.newuseractiveindex")) + excelHeader = append(excelHeader, ctx.Tr("user.metrics.currentdayactivity")) excelHeader = append(excelHeader, ctx.Tr("user.metrics.totalregistuser")) excelHeader = append(excelHeader, ctx.Tr("user.metrics.totalactiveduser")) excelHeader = append(excelHeader, ctx.Tr("user.metrics.totalhasactivityuser")) @@ -67,6 +68,10 @@ func writeUserMetricsExcel(row int, xlsx *excelize.File, sheetName string, userM } xlsx.SetCellValue(sheetName, getColumn(tmp)+rows, value) tmp = tmp + 1 + + xlsx.SetCellValue(sheetName, getColumn(tmp)+rows, userMetrics.HasActivityUser) + tmp = tmp + 1 + xlsx.SetCellValue(sheetName, getColumn(tmp)+rows, userMetrics.TotalUser) tmp = tmp + 1 xlsx.SetCellValue(sheetName, getColumn(tmp)+rows, userMetrics.TotalActivateRegistUser) @@ -106,6 +111,9 @@ func getExcelHeader(ctx *context.Context) map[string]string { excelHeader = append(excelHeader, ctx.Tr("user.static.CollectedImage")) excelHeader = append(excelHeader, ctx.Tr("user.static.RecommendImage")) + excelHeader = append(excelHeader, ctx.Tr("user.static.email")) + excelHeader = append(excelHeader, ctx.Tr("user.static.RecommendImage")) + excelHeader = append(excelHeader, ctx.Tr("user.static.registdate")) excelHeader = append(excelHeader, ctx.Tr("user.static.countdate")) @@ -181,6 +189,13 @@ func writeExcel(row int, xlsx *excelize.File, sheetName string, userRecord *mode tmp = tmp + 1 xlsx.SetCellValue(sheetName, getColumn(tmp)+rows, userRecord.RecommendImage) tmp = tmp + 1 + + xlsx.SetCellValue(sheetName, getColumn(tmp)+rows, userRecord.Email) + tmp = tmp + 1 + + xlsx.SetCellValue(sheetName, getColumn(tmp)+rows, userRecord.UserLocation) + tmp = tmp + 1 + formatTime := userRecord.RegistDate.Format("2006-01-02 15:04:05") xlsx.SetCellValue(sheetName, getColumn(tmp)+rows, formatTime[0:len(formatTime)-3]) tmp = tmp + 1 @@ -249,6 +264,13 @@ func writeExcelPage(row int, xlsx *excelize.File, sheetName string, userRecord * tmp = tmp + 1 xlsx.SetCellValue(sheetName, getColumn(tmp)+rows, userRecord.RecommendImage) tmp = tmp + 1 + + xlsx.SetCellValue(sheetName, getColumn(tmp)+rows, userRecord.Email) + tmp = tmp + 1 + + xlsx.SetCellValue(sheetName, getColumn(tmp)+rows, userRecord.UserLocation) + tmp = tmp + 1 + formatTime := userRecord.RegistDate.Format("2006-01-02 15:04:05") xlsx.SetCellValue(sheetName, getColumn(tmp)+rows, formatTime[0:len(formatTime)-3]) tmp = tmp + 1 diff --git a/web_src/js/components/UserAnalysis.vue b/web_src/js/components/UserAnalysis.vue index cfc91d449..79a593137 100755 --- a/web_src/js/components/UserAnalysis.vue +++ b/web_src/js/components/UserAnalysis.vue @@ -213,6 +213,18 @@ label="被推荐镜像数" width="120px" align="center"> + + + + 昨日新增注册用户数 未激活:{{ tableDataYesterday.NotActivateRegistUser }} 已激活: {{ tableDataYesterday.ActivateRegistUser }} - 有贡献活动: {{ tableDataYesterday.HasActivityUser }} + 有贡献活动: {{ tableDataYesterday.RegistActivityUser }} @@ -114,7 +114,7 @@ align="center"> @@ -131,6 +131,11 @@ {{scope.row.ActivateIndex | rounding}} + + Date: Wed, 25 May 2022 16:30:21 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=88=86=E6=9E=90?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- web_src/js/components/UserAnalysis.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_src/js/components/UserAnalysis.vue b/web_src/js/components/UserAnalysis.vue index 79a593137..02027288b 100755 --- a/web_src/js/components/UserAnalysis.vue +++ b/web_src/js/components/UserAnalysis.vue @@ -279,7 +279,7 @@ value_time: '', search:'', data:'', - columns: [{title: 'ID',key: 'ID'},{title: '用户名',key: 'Name'},{title: 'PR数',key: 'CodeMergeCount'},{title: 'commit数',key:'CommitCount'},{title: '提出任务数',key: 'IssueCount'},{title: '评论数',key: 'CommentCount'},{title: '关注项目数',key: 'FocusRepoCount'},{title: '点赞项目数',key: 'StarRepoCount'},{title: '登录次数',key: 'LoginCount'},{title:'关注者数',key:'WatchedCount'},{title:'commit代码行数',key:'CommitCodeSize'},{title:'已解决任务数',key:'SolveIssueCount'},{title:'百科页面贡献次数',key:'EncyclopediasCount'},{title:'创建项目',key:'CreateRepoCount'},{title:'用户注册时间',key:'RegistDate'},{title:'云脑任务数',key:'CloudBrainTaskNum'},{title:'云脑运行时间(小时)',key:'CloudBrainRunTime'},{title:'上传(提交)数据集文件数',key:'CommitDatasetNum'},{title:'提交模型数',key:'CommitModelCount'},{title:'归一化用户指数',key:'UserIndex'},{title:'用户指数',key:'UserIndexPrimitive'},{title:'关注他人数',key:'FocusOtherUser'},{title:'收藏数据集',key:'CollectDataset'},{title:'被收藏数据集',key:'CollectedDataset'},{title:'被推荐数据集数',key:'RecommendDataset'},{title:'收藏镜像数',key:'CollectImage'},{title:'被收藏镜像数',key:'CollectedImage'},{title:'被推荐镜像数',key:'RecommendImage'},,{title:'Email',key:'Email'},{title:'用户所在地址',key:'UserLocation'}{title:'系统统计时间',key:'CountDate'}], + columns: [{title: 'ID',key: 'ID'},{title: '用户名',key: 'Name'},{title: 'PR数',key: 'CodeMergeCount'},{title: 'commit数',key:'CommitCount'},{title: '提出任务数',key: 'IssueCount'},{title: '评论数',key: 'CommentCount'},{title: '关注项目数',key: 'FocusRepoCount'},{title: '点赞项目数',key: 'StarRepoCount'},{title: '登录次数',key: 'LoginCount'},{title:'关注者数',key:'WatchedCount'},{title:'commit代码行数',key:'CommitCodeSize'},{title:'已解决任务数',key:'SolveIssueCount'},{title:'百科页面贡献次数',key:'EncyclopediasCount'},{title:'创建项目',key:'CreateRepoCount'},{title:'用户注册时间',key:'RegistDate'},{title:'云脑任务数',key:'CloudBrainTaskNum'},{title:'云脑运行时间(小时)',key:'CloudBrainRunTime'},{title:'上传(提交)数据集文件数',key:'CommitDatasetNum'},{title:'提交模型数',key:'CommitModelCount'},{title:'归一化用户指数',key:'UserIndex'},{title:'用户指数',key:'UserIndexPrimitive'},{title:'关注他人数',key:'FocusOtherUser'},{title:'收藏数据集',key:'CollectDataset'},{title:'被收藏数据集',key:'CollectedDataset'},{title:'被推荐数据集数',key:'RecommendDataset'},{title:'收藏镜像数',key:'CollectImage'},{title:'被收藏镜像数',key:'CollectedImage'},{title:'被推荐镜像数',key:'RecommendImage'},{title:'Email',key:'Email'},{title:'用户所在地址',key:'UserLocation'},{title:'系统统计时间',key:'CountDate'}], blob:'', fileName:'', dynamic:7, From 150850e0acd2086f406ef0975d035ddf101d8831 Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 25 May 2022 16:38:01 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=88=86=E6=9E=90?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/user_data_analysis.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/repo/user_data_analysis.go b/routers/repo/user_data_analysis.go index b14170efb..2b29779aa 100755 --- a/routers/repo/user_data_analysis.go +++ b/routers/repo/user_data_analysis.go @@ -112,7 +112,7 @@ func getExcelHeader(ctx *context.Context) map[string]string { excelHeader = append(excelHeader, ctx.Tr("user.static.RecommendImage")) excelHeader = append(excelHeader, ctx.Tr("user.static.email")) - excelHeader = append(excelHeader, ctx.Tr("user.static.RecommendImage")) + excelHeader = append(excelHeader, ctx.Tr("user.static.location")) excelHeader = append(excelHeader, ctx.Tr("user.static.registdate")) excelHeader = append(excelHeader, ctx.Tr("user.static.countdate")) From 7bbbbd316fa6d66f38548851fff9adb7da9a79c5 Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 25 May 2022 16:41:30 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=88=86=E6=9E=90?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9=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, 2 insertions(+), 1 deletion(-) diff --git a/models/user_business_analysis.go b/models/user_business_analysis.go index 8919efcf0..2d6649e98 100644 --- a/models/user_business_analysis.go +++ b/models/user_business_analysis.go @@ -477,6 +477,7 @@ func QueryUserStaticDataForUserDefine(opts *UserBusinessAnalysisQueryOptions, wi dateRecord.Email = userRecord.Email dateRecord.RegistDate = userRecord.CreatedUnix dateRecord.Name = userRecord.Name + dateRecord.UserLocation = userRecord.Location dateRecord.GiteaAgeMonth = subMonth(currentTimeNow, userRecord.CreatedUnix.AsTime()) dateRecord.CodeMergeCount = getMapValue(dateRecord.ID, CodeMergeCountMap) @@ -973,7 +974,7 @@ func CounDataByDateAndReCount(wikiCountMap map[string]int, startTime time.Time, dateRecord.Name = userRecord.Name dateRecord.GiteaAgeMonth = subMonth(currentTimeNow, userRecord.CreatedUnix.AsTime()) dateRecord.DataDate = DataDate - + dateRecord.UserLocation = userRecord.Location dateRecord.CodeMergeCount = getMapValue(dateRecord.ID, CodeMergeCountMap) dateRecord.CommitCount = getMapValue(dateRecord.ID, CommitCountMap) dateRecord.IssueCount = getMapValue(dateRecord.ID, IssueCountMap) From f4795f39ea5c00fbf116427bc7d30f3cb5f41669 Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 25 May 2022 17:00:41 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=88=86=E6=9E=90?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- options/locale/locale_en-US.ini | 2 +- options/locale/locale_zh-CN.ini | 2 +- routers/repo/user_data_analysis.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 7b7f22bce..546127183 100755 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -530,7 +530,7 @@ static.public.user_business_analysis_last30_day=Last_30_day static.public.user_business_analysis_last_month=Last_Month static.public.user_business_analysis_yesterday=Yesterday static.public.user_business_analysis_all=All - +static.downloadinfo=Due to the large amount of data generated in the customized time period and long calculation time, please download and export the data from the following address and export the data download address: metrics.sheetname=User Trend Analysis metrics.date=Count Date metrics.newregistuser=New registered user diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index cc3b5ddd9..c76dee610 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -535,7 +535,7 @@ static.public.user_business_analysis_last30_day=近30天 static.public.user_business_analysis_last_month=上月 static.public.user_business_analysis_yesterday=昨天 static.public.user_business_analysis_all=所有 - +static.downloadinfo=因自定义时间段产生的数据量比较大,计算时间比较长,请您从如下地址下载导出数据,\n导出数据下载地址: metrics.sheetname=用户趋势分析 metrics.date=日期 metrics.newregistuser=新增注册用户 diff --git a/routers/repo/user_data_analysis.go b/routers/repo/user_data_analysis.go index 2b29779aa..1c79c9e93 100755 --- a/routers/repo/user_data_analysis.go +++ b/routers/repo/user_data_analysis.go @@ -601,7 +601,7 @@ func QueryUserStaticDataPage(ctx *context.Context) { filename := sheetName + "_" + startDate + "_" + endDate + ".xlsx" os.Remove(setting.AppDataPath + Excel_File_Path + filename) go writeFileToDisk(ctx, count, re, filename) - ctx.JSON(http.StatusOK, setting.AppURL+"api/v1/download_user_define_file?filename="+filename) + ctx.JSON(http.StatusOK, ctx.Tr("user.static.downloadinfo")+setting.AppURL+"api/v1/download_user_define_file?filename="+filename) } else { mapInterface := make(map[string]interface{}) re, count := models.QueryUserStaticDataPage(pageOpts) From 8a8a5b1846ae839b7429f85ede14b4c07f02454e Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 25 May 2022 17:04:25 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=88=86=E6=9E=90?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- options/locale/locale_zh-CN.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index c76dee610..99b9e6df3 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -535,7 +535,7 @@ static.public.user_business_analysis_last30_day=近30天 static.public.user_business_analysis_last_month=上月 static.public.user_business_analysis_yesterday=昨天 static.public.user_business_analysis_all=所有 -static.downloadinfo=因自定义时间段产生的数据量比较大,计算时间比较长,请您从如下地址下载导出数据,\n导出数据下载地址: +static.downloadinfo=因自定义时间段产生的数据量比较大,计算时间比较长,请您从如下地址下载导出数据,
导出数据下载地址: metrics.sheetname=用户趋势分析 metrics.date=日期 metrics.newregistuser=新增注册用户 From d075d81b4abec9b6472b9d1fa88cf13169f3be0a Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 25 May 2022 17:05:19 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=88=86=E6=9E=90?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- options/locale/locale_zh-CN.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index 99b9e6df3..6754e3b1d 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -535,7 +535,7 @@ static.public.user_business_analysis_last30_day=近30天 static.public.user_business_analysis_last_month=上月 static.public.user_business_analysis_yesterday=昨天 static.public.user_business_analysis_all=所有 -static.downloadinfo=因自定义时间段产生的数据量比较大,计算时间比较长,请您从如下地址下载导出数据,
导出数据下载地址: +static.downloadinfo=因自定义时间段产生的数据量比较大,计算时间比较长,请您从如下地址下载导出数据,导出数据下载地址: metrics.sheetname=用户趋势分析 metrics.date=日期 metrics.newregistuser=新增注册用户 From bb1f87a033de13c8274790be4718aa9e545e6bd9 Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 25 May 2022 17:11:13 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=88=86=E6=9E=90?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9=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 2d6649e98..6d438ab0a 100644 --- a/models/user_business_analysis.go +++ b/models/user_business_analysis.go @@ -1154,7 +1154,7 @@ func getUserIndexFromAnalysisAll(dateRecord UserBusinessAnalysisAll, ParaWeight // 登录次数 0.10 result = float64(dateRecord.CodeMergeCount) * getParaWeightValue("CodeMergeCount", ParaWeight, 0.2) result += float64(dateRecord.CommitCount) * getParaWeightValue("CommitCount", ParaWeight, 0.2) - log.Info("1 result=" + fmt.Sprint(result)) + //log.Info("1 result=" + fmt.Sprint(result)) result += float64(dateRecord.IssueCount) * getParaWeightValue("IssueCount", ParaWeight, 0.2) result += float64(dateRecord.CommentCount) * getParaWeightValue("CommentCount", ParaWeight, 0.2) result += float64(dateRecord.FocusRepoCount) * getParaWeightValue("FocusRepoCount", ParaWeight, 0.1) @@ -1237,7 +1237,7 @@ func getUserIndex(dateRecord UserBusinessAnalysis, ParaWeight map[string]float64 // 登录次数 0.10 result = float64(dateRecord.CodeMergeCount) * getParaWeightValue("CodeMergeCount", ParaWeight, 0.2) result += float64(dateRecord.CommitCount) * getParaWeightValue("CommitCount", ParaWeight, 0.2) - log.Info("2 result=" + fmt.Sprint(result)) + //log.Info("2 result=" + fmt.Sprint(result)) result += float64(dateRecord.IssueCount) * getParaWeightValue("IssueCount", ParaWeight, 0.2) result += float64(dateRecord.CommentCount) * getParaWeightValue("CommentCount", ParaWeight, 0.2) result += float64(dateRecord.FocusRepoCount) * getParaWeightValue("FocusRepoCount", ParaWeight, 0.1)