mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-24 05:35:46 +08:00
新增: 关注列表时间范围查询
This commit is contained in:
@@ -287,7 +287,10 @@ class ProjectsController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def watch_users
|
def watch_users
|
||||||
|
start_at = params[:start_at]
|
||||||
|
end_at = params[:end_at]
|
||||||
watchers = @project.watchers.includes(:user).order("watchers.created_at desc").distinct
|
watchers = @project.watchers.includes(:user).order("watchers.created_at desc").distinct
|
||||||
|
watchers = watchers.where("watchers.created_at > ? and watchers.created_at < ?", Time.at(start_at), Time.at(end_at)) if start_at.present? && end_at.present?
|
||||||
@watchers_count = watchers.size
|
@watchers_count = watchers.size
|
||||||
@watchers = paginate(watchers)
|
@watchers = paginate(watchers)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user