From 09c3740972fc6e820e1ca6fad061dfe5945cd882 Mon Sep 17 00:00:00 2001 From: viletyy Date: Thu, 4 Feb 2021 11:20:50 +0800 Subject: [PATCH] [FIX]devleop rank not use repo.id --- models/action_ext.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/models/action_ext.go b/models/action_ext.go index 14fd3a368..fae134e35 100644 --- a/models/action_ext.go +++ b/models/action_ext.go @@ -135,14 +135,12 @@ func GetActivityProject(opt *GetGetActivityOptions) (interface{}, error) { func GetActivityDevelop(opt *GetGetActivityOptions) (interface{}, error) { sql:= `select u.name as develop_name, - r.name as project_name, count(op_type) as total_count, sum(case when (a.created_unix>=? and a.created_unix<=?) then 1 else 0 end ) as active_count from action a - left join repository r on a.repo_id=r.id left join user u on a.act_user_id=u.id where (a.op_type=5) - group by a.act_user_id,a.repo_id + group by a.act_user_id order by total_count desc limit ? ` @@ -153,7 +151,6 @@ func GetActivityDevelop(opt *GetGetActivityOptions) (interface{}, error) { type DevelopDTO struct { DevelopName string `json:"develop_name"` - ProjectName string `json:"project_name"` TotalCount int64 `json:"total_count"` ActiveCount int64 `json:"active_count"`