account.go 467 B

12345678910111213141516171819
  1. package dao
  2. import (
  3. "context"
  4. "go-common/app/service/main/account/api"
  5. "go-common/library/log"
  6. )
  7. // AccountInfo queries account info by user id.
  8. func (d *Dao) AccountInfo(c context.Context, mid int64) (ai *api.Info, err error) {
  9. req := &api.MidReq{Mid: int64(mid)}
  10. res, err := d.accCli.Info3(c, req)
  11. if err != nil {
  12. log.Error("d.AccountInfo(%d) err(%v)", mid, err)
  13. return
  14. }
  15. log.Info("d.AccountInfo(%d) res(%+v)", mid, res.Info)
  16. return res.Info, nil
  17. }