实名认证加cache,5分钟内不重复发信息

dev_ec
cxt 5 years ago
parent e3d99170ff
commit 1120b38042

@ -24,7 +24,11 @@ class Users::ApplyTrailService < ApplicationService
apply.status = 1
else
send_trial_apply_notify!
sms_cache = Rails.cache.read("apply_auth")
if sms_cache.nil?
send_trial_apply_notify!
Rails.cache.write("apply_auth", 1, expires_in: 5.minutes)
end
end
apply.save!
end

Loading…
Cancel
Save