danmu.go 529 B

123456789101112131415161718192021
  1. package dao
  2. import (
  3. "context"
  4. "go-common/app/interface/bbq/app-bbq/model"
  5. "go-common/library/log"
  6. )
  7. const (
  8. _queryDanmu = "select oid,mid,offset,content from bullet_content where id = ?"
  9. )
  10. //RawBullet ...
  11. func (d *Dao) RawBullet(ctx context.Context, danmu int64) (v *model.Danmu, err error) {
  12. v = new(model.Danmu)
  13. if err = d.dbDM.QueryRow(ctx, _queryDanmu, danmu).Scan(&v.OID, &v.MID, &v.Offset, &v.Content); err != nil {
  14. log.Errorw(ctx, "content", "query danmu", "err", err, "danmu id", danmu)
  15. return
  16. }
  17. return
  18. }