Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_admin
杨树林 6 years ago
commit 8f63ee871e

@ -97,7 +97,7 @@ module TidingDecorator
elsif status == 2 elsif status == 2
I18n.t(locale_format(tiding_type, "#{status}_#{extra.nil?}"), reason: extra) % [name, second_name] I18n.t(locale_format(tiding_type, "#{status}_#{extra.nil?}"), reason: extra) % [name, second_name]
else else
I18n.t(locale_format(tiding_type, status)) % [name, second_name] I18n.t(locale_format(tiding_type, status), reason: extra) % [name, second_name]
end end
end end
@ -106,9 +106,9 @@ module TidingDecorator
if tiding_type == 'Apply' if tiding_type == 'Apply'
I18n.t(locale_format(tiding_type)) % name I18n.t(locale_format(tiding_type)) % name
elsif status == 2 elsif status == 2
I18n.t(locale_format(tiding_type, "#{status}_#{extra.nil?}"), reason: extra) % name I18n.t(locale_format(tiding_type, "#{status}_#{extra.nil?}"), name: name, reason: extra)
else else
I18n.t(locale_format(tiding_type, status)) % name I18n.t(locale_format(tiding_type, status), name: name, reason: extra)
end end
end end

@ -3,8 +3,18 @@
class ApplyUserAuthentication < ApplicationRecord class ApplyUserAuthentication < ApplicationRecord
belongs_to :user belongs_to :user
has_many :tidings, :as => :container, :dependent => :destroy
scope :real_name_auth, -> { where(auth_type: 1) } scope :real_name_auth, -> { where(auth_type: 1) }
scope :professional_auth, -> { where(auth_type: 2) } scope :professional_auth, -> { where(auth_type: 2) }
scope :processing, -> { where(status: 0) } scope :processing, -> { where(status: 0) }
scope :passed, -> { where(status: 1) } scope :passed, -> { where(status: 1) }
after_create :send_tiding
private
def send_tiding
self.tidings << Tiding.new(:user_id => '1', :status=> 0, :trigger_user_id => user_id, :belong_container_id => 1, :belong_container_type =>'User', :tiding_type => "Apply")
end
end end

@ -38,8 +38,8 @@
Apply_end: "申请添加单位:%s" Apply_end: "申请添加单位:%s"
System: System:
"1_end": "你提交的添加单位申请:%{name},审核已通过" "1_end": "你提交的添加单位申请:%{name},审核已通过"
"2_reason_end": "你提交的添加单位申请:%{name},审核未通过<br/><span>原因:%{reason}</span>" "2_false_end": "你提交的添加单位申请:%{name},审核未通过<br/><span>原因:%{reason}</span>"
"2_no_reason_end": "你提交的添加单位申请:%{name},审核未通过" "2_true_end": "你提交的添加单位申请:%{name},审核未通过"
"3_end": "你提交的添加单位申请:%{name},已被更改为:%{reason}" "3_end": "你提交的添加单位申请:%{name},已被更改为:%{reason}"
ApplyAction: ApplyAction:
ApplyShixun: ApplyShixun:

Loading…
Cancel
Save