|
@@ -218,7 +218,7 @@ class MailHelper
|
|
|
$connection=Yii::$app->db;
|
|
$connection=Yii::$app->db;
|
|
|
$time = time() - 300;
|
|
$time = time() - 300;
|
|
|
//将5分钟内发送给相同收件人和相同主题的发件记录设置为不可发送状态
|
|
//将5分钟内发送给相同收件人和相同主题的发件记录设置为不可发送状态
|
|
|
- $sql = "update crm_mail_record set status = 2 where subject = $subject and receiver = $to and in_time > $time";
|
|
|
|
|
|
|
+ $sql = "update crm_mail_record set status = 2 where subject = '$subject' and receiver = $to and in_time > $time";
|
|
|
$command=$connection->createCommand($sql);
|
|
$command=$connection->createCommand($sql);
|
|
|
$rowCount=$command->execute();
|
|
$rowCount=$command->execute();
|
|
|
}else{
|
|
}else{
|
|
@@ -510,7 +510,7 @@ class MailHelper
|
|
|
$connection=Yii::$app->db;
|
|
$connection=Yii::$app->db;
|
|
|
$time = time() - 300;
|
|
$time = time() - 300;
|
|
|
//将5分钟内发送给相同收件人和相同主题的发件记录设置为不可发送状态
|
|
//将5分钟内发送给相同收件人和相同主题的发件记录设置为不可发送状态
|
|
|
- $sql = "update crm_mail_record set status = 2 where subject = $subject and receiver = $to and in_time > $time";
|
|
|
|
|
|
|
+ $sql = "update crm_mail_record set status = 2 where subject = '$subject' and receiver = $to and in_time > $time";
|
|
|
$command=$connection->createCommand($sql);
|
|
$command=$connection->createCommand($sql);
|
|
|
$rowCount=$command->execute();
|
|
$rowCount=$command->execute();
|
|
|
return false;
|
|
return false;
|