diff --git a/app/command/QuerySmsStatus.php b/app/command/QuerySmsStatus.php index 35a83cf..8ff74d1 100644 --- a/app/command/QuerySmsStatus.php +++ b/app/command/QuerySmsStatus.php @@ -123,7 +123,9 @@ class QuerySmsStatus extends Command ]; $update_status = Db::table('sms_push_event_record')->where(['id' => $value['id']])->update($update_data); // 只要有一个发送成功的就更改状态发送成功 - Db::table('sms_push_event')->where(['id' => $value['event_id']])->update(['status' => 2]); + if($push_status == 2) { + Db::table('sms_push_event')->where(['id' => $value['event_id']])->update(['status' => 2]); + } Log::info('营销短信查询完毕数据库更新结果---》[ID]' . $value['id'] . '更新结果-->' . $update_status . '-->更新数据 . ' . json_encode($update_data)); } Db::commit();