package logic import ( "app.yhyue.com/moapp/jyPoints/entity" "app.yhyue.com/moapp/jyPoints/rpc/integral" "app.yhyue.com/moapp/jyPoints/rpc/internal/svc" "context" "fmt" "github.com/zeromicro/go-zero/core/logx" ) type IntegralHarvestLogic struct { ctx context.Context svcCtx *svc.ServiceContext logx.Logger } func NewIntegralHarvestLogic(ctx context.Context, svcCtx *svc.ServiceContext) *IntegralHarvestLogic { return &IntegralHarvestLogic{ ctx: ctx, svcCtx: svcCtx, Logger: logx.WithContext(ctx), } } // 收获积分 func (l *IntegralHarvestLogic) IntegralHarvest(in *integral.Req) (*integral.Resp, error) { result := &integral.Resp{} dat := entity.FlowJSON{} dat.PointType = in.PointType dat.SourceId = in.SourceId dat.SourceType = in.SourceType dat.EndDate = in.EndDate dat.AppId = in.AppId dat.OperationType = in.OperationType dat.UserId = in.UserId dat.Point = in.Point dat.Abstract = in.Abstract code, msg, serialNumber := integralService.IntegralAddService(dat) fmt.Println(code, msg) result.Code = code result.SerialNumber = serialNumber result.Message = msg return result, nil }