From 12a2f2e48c5a75d6ffb6c2645b2666fd7b52cda8 Mon Sep 17 00:00:00 2001 From: weigang Date: Tue, 22 Sep 2020 13:02:00 +0800 Subject: [PATCH] =?UTF-8?q?=E9=AA=8C=E8=AF=81=E7=A0=81=E4=B8=8D=E5=85=A8?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Service/v3/Implementations/SmsAliSendService.php | 6 +++--- app/Service/v3/Implementations/VerifyCodeService.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Service/v3/Implementations/SmsAliSendService.php b/app/Service/v3/Implementations/SmsAliSendService.php index 34bc7ea..1c2660c 100644 --- a/app/Service/v3/Implementations/SmsAliSendService.php +++ b/app/Service/v3/Implementations/SmsAliSendService.php @@ -51,13 +51,13 @@ class SmsAliSendService implements SmsSendServiceInterface ->request(); return $result->toArray(); } catch (ClientException $e) { - $this->log->event('alisms', ['alisms_error_ClientException' => $e->getErrorMessage()]); + $this->log->event('alisms', ['alisms_error_ClientException' => $e->getErrorMessage(), 'tel' => $tel, 'template' => json_encode($templateParams)]); throw new ErrorCodeException(ErrorCode::SMS_SEND_FAILURE); } catch (ServerException $e) { - $this->log->event('alisms', ['alisms_error_ServerException' => $e->getErrorMessage()]); + $this->log->event('alisms', ['alisms_error_ServerException' => $e->getErrorMessage(), 'tel' => $tel, 'template' => json_encode($templateParams)]); throw new ErrorCodeException(ErrorCode::SMS_SEND_FAILURE); } catch (Exception $e) { - $this->log->event('alisms', ['alisms_error_Exception' => $e->getErrorMessage()]); + $this->log->event('alisms', ['alisms_error_Exception' => $e->getErrorMessage(), 'tel' => $tel, 'template' => json_encode($templateParams)]); throw new ErrorCodeException(ErrorCode::SMS_SEND_FAILURE); } } diff --git a/app/Service/v3/Implementations/VerifyCodeService.php b/app/Service/v3/Implementations/VerifyCodeService.php index 156df20..5f06aa1 100644 --- a/app/Service/v3/Implementations/VerifyCodeService.php +++ b/app/Service/v3/Implementations/VerifyCodeService.php @@ -55,7 +55,7 @@ class VerifyCodeService implements VerifyCodeServiceInterface // 发送短信 $smsRes = $this->smsService->doVerifyCode($tel, $verifyCode); if (!$smsRes) { - throw new ErrorCodeException(ErrorCode::VERIFY_CODE_ERROR); + throw new ErrorCodeException(ErrorCode::VERIFY_CODE_ERROR, '', ['tel' => $tel, 'verifyCode' => $verifyCode]); } return true;