grpc.go 453 B

1234567891011121314151617181920212223
  1. package dao
  2. import (
  3. "context"
  4. acc "go-common/app/service/main/account/api"
  5. accmdl "go-common/app/service/main/account/model"
  6. )
  7. // AccountCards get cards by mids
  8. func (d *Dao) AccountCards(ctx context.Context, mids []int64) (cards map[int64]*accmdl.Card, err error) {
  9. var (
  10. req = &acc.MidsReq{
  11. Mids: mids,
  12. }
  13. reply *acc.CardsReply
  14. )
  15. if reply, err = d.accountAPI.Cards3(ctx, req); err != nil {
  16. return
  17. }
  18. cards = reply.Cards
  19. return
  20. }