fixed 项目列表条件count增加标签名
This commit is contained in:
parent
0559110d12
commit
04f8bcb1b0
|
@ -43,7 +43,7 @@ class ProjectsController < ApplicationController
|
|||
|
||||
category_id = params[:category_id]
|
||||
@total_count =
|
||||
if category_id.blank? && params[:search].blank? && params[:topic_id].blank? && params[:topic_name].present?
|
||||
if category_id.blank? && params[:search].blank? && params[:topic_id].blank? && params[:topic_name].blank?
|
||||
# 默认查询时count性能问题处理
|
||||
not_category_count = Project.where(project_category_id: nil).count
|
||||
ProjectCategory.sum("projects_count") - Project.visible.joins("left join organization_extensions on organization_extensions.organization_id = projects.user_id").where("organization_extensions.visibility =2").count + not_category_count
|
||||
|
|
Loading…
Reference in New Issue