package logic import ( "context" "fmt" "points_service/entity" "points_service/rpc/integral" "points_service/rpc/internal/svc" "github.com/tal-tech/go-zero/core/logx" ) type IntegralExpireCheckLogic struct { ctx context.Context svcCtx *svc.ServiceContext logx.Logger } func NewIntegralExpireCheckLogic(ctx context.Context, svcCtx *svc.ServiceContext) *IntegralExpireCheckLogic { return &IntegralExpireCheckLogic{ ctx: ctx, svcCtx: svcCtx, Logger: logx.WithContext(ctx), } } // 到期积分查询 func (l *IntegralExpireCheckLogic) IntegralExpireCheck(in *integral.AddReq) (*integral.AddResp, error) { // todo: add your logic here and delete this line result := &integral.AddResp{} dat := entity.ExpireJSON{} dat.UserId = in.UserId dat.EndDate = "2021-03-16" dat.AppId = 10000 dataType,points := integralService.IntegralExpireCheckService(dat) res := make(map[string]interface{}) res["code"] = dataType res["data"] = points res["msg"] = "到期积分查询成功" fmt.Println(res) result.Status = true return result,nil }