Merge branch 'develop' into dev_hjq
This commit is contained in:
commit
f0111ad79d
|
@ -155,7 +155,6 @@ class Mailer < ActionMailer::Base
|
||||||
# 发送内容: 项目【缺陷,讨论区,新闻】,课程【通知,留言,新闻】, 贴吧, 个人留言
|
# 发送内容: 项目【缺陷,讨论区,新闻】,课程【通知,留言,新闻】, 贴吧, 个人留言
|
||||||
def send_for_user_activities(user, date_to, days)
|
def send_for_user_activities(user, date_to, days)
|
||||||
date_from = date_to - days.days
|
date_from = date_to - days.days
|
||||||
subject = "[ #{user.show_name}#{l(:label_day_mail)}]"
|
|
||||||
date_from = "#{date_from} 17:59:59"
|
date_from = "#{date_from} 17:59:59"
|
||||||
date_to = "#{date_to} 17:59:59"
|
date_to = "#{date_to} 17:59:59"
|
||||||
# 生成token用于直接点击登录
|
# 生成token用于直接点击登录
|
||||||
|
@ -270,10 +269,11 @@ class Mailer < ActionMailer::Base
|
||||||
total_count = @issues.count + @issues_journals.count + @course_messages.count + @project_messages.count + @course_news.count + @course_news_comments.count + @project_news.count + @project_news_comments.count +
|
total_count = @issues.count + @issues_journals.count + @course_messages.count + @project_messages.count + @course_news.count + @course_news_comments.count + @project_news.count + @project_news_comments.count +
|
||||||
@project_attachments.count + @course_journal_messages.count + @user_journal_messages.count + @project_journal_messages.count + @forums.count + @memos.count + @attachments.count +
|
@project_attachments.count + @course_journal_messages.count + @user_journal_messages.count + @project_journal_messages.count + @forums.count + @memos.count + @attachments.count +
|
||||||
@bids.count + @wiki_contents.count
|
@bids.count + @wiki_contents.count
|
||||||
|
subject = "[ #{user.show_name}#{l(:label_day_mail_first)}#{total_count}#{l(:label_day_mail_last)}]"
|
||||||
@subject = " #{user.show_name}#{l(:label_day_mail_first)}#{total_count}#{l(:label_day_mail_last)}"
|
@subject = " #{user.show_name}#{l(:label_day_mail_first)}#{total_count}#{l(:label_day_mail_last)}"
|
||||||
mylogger.debug "Sent activity mail : #{user.mail} - #{has_content}"
|
mylogger.debug "Sent activity mail : #{user.mail} - #{has_content}"
|
||||||
#有内容才发,没有不发
|
#有内容才发,没有不发
|
||||||
mail :to => user.mail,:subject => subject if has_content
|
mail :to => user.mail,:subject => @subject if has_content
|
||||||
end
|
end
|
||||||
|
|
||||||
# 作业截止时间邮件提醒
|
# 作业截止时间邮件提醒
|
||||||
|
|
Loading…
Reference in New Issue