forked from Gitlink/gitea-1120-rc1
[FIX]devleop rank not use repo.id
This commit is contained in:
parent
cb5e96134f
commit
09c3740972
|
@ -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"`
|
||||
|
||||
|
|
Loading…
Reference in New Issue