Commit 5556bdc8 authored by 冯超鹏's avatar 冯超鹏

no message

parent 0a346240
...@@ -41,23 +41,23 @@ class ExampleJob extends Job ...@@ -41,23 +41,23 @@ class ExampleJob extends Job
$container = $caturt->getContainer(); $container = $caturt->getContainer();
$this->redisClient = $container->get(\Redis::class); $this->redisClient = $container->get(\Redis::class);
// 判断redis是否有当前已发送信息 // 判断redis是否有当前已发送信息
// if (!$this->redisClient->get($data['typedevicenum'])) { if (!$this->redisClient->get($data['typedevicenum'])) {
// $template_param = ['cphone' => $data['phone'], 'position' => '您的设备尾号为' . $data['devicenum'], 'alarm' => '离线']; $template_param = ['cphone' => $data['phone'], 'position' => '您的设备尾号为' . $data['devicenum'], 'alarm' => '离线'];
// $params = array( $params = array(
// 'SignName' => '泽宏云', 'SignName' => '泽宏云',
// 'AccessKeyId' => 'LTAI2xiZNF3iV2aV', 'AccessKeyId' => 'LTAI2xiZNF3iV2aV',
// 'TemplateCode' => 'SMS_169897307', 'TemplateCode' => 'SMS_169897307',
// 'PhoneNumbers' => $data['phone'], 'PhoneNumbers' => $data['phone'],
// 'TemplateParam' => json_encode($template_param, JSON_UNESCAPED_UNICODE), 'TemplateParam' => json_encode($template_param, JSON_UNESCAPED_UNICODE),
// 'RegionId' => 'cn-beijing', 'RegionId' => 'cn-beijing',
// ); );
// $accessKeySecret = 'bprEWwn1M0xgglRQCQEMYSPiYctDk4'; $accessKeySecret = 'bprEWwn1M0xgglRQCQEMYSPiYctDk4';
// $response = $sms->sendSms($accessKeySecret, $params); $response = $sms->sendSms($accessKeySecret, $params);
// if ($response['Message'] == 'OK' && $response['Code'] == 'OK') { if ($response['Message'] == 'OK' && $response['Code'] == 'OK') {
// $redisdata = ['data'=>$data,'sendSms'=>$response,'time'=>time()]; $redisdata = ['data'=>$data,'sendSms'=>$response,'time'=>time()];
// $this->redisClient->set($data['typedevicenum'], json_encode($redisdata)); $this->redisClient->set($data['typedevicenum'], json_encode($redisdata));
// } }
// } }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment