video_track.go 714 B

12345678910111213141516171819202122
  1. package archive
  2. import (
  3. "context"
  4. "go-common/library/log"
  5. )
  6. const (
  7. _inVideoHis = "INSERT INTO archive_video_track(aid,filename,status,xcode_state,remark,ctime,mtime) VALUES(?,?,?,?,?,?,?)"
  8. )
  9. // AddVideoTrack insert video track history
  10. func (d *Dao) AddVideoTrack(c context.Context, aid int64, filename string, status int16, xcodeState int8, remark string, ctime, mtime string) (rows int64, err error) {
  11. rs, err := d.db.Exec(c, _inVideoHis, aid, filename, status, xcodeState, remark, ctime, mtime)
  12. if err != nil {
  13. log.Error("d.inVideoHisStmt.Exec(%d, %s, %d, %d, %s, %s, %s) error(%v)", aid, filename, status, xcodeState, remark, ctime, mtime, err)
  14. return
  15. }
  16. rows, err = rs.RowsAffected()
  17. return
  18. }