From b50c47af676e721493554a64279e3bf3177b46ed Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Mon, 24 Apr 2023 11:47:23 +0800 Subject: [PATCH] update --- internal/logic/domain/message/repo/message_repo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/logic/domain/message/repo/message_repo.go b/internal/logic/domain/message/repo/message_repo.go index 4c48df3..47a3a4f 100644 --- a/internal/logic/domain/message/repo/message_repo.go +++ b/internal/logic/domain/message/repo/message_repo.go @@ -53,7 +53,7 @@ func (d *messageRepo) ListBySeq(userId, seq, limit int64) ([]model.Message, bool // GetMessage 获取消息状态 func (d *messageRepo) GetMessage(senderId, seq int64) (*model.Message, error) { var message model.Message - if err := db.DB.Table(d.tableName(senderId)).Where("sender_id = ? and seq = ?", senderId, seq). + if err := db.DB.Table(d.tableName(senderId)).Where("user_id = ? and seq = ?", senderId, seq). First(&message).Error; err != nil { return nil, gerrors.WrapError(err) }