mirror of
https://github.com/iLoveElysia/openbilibili.git
synced 2026-06-08 14:08:30 -05:00
24 lines
570 B
Go
24 lines
570 B
Go
|
|
package income
|
||
|
|
|
||
|
|
import (
|
||
|
|
"go-common/library/database/sql"
|
||
|
|
"go-common/library/log"
|
||
|
|
)
|
||
|
|
|
||
|
|
// TxUpdateUpInfoScore update up_info_video score
|
||
|
|
func (s *Service) TxUpdateUpInfoScore(tx *sql.Tx, mid int64, score int) (err error) {
|
||
|
|
_, err = s.dao.TxUpdateUpInfoScore(tx, "up_info_video", score, mid)
|
||
|
|
if err != nil {
|
||
|
|
tx.Rollback()
|
||
|
|
log.Error("s.dao.TxUpdateUpInfoScore error(%v)", err)
|
||
|
|
return err
|
||
|
|
}
|
||
|
|
|
||
|
|
_, err = s.dao.TxUpdateUpInfoScore(tx, "up_info_column", score, mid)
|
||
|
|
if err != nil {
|
||
|
|
tx.Rollback()
|
||
|
|
log.Error("s.dao.TxUpdateUpInfoScore error(%v)", err)
|
||
|
|
}
|
||
|
|
return
|
||
|
|
}
|