From 6e364182019d9ff2881b686288ff21e0cd58487d Mon Sep 17 00:00:00 2001 From: cxt Date: Wed, 31 Aug 2016 09:47:51 +0800 Subject: [PATCH] =?UTF-8?q?admin=E7=95=8C=E9=9D=A2=E7=9A=84=E7=95=99?= =?UTF-8?q?=E8=A8=80=E5=88=97=E8=A1=A8=E8=BF=87=E6=BB=A4=E6=8E=89=E6=96=B0?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=9A=84=E7=95=99=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/admin_controller.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 25cc85ae2..334101bb0 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -777,8 +777,15 @@ class AdminController < ApplicationController #็•™่จ€ๅˆ—่กจ def leave_messages + notes1, notes2, notes3 = '', '', '' + begin + notes1 = Message.find(19292).content + notes2 = Message.find(19291).content + notes3 = Message.find(19504).content + rescue => e + end @jour = JournalsForMessage.find_by_sql("SELECT * FROM journals_for_messages AS j1 - WHERE j1.jour_type IN ('Course','Principal') AND (j1.m_parent_id IS NULL OR (j1.m_parent_id IN (SELECT id FROM journals_for_messages WHERE jour_type IN ('Course','Principal')))) order by created_on desc") + WHERE j1.jour_type IN ('Course','Principal') AND (j1.m_parent_id IS NULL OR (j1.m_parent_id IN (SELECT id FROM journals_for_messages WHERE jour_type IN ('Course','Principal')))) AND j1.notes !='#{notes1}' AND j1.notes !='#{notes2}' AND j1.notes !='#{notes3}' order by created_on desc") @jour = paginateHelper @jour,30 @page = (params['page'] || 1).to_i - 1 respond_to do |format|