mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-16 01:35:56 +08:00
fixed 项目列表查询count优化
This commit is contained in:
@@ -39,8 +39,9 @@ class ProjectsController < ApplicationController
|
||||
category_id = params[:category_id]
|
||||
@total_count =
|
||||
if category_id.blank?
|
||||
ps = ProjectStatistic.first
|
||||
ps.common_projects_count + ps.mirror_projects_count unless ps.blank?
|
||||
# ps = ProjectStatistic.first
|
||||
# ps.common_projects_count + ps.mirror_projects_count unless ps.blank?
|
||||
@projects.total_count
|
||||
else
|
||||
cate = ProjectCategory.find_by(id: category_id)
|
||||
cate&.projects_count || 0
|
||||
|
||||
Reference in New Issue
Block a user