Browse Source

提交代码,修正SQL语句。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.5.2^2
zouap 3 years ago
parent
commit
15404d8bd1
3 changed files with 5 additions and 3 deletions
  1. +1
    -3
      models/user_business_analysis.go
  2. +1
    -0
      routers/routes/routes.go
  3. +3
    -0
      routers/user/auth.go

+ 1
- 3
models/user_business_analysis.go View File

@@ -778,7 +778,7 @@ func CounDataByDateAndReCount(wikiCountMap map[string]int, startTime time.Time,
if err != nil {
log.Info("query commit code errr.")
} else {
log.Info("query commit code size, len=" + fmt.Sprint(len(CommitCodeSizeMap)))
//log.Info("query commit code size, len=" + fmt.Sprint(len(CommitCodeSizeMap)))
CommitCodeSizeMapJson, _ := json.Marshal(CommitCodeSizeMap)
log.Info("CommitCodeSizeMapJson=" + string(CommitCodeSizeMapJson))
}
@@ -1013,7 +1013,6 @@ 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))
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)
@@ -1096,7 +1095,6 @@ 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))
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)


+ 1
- 0
routers/routes/routes.go View File

@@ -364,6 +364,7 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Group("/user", func() {
m.Get("/login", user.SignIn)
m.Get("/login/cloud_brain", user.SignInCloudBrain)
m.Post("/login/kanban", user.SignInPostAPI)
m.Post("/login", bindIgnErr(auth.SignInForm{}), user.SignInPost)
m.Group("", func() {
m.Combo("/login/openid").


+ 3
- 0
routers/user/auth.go View File

@@ -175,6 +175,9 @@ func SignInCloudBrain(ctx *context.Context) {

ctx.HTML(200, tplSignInCloudBrain)
}
func SignInPostAPI(ctx *context.Context) {
log.Info("22222222222222222222222")
}

// SignInPost response for sign in request
func SignInPost(ctx *context.Context, form auth.SignInForm) {


Loading…
Cancel
Save