开发ca,修正手机号获取验证码log表
This commit is contained in:
@@ -3,7 +3,7 @@ namespace Extend\Alibaba;
|
||||
|
||||
use App\Constants\HttpEnumCode;
|
||||
use App\Exception\BusinessException;
|
||||
use App\Model\LogCode;
|
||||
use App\Model\LogSms;
|
||||
use Darabonba\OpenApi\OpenApiClient;
|
||||
use AlibabaCloud\OpenApiUtil\OpenApiUtilClient;
|
||||
|
||||
@@ -68,9 +68,9 @@ class Dysms
|
||||
* @param string $phone_numbers 手机号
|
||||
* @param array $template_param 参数
|
||||
* @param string $template_code 短信模版编码
|
||||
* @param int $scene 场景
|
||||
* @param int $scene_desc 场景
|
||||
*/
|
||||
public static function sendSms(string $phone_numbers,array $template_param,string $template_code,int $scene): void
|
||||
public static function sendSms(string $phone_numbers,array $template_param,string $template_code,int $scene_desc): void
|
||||
{
|
||||
$config = config("alibaba.dysms");
|
||||
|
||||
@@ -113,12 +113,12 @@ class Dysms
|
||||
$data = array();
|
||||
$data['type'] = 1;
|
||||
$data['status'] = 1;
|
||||
$data['scene'] = $scene;
|
||||
$data['phone'] = $phone_numbers;
|
||||
$data['code'] = $template_code;
|
||||
$data['template_code'] = $template_code;
|
||||
$data['third_code'] = $result['body']['RequestId'];
|
||||
$data['scene_desc'] = $scene_desc;
|
||||
$data['remarks'] = json_encode($template_param,JSON_UNESCAPED_UNICODE);
|
||||
$res = LogCode::addCodeLog($data);
|
||||
$res = LogSms::addCodeLog($data);
|
||||
if (empty($res)){
|
||||
// 发送成功,记录失败
|
||||
throw new BusinessException(HttpEnumCode::getMessage(HttpEnumCode::CODE_FAIL));
|
||||
|
||||
Reference in New Issue
Block a user