package logic import ( "app.yhyue.com/moapp/jyPoints/rpc/integral" "context" "app.yhyue.com/moapp/jyPoints/api/internal/svc" "app.yhyue.com/moapp/jyPoints/api/internal/types" "github.com/zeromicro/go-zero/core/logx" ) type IntegralGuardLogic struct { logx.Logger ctx context.Context svcCtx *svc.ServiceContext } func NewIntegralGuardLogic(ctx context.Context, svcCtx *svc.ServiceContext) IntegralGuardLogic { return IntegralGuardLogic{ Logger: logx.WithContext(ctx), ctx: ctx, svcCtx: svcCtx, } } func (l *IntegralGuardLogic) IntegralGuard(req types.GuardReq) (*types.Response, error) { // todo: add your logic here and delete this line result := &types.Response{} lsi := l.svcCtx.Integral resp, err := lsi.IntegralGuard(l.ctx, &integral.Req{ EndDate: req.EndDate, }) if err != nil { return nil, err } result.Code = resp.Code result.Message = resp.Message return result, nil }