package logic import ( "app.yhyue.com/moapp/jyMarketing/rpc/activity" "context" "app.yhyue.com/moapp/jyMarketing/api/internal/svc" "app.yhyue.com/moapp/jyMarketing/api/internal/types" "github.com/tal-tech/go-zero/core/logx" ) type AdvertisingExposureLogic struct { logx.Logger ctx context.Context svcCtx *svc.ServiceContext } func NewAdvertisingExposureLogic(ctx context.Context, svcCtx *svc.ServiceContext) AdvertisingExposureLogic { return AdvertisingExposureLogic{ Logger: logx.WithContext(ctx), ctx: ctx, svcCtx: svcCtx, } } func (l *AdvertisingExposureLogic) AdvertisingExposure(req types.AdvertisingReq) (*types.Response, error) { // todo: add your logic here and delete this line result := &types.Response{} resp, err :=l.svcCtx.Activity.AdvertisingExposure(l.ctx,&activity.AdvertisingReq{ UserID: req.UserID, Client: req.Client, AdvertisingID: req.AdvertisingID, AdvertisingUrl: req.AdvertisingUrl, }) if err != nil { return nil, err } result.Code = resp.Code result.Message = resp.Message return result, nil }