subtitle.go 519 B

12345678910111213141516171819202122
  1. package subtitle
  2. import (
  3. "context"
  4. "go-common/app/interface/main/dm2/model"
  5. "go-common/library/ecode"
  6. "go-common/library/log"
  7. )
  8. // Update fn
  9. func (d *Dao) Update(c context.Context, aid int64, open bool, lan string) (err error) {
  10. var arg = &model.ArgSubtitleAllowSubmit{
  11. Aid: aid,
  12. AllowSubmit: open,
  13. Lan: lan,
  14. }
  15. if err = d.sub.SubtitleSujectSubmit(c, arg); err != nil {
  16. log.Error("d.sub.SubtitleSujectSubmit (%+v) error(%v)", arg, err)
  17. err = ecode.CreativeSubtitleAPIErr
  18. }
  19. return
  20. }