integralexpirechecklogic.go 1022 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package logic
  2. import (
  3. "app.yhyue.com/moapp/jyPoints/entity"
  4. "context"
  5. "app.yhyue.com/moapp/jyPoints/rpc/integral"
  6. "app.yhyue.com/moapp/jyPoints/rpc/internal/svc"
  7. "github.com/zeromicro/go-zero/core/logx"
  8. )
  9. type IntegralExpireCheckLogic struct {
  10. ctx context.Context
  11. svcCtx *svc.ServiceContext
  12. logx.Logger
  13. }
  14. func NewIntegralExpireCheckLogic(ctx context.Context, svcCtx *svc.ServiceContext) *IntegralExpireCheckLogic {
  15. return &IntegralExpireCheckLogic{
  16. ctx: ctx,
  17. svcCtx: svcCtx,
  18. Logger: logx.WithContext(ctx),
  19. }
  20. }
  21. // 到期积分查询
  22. func (l *IntegralExpireCheckLogic) IntegralExpireCheck(in *integral.Req) (*integral.Resp, error) {
  23. // todo: add your logic here and delete this line
  24. result := &integral.Resp{}
  25. dat := entity.ExpireJSON{}
  26. dat.UserId = in.UserId
  27. dat.EndDate = "2021-03-16"
  28. dat.AppId = "10000"
  29. dataType, points := integralService.IntegralExpireCheckService(dat)
  30. result.Code = dataType
  31. result.Data = points
  32. result.Message = "到期积分查询成功"
  33. return result, nil
  34. }