bgm_white_list.go 406 B

12345678910111213141516171819
  1. package dao
  2. import (
  3. "context"
  4. )
  5. const (
  6. // insert
  7. _inBgmWhiteSQL = "INSERT INTO bgm_white_list(mid) VALUES (?) ON DUPLICATE KEY UPDATE mid = VALUES(mid)"
  8. )
  9. // InsertBgmWhiteList insert into bgm_white_list
  10. func (d *Dao) InsertBgmWhiteList(c context.Context, mid int64) (rows int64, err error) {
  11. res, err := d.db.Exec(c, _inBgmWhiteSQL, mid)
  12. if err != nil {
  13. return
  14. }
  15. return res.RowsAffected()
  16. }