go-common/app/interface/main/app-view/dao/bangumi/grpc.go
2019-04-22 18:49:16 +08:00

22 lines
491 B
Go

package bangumi
import (
"context"
seasongrpc "go-common/app/service/openplatform/pgc-season/api/grpc/season/v1"
"github.com/pkg/errors"
)
// CardsInfoReply pgc cards info
func (d *Dao) CardsInfoReply(c context.Context, seasonIds []int32) (res map[int32]*seasongrpc.CardInfoProto, err error) {
arg := &seasongrpc.SeasonInfoReq{SeasonIds: seasonIds}
info, err := d.rpcClient.Cards(c, arg)
if err != nil {
err = errors.Wrapf(err, "%v", arg)
return
}
res = info.Cards
return
}