From e1cfd7700ac60fa3d1958a8cefe746820884acf8 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 16 Jan 2020 09:35:55 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=80=89=E7=94=A8=E5=AE=9E=E8=AE=AD?= =?UTF-8?q?=E6=98=AF=E6=89=80=E6=9C=89=E5=B7=B2=E5=85=AC=E5=BC=80=E7=9A=84?= =?UTF-8?q?=E5=AE=9E=E8=AE=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/shixun_search_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/shixun_search_service.rb b/app/services/shixun_search_service.rb index 323804e95..2dcf265dc 100644 --- a/app/services/shixun_search_service.rb +++ b/app/services/shixun_search_service.rb @@ -26,7 +26,7 @@ class ShixunSearchService < ApplicationService shixun_ids = ShixunSchool.where(school_id: User.current.school_id).pluck(:shixun_id) shixun_ids = shixun_ids.reject(&:blank?).length == 0 ? -1 : shixun_ids.join(",") - @shixuns = @shixuns.where("use_scope = 0 or id in (#{shixun_ids})").unhidden.published.or(@shixuns.where(id: User.current.shixuns)) + @shixuns = @shixuns.where("use_scope = 0 or id in (#{shixun_ids})").unhidden.publiced.or(@shixuns.where(id: User.current.shixuns)) end end From 443ff8d0b143e7302961d060b28403297b82961f Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 16 Jan 2020 10:48:57 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 2 +- app/controllers/subjects_controller.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 3c481e8b6..fdb41c114 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -23,7 +23,7 @@ class ApplicationController < ActionController::Base # 所有请求必须合法签名 def check_sign - if !Rails.env.development? || + if !Rails.env.development? Rails.logger.info("66666 #{params}") # suffix = request.url.split(".").last.split("?").first # suffix_arr = ["xls", "xlsx", "pdf", "zip"] # excel文件先注释 diff --git a/app/controllers/subjects_controller.rb b/app/controllers/subjects_controller.rb index ce7fc575c..d8a0f4014 100644 --- a/app/controllers/subjects_controller.rb +++ b/app/controllers/subjects_controller.rb @@ -200,7 +200,7 @@ class SubjectsController < ApplicationController end def append_to_stage - @shixuns = Shixun.where(id: params[:shixun_id]).order("id desc") + @shixuns = Shixun.where(id: params[:shixun_id]).order("field(id, #{params[:shixun_id]})") end # 添加实训项目