代码优化

This commit is contained in:
wong
2025-12-01 18:09:06 +08:00
parent 2c37314c4f
commit 354d6c4f62

View File

@@ -351,7 +351,7 @@ class MessageController extends BaseController
// 检查消息是否已存在
$exists = WechatMessageModel::where('id', $item['id']) ->find();
if ($exists['sendStatus'] == 0){
if (!empty($exists) && $exists['sendStatus'] == 0){
return true;
}
@@ -472,7 +472,7 @@ class MessageController extends BaseController
// 检查消息是否已存在
$exists = WechatMessageModel::where('id', $item['id'])->find();
if ($exists['sendStatus'] == 0){
if (!empty($exists) && $exists['sendStatus'] == 0){
return true;
}