go-common/app/interface/main/videoup/dao/subtitle/subtitle.go

23 lines
519 B
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
package subtitle
import (
"context"
"go-common/app/interface/main/dm2/model"
"go-common/library/ecode"
"go-common/library/log"
)
// Update fn
func (d *Dao) Update(c context.Context, aid int64, open bool, lan string) (err error) {
var arg = &model.ArgSubtitleAllowSubmit{
Aid: aid,
AllowSubmit: open,
Lan: lan,
}
if err = d.sub.SubtitleSujectSubmit(c, arg); err != nil {
log.Error("d.sub.SubtitleSujectSubmit (%+v) error(%v)", arg, err)
err = ecode.CreativeSubtitleAPIErr
}
return
}