Browse Source

修复错误

Robin 6 years ago
parent
commit
19a92912e3
1 changed files with 2 additions and 2 deletions
  1. 2 2
      normandcrm/service/backend/helpers/MailHelper.php

+ 2 - 2
normandcrm/service/backend/helpers/MailHelper.php

@@ -218,7 +218,7 @@ class MailHelper
             $connection=Yii::$app->db;
             $time = time() - 300;
             //将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);
             $rowCount=$command->execute();
         }else{
@@ -510,7 +510,7 @@ class MailHelper
             $connection=Yii::$app->db;
             $time = time() - 300;
             //将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);
             $rowCount=$command->execute();
             return false;