From 1120b3804227304c470a5ed62bd87c46ecc87cc9 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Tue, 17 Sep 2019 14:51:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E5=90=8D=E8=AE=A4=E8=AF=81=E5=8A=A0ca?= =?UTF-8?q?che=EF=BC=8C5=E5=88=86=E9=92=9F=E5=86=85=E4=B8=8D=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E5=8F=91=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/users/apply_trail_service.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/services/users/apply_trail_service.rb b/app/services/users/apply_trail_service.rb index 61563c301..45abd8d1b 100644 --- a/app/services/users/apply_trail_service.rb +++ b/app/services/users/apply_trail_service.rb @@ -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