integralexpirechecklogic.go 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. package logic
  2. import (
  3. "context"
  4. "fmt"
  5. "points_service/entity"
  6. "points_service/rpc/integral"
  7. "points_service/rpc/internal/svc"
  8. "github.com/tal-tech/go-zero/core/logx"
  9. )
  10. type IntegralExpireCheckLogic struct {
  11. ctx context.Context
  12. svcCtx *svc.ServiceContext
  13. logx.Logger
  14. }
  15. func NewIntegralExpireCheckLogic(ctx context.Context, svcCtx *svc.ServiceContext) *IntegralExpireCheckLogic {
  16. return &IntegralExpireCheckLogic{
  17. ctx: ctx,
  18. svcCtx: svcCtx,
  19. Logger: logx.WithContext(ctx),
  20. }
  21. }
  22. // 到期积分查询
  23. func (l *IntegralExpireCheckLogic) IntegralExpireCheck(in *integral.AddReq) (*integral.AddResp, error) {
  24. // todo: add your logic here and delete this line
  25. result := &integral.AddResp{}
  26. dat := entity.ExpireJSON{}
  27. dat.UserId = "ABC"
  28. dat.PointType = 1
  29. dat.EndDate = "2021-03-16"
  30. dat.AppId = 10000
  31. data := integralService.IntegralExpireCheckService(dat)
  32. res := make(map[string]interface{})
  33. res["data"] = data
  34. fmt.Println(res)
  35. result.Status = true
  36. /*result.Code = -1
  37. result.Data = res
  38. result.Msg = "查询列表失败"*/
  39. return result,nil
  40. }