|
|
|
package serviceGame
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"tyj_admin/api/v1/game"
|
|
|
|
"tyj_admin/internal/serviceGame/internal"
|
|
|
|
)
|
|
|
|
|
|
|
|
type IAdvertisement interface {
|
|
|
|
Advertise(ctx context.Context, req *game.ADReq) (res *game.ADRes, err error)
|
|
|
|
DeepAdvertise(ctx context.Context, req *game.DeepADReq) (res *game.DeepADRes, err error)
|
|
|
|
AttributionHugeAmount(ctx context.Context, req *game.ATHAReq) (res *game.ATHARes, err error)
|
|
|
|
ConversionHugeAmount(ctx context.Context, req *game.CSHAReq) (res *game.CSHARes, err error)
|
|
|
|
}
|
|
|
|
|
|
|
|
type advertisementImpl struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
var advertisementService = advertisementImpl{}
|
|
|
|
|
|
|
|
func Advertisement() IAdvertisement {
|
|
|
|
return &advertisementService
|
|
|
|
}
|
|
|
|
|
|
|
|
func (g *advertisementImpl) Advertise(ctx context.Context, req *game.ADReq) (res *game.ADRes, err error) {
|
|
|
|
res = new(game.ADRes)
|
|
|
|
res, err = internal.Advertise(ctx, req)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
func (g *advertisementImpl) DeepAdvertise(ctx context.Context, req *game.DeepADReq) (res *game.DeepADRes, err error) {
|
|
|
|
res = new(game.DeepADRes)
|
|
|
|
res, err = internal.DeepAdvertise(ctx, req)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
func (g *advertisementImpl) AttributionHugeAmount(ctx context.Context, req *game.ATHAReq) (res *game.ATHARes, err error) {
|
|
|
|
res = new(game.ATHARes)
|
|
|
|
res, err = internal.AttributionHugeAmount(ctx, req)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
func (g *advertisementImpl) ConversionHugeAmount(ctx context.Context, req *game.CSHAReq) (res *game.CSHARes, err error) {
|
|
|
|
res = new(game.CSHARes)
|
|
|
|
res, err = internal.ConversionHugeAmount(ctx, req)
|
|
|
|
return
|
|
|
|
}
|