12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- 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 IntegralExpireCheckLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
- }
- func NewIntegralExpireCheckLogic(ctx context.Context, svcCtx *svc.ServiceContext) IntegralExpireCheckLogic {
- return IntegralExpireCheckLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- }
- }
- func (l *IntegralExpireCheckLogic) IntegralExpireCheck(req types.ExpireReq) (*types.Response, error) {
- // todo: add your logic here and delete this line
- result := &types.Response{}
- lsi := l.svcCtx.Integral
- resp, err := lsi.IntegralExpireCheck(l.ctx, &integral.Req{
- UserId: req.UserId,
- AppId: req.AppId,
- EndDate: req.EndDate,
- })
- if err != nil {
- return nil, err
- }
- result.Code = resp.Code
- result.Data = resp.Data
- result.Message = resp.Message
- return result, nil
- }
|