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) }