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