合并分支 'master-server' 到 'master'
gx数据 查看合并请求 !1000
正在显示
1 个修改的文件
包含
7 行增加
和
5 行删除
| @@ -39,17 +39,20 @@ class SendAutoEmail extends Command | @@ -39,17 +39,20 @@ class SendAutoEmail extends Command | ||
| 39 | $smtpModel = new Smtp(); | 39 | $smtpModel = new Smtp(); |
| 40 | $smtpInfo = $smtpModel->read(['project_id'=>$value['project_id']]); | 40 | $smtpInfo = $smtpModel->read(['project_id'=>$value['project_id']]); |
| 41 | if($smtpInfo === false){ | 41 | if($smtpInfo === false){ |
| 42 | + $status = AutoEmailLog::STATUS_ERROR; | ||
| 42 | $this->output('任务:' . $smtpInfo['id'] . '失败,未配置SMTP'); | 43 | $this->output('任务:' . $smtpInfo['id'] . '失败,未配置SMTP'); |
| 43 | - continue; | 44 | + }else{ |
| 45 | + $status = $this->toQueue($value,$smtpInfo); | ||
| 44 | } | 46 | } |
| 45 | - $this->toQueue($value,$smtpInfo); | 47 | + $autoEmailLogModel = new AutoEmailLog(); |
| 48 | + $autoEmailLogModel->edit(['status'=>$status],['id'=>$value['id']]); | ||
| 46 | } | 49 | } |
| 47 | } | 50 | } |
| 48 | return true; | 51 | return true; |
| 49 | } | 52 | } |
| 50 | 53 | ||
| 51 | /** | 54 | /** |
| 52 | - * @remark :执行方法 | 55 | + * @remark :发送邮件 |
| 53 | * @name :toQueue | 56 | * @name :toQueue |
| 54 | * @author :lyh | 57 | * @author :lyh |
| 55 | * @method :post | 58 | * @method :post |
| @@ -68,8 +71,7 @@ class SendAutoEmail extends Command | @@ -68,8 +71,7 @@ class SendAutoEmail extends Command | ||
| 68 | $status = AutoEmailLog::STATUS_ERROR; | 71 | $status = AutoEmailLog::STATUS_ERROR; |
| 69 | $this->output('任务:' . $info['id'] . ' 邮箱' . $info['email'] . '发送失败,' . $e->getMessage()); | 72 | $this->output('任务:' . $info['id'] . ' 邮箱' . $info['email'] . '发送失败,' . $e->getMessage()); |
| 70 | } | 73 | } |
| 71 | - $autoEmailLogModel = new AutoEmailLog(); | ||
| 72 | - return $autoEmailLogModel->edit(['status'=>$status],['id'=>$info['id']]); | 74 | + return $status; |
| 73 | } | 75 | } |
| 74 | 76 | ||
| 75 | /** | 77 | /** |
-
请 注册 或 登录 后发表评论