1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- package logic
- import (
- "context"
- "fmt"
- "app.yhyue.com/moapp/jyPoints/entity"
- "app.yhyue.com/moapp/jyPoints/rpc/integral"
- "app.yhyue.com/moapp/jyPoints/rpc/internal/svc"
- "github.com/tal-tech/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.BusinessTypeId = in.BusinessTypeId
- dat.BusinessType = in.BusinessType
- dat.EndDate = in.EndDate
- dat.AppId = in.AppId
- dat.OperationType = in.OperationType
- dat.UserId = in.UserId
- dat.Point = in.Point
- code, msg := integralService.IntegralAddService(dat)
- fmt.Println(code, msg)
- result.Code = code
- result.Message = msg
- return result, nil
- }
|