12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- // Code generated by goctl. DO NOT EDIT!
- // Source: integral.proto
- //go:generate mockgen -destination ./integral_mock.go -package integralclient -source $GOFILE
- package integralclient
- import (
- "context"
- "app.yhyue.com/moapp/jyPoints/rpc/integral"
- "github.com/tal-tech/go-zero/zrpc"
- )
- type (
- Req = integral.Req
- Resp = integral.Resp
- RespList = integral.RespList
- Point = integral.Point
- Integral interface {
- // 收获积分
- IntegralHarvest(ctx context.Context, in *Req) (*Resp, error)
- // 消耗积分
- IntegralConsume(ctx context.Context, in *Req) (*Resp, error)
- // 积分余额查询
- IntegralBalanceCheck(ctx context.Context, in *Req) (*Resp, error)
- // 积分明细查询
- IntegralDetailedCheck(ctx context.Context, in *Req) (*RespList, error)
- // 积分守护
- IntegralGuard(ctx context.Context, in *Req) (*Resp, error)
- // 到期积分查询
- IntegralExpireCheck(ctx context.Context, in *Req) (*Resp, error)
- }
- defaultIntegral struct {
- cli zrpc.Client
- }
- )
- func NewIntegral(cli zrpc.Client) Integral {
- return &defaultIntegral{
- cli: cli,
- }
- }
- // 收获积分
- func (m *defaultIntegral) IntegralHarvest(ctx context.Context, in *Req) (*Resp, error) {
- client := integral.NewIntegralClient(m.cli.Conn())
- return client.IntegralHarvest(ctx, in)
- }
- // 消耗积分
- func (m *defaultIntegral) IntegralConsume(ctx context.Context, in *Req) (*Resp, error) {
- client := integral.NewIntegralClient(m.cli.Conn())
- return client.IntegralConsume(ctx, in)
- }
- // 积分余额查询
- func (m *defaultIntegral) IntegralBalanceCheck(ctx context.Context, in *Req) (*Resp, error) {
- client := integral.NewIntegralClient(m.cli.Conn())
- return client.IntegralBalanceCheck(ctx, in)
- }
- // 积分明细查询
- func (m *defaultIntegral) IntegralDetailedCheck(ctx context.Context, in *Req) (*RespList, error) {
- client := integral.NewIntegralClient(m.cli.Conn())
- return client.IntegralDetailedCheck(ctx, in)
- }
- // 积分守护
- func (m *defaultIntegral) IntegralGuard(ctx context.Context, in *Req) (*Resp, error) {
- client := integral.NewIntegralClient(m.cli.Conn())
- return client.IntegralGuard(ctx, in)
- }
- // 到期积分查询
- func (m *defaultIntegral) IntegralExpireCheck(ctx context.Context, in *Req) (*Resp, error) {
- client := integral.NewIntegralClient(m.cli.Conn())
- return client.IntegralExpireCheck(ctx, in)
- }
|