From e588128f9016ee99881c25e6b380ec21dec6db85 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 6 Sep 2019 18:20:03 +0800 Subject: [PATCH] sms --- app/services/users/apply_professional_auth_service.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/services/users/apply_professional_auth_service.rb b/app/services/users/apply_professional_auth_service.rb index 07afe18ae..a920caf55 100644 --- a/app/services/users/apply_professional_auth_service.rb +++ b/app/services/users/apply_professional_auth_service.rb @@ -38,7 +38,11 @@ class Users::ApplyProfessionalAuthService < ApplicationService move_image_file! unless params[:upload_image].to_s == 'false' - sms_notify_admin + sms_cache = Rails.cache.read("apply_pro_certification") + if sms_cache.nil? + sms_notify_admin + Rails.cache.write("apply_pro_certification", 1) + end end end