user.go 314 B

12345678910111213141516
  1. package dao
  2. import (
  3. "context"
  4. )
  5. const (
  6. _queryUserFansNum = "select `fan_total` from `user_statistics` where mid = ?;"
  7. )
  8. // FetchUserFansNum .
  9. func (d *Dao) FetchUserFansNum(c context.Context, mid int64) (num int, err error) {
  10. row := d.db.QueryRow(c, _queryUserFansNum, mid)
  11. err = row.Scan(&num)
  12. return
  13. }