修改journals查询错误
This commit is contained in:
parent
750070bdc7
commit
0430a0e810
|
@ -185,7 +185,7 @@ class Mailer < ActionMailer::Base
|
|||
# 查询user在课程及个人中留言
|
||||
@course_journal_messages = JournalsForMessage.find_by_sql("select DISTINCT jfm.* from journals_for_messages jfm, members m, courses c
|
||||
where m.user_id = '#{user.id}' and c.id = m.course_id and jfm.jour_id = c.id
|
||||
and jfm.jour_type='Course' and (jfm.created_on between '#{date_from}' and '#{date_to}') order m.course_id, by created_on desc")
|
||||
and jfm.jour_type='Course' and (jfm.created_on between '#{date_from}' and '#{date_to}') order by m.course_id, created_on desc")
|
||||
|
||||
@user_journal_messages = user.journals_for_messages.where("jour_type='Principal' and (created_on between '#{date_from}' and '#{date_to}')").order('created_on DESC')
|
||||
|
||||
|
|
Loading…
Reference in New Issue