|
|
@@ -50,11 +50,12 @@ class SubNoticeJobs implements ShouldQueue
|
|
|
{
|
|
|
try {
|
|
|
$EmailVerifyCode = new EmailVerifyCode();
|
|
|
- $sms_tpl_id = config('verifycode.aliyun_process_lowprice_product.sms_tpl');
|
|
|
+ $sms_tpl_id = config('verifycode.aliyun_process_merge_notice.sms_tpl');
|
|
|
$company_id = $this->message_data['company_id'];
|
|
|
$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 ($action_one && $action_two && $action_three) {
|
|
|
foreach ($this->user_data as $key => $value) {
|
|
|
$mobile = $value['mobile'];
|
|
|
@@ -63,19 +64,19 @@ class SubNoticeJobs implements ShouldQueue
|
|
|
$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;
|
|
|
if (trim($mobile) != '') {
|
|
|
- // Sms::sendContent($mobile, ['number1' => $number1, 'number2' => $number2, 'number3' => $number3], $sms_tpl_id);
|
|
|
+ $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]);
|
|
|
}
|
|
|
if (trim($email_to) != '') {
|
|
|
$email_title = '智价云违规数据通知提醒';
|
|
|
$email_content = "智价云提醒、本次低价挂网商品共" . $number1 . "条、禁止挂网商品共" . $number2 . "条、禁止挂网店铺共" . $number3 . "条";
|
|
|
- $EmailVerifyCode->sendSmtpEmail($email_to, $email_title, $email_content);
|
|
|
+ $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]);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
} catch (\Exception $e) {
|
|
|
Log::info('job_error', '订阅短信通知推送队列失败', ['data' => $this->message_data, 'error' => $e->getMessage()]);
|
|
|
- print_r($e->getMessage());
|
|
|
- exit;
|
|
|
}
|
|
|
}
|
|
|
|