mysql.go 403 B

1234567891011121314151617181920
  1. package dao
  2. import (
  3. "context"
  4. "github.com/pkg/errors"
  5. )
  6. const (
  7. _updateExpireTime = "UPDATE `user_card_equip` SET `expire_time` = ? WHERE `mid` = ?;"
  8. )
  9. // UpdateExpireTime update expire time.
  10. func (d *Dao) UpdateExpireTime(c context.Context, t int64, mid int64) (err error) {
  11. if _, err = d.db.Exec(c, _updateExpireTime, t, mid); err != nil {
  12. err = errors.WithStack(err)
  13. return
  14. }
  15. return
  16. }