Bladeren bron

[智价云] 配置短信配置更新

tangyuanwang 1 dag geleden
bovenliggende
commit
c4b0d8615f
2 gewijzigde bestanden met toevoegingen van 9 en 7 verwijderingen
  1. 8 6
      app/Jobs/Manager/Process/SubNoticeJobs.php
  2. 1 1
      config/verifycode.php

+ 8 - 6
app/Jobs/Manager/Process/SubNoticeJobs.php

@@ -55,7 +55,7 @@ class SubNoticeJobs implements ShouldQueue
             $action_one = $this->send_low_price_goods_notice($company_id);
             $action_two = $this->send_violation_product($company_id);
             $action_three = $this->send_violation_store($company_id);
-            if(empty($this->user_data)) return true;
+            if (empty($this->user_data)) return true;
             if ($action_one && $action_two && $action_three) {
                 foreach ($this->user_data as $key => $value) {
                     $mobile = $value['mobile'];
@@ -63,15 +63,17 @@ class SubNoticeJobs implements ShouldQueue
                     $number1 = isset($this->user_data[$key]['lowprice_product_logids']) ? count($this->user_data[$key]['lowprice_product_logids']) : 0;
                     $number2 = isset($this->user_data[$key]['violation_product_logids']) ? count($this->user_data[$key]['violation_product_logids']) : 0;
                     $number3 = isset($this->user_data[$key]['violation_store_logids']) ? count($this->user_data[$key]['violation_store_logids']) : 0;
+                    //统计总条数
+                    $totle_number = $number1 + $number2 + $number3;
                     if (trim($mobile) != '') {
-                        $res_msg=Sms::sendContent($mobile, ['number1' => $number1, 'number2' => $number2, 'number3' => $number3], $sms_tpl_id);
-                        Log::info('job_send_sms', '订阅短信通知推送队列记录', ['email' => $mobile, 'sms_tpl_id' => $sms_tpl_id,'msg'=>$res_msg]);
+                        $res_msg = Sms::sendContent($mobile, ['totle_number' => $totle_number, 'number1' => $number1, 'number2' => $number2, 'number3' => $number3], $sms_tpl_id);
+                        Log::info('job_send_sms', '订阅短信通知推送队列记录', ['email' => $mobile, 'sms_tpl_id' => $sms_tpl_id, 'msg' => $res_msg]);
                     }
                     if (trim($email_to) != '') {
                         $email_title = '智价云违规数据通知提醒';
-                        $email_content = "智价云提醒、本次低价挂网商品共" . $number1 . "条、禁止挂网商品共" . $number2 . "条、禁止挂网店铺共" . $number3 . "条";
-                        $res_msg=$EmailVerifyCode->sendSmtpEmail($email_to, $email_title, $email_content);
-                        Log::info('job_send_email', '订阅邮件通知推送队列记录', ['email' => $email_to, 'email_content' => $email_content,'msg'=>$res_msg]);
+                        $email_content = "智价云提醒:本次采集总数据共". $totle_number ."条,其中低价挂网商品共". $number1 ."条、禁止挂网商品共". $number2 ."条、违规挂网店铺共". $number3 ."条。";
+                        $res_msg = $EmailVerifyCode->sendSmtpEmail($email_to, $email_title, $email_content);
+                        Log::info('job_send_email', '订阅邮件通知推送队列记录', ['email' => $email_to, 'email_content' => $email_content, 'msg' => $res_msg]);
                     }
                 }
             }

+ 1 - 1
config/verifycode.php

@@ -13,7 +13,7 @@ return [
     ],
     'aliyun_process_merge_notice'=>[
         'sms_sign'      => env('VERIFYCODE_ALIYUN_SMS_SIGN', '开邻'),
-        'sms_tpl'       => env('VERIFYCODE_ALIYUN_SMS_TPL', 'SMS_505085134'),
+        'sms_tpl'       => env('VERIFYCODE_ALIYUN_SMS_TPL', 'SMS_505100128'),
     ],
     'guodu'=>[
         'sms_sign'      => env('VERIFYCODE_GUODU_SMS_SIGN', '开邻'),