subtitle.go 607 B

1234567891011121314151617181920212223242526
  1. package danmu
  2. import (
  3. "context"
  4. "go-common/app/interface/main/creative/model/danmu"
  5. "go-common/app/interface/main/dm2/model"
  6. "go-common/library/log"
  7. )
  8. // SubView fn
  9. func (s *Service) SubView(c context.Context, aid int64, ip string) (ret *danmu.SubtitleSubjectReply, err error) {
  10. var sub *model.SubtitleSubjectReply
  11. if sub, err = s.sub.View(c, aid); err != nil {
  12. log.Error("s.sub.View err(%v) | aid(%d), ip(%s)", err, aid, ip)
  13. return
  14. }
  15. if sub != nil {
  16. ret = &danmu.SubtitleSubjectReply{
  17. AllowSubmit: sub.AllowSubmit,
  18. Lan: sub.Lan,
  19. LanDoc: sub.LanDoc,
  20. }
  21. }
  22. return
  23. }