You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
174 lines
4.7 KiB
Go
174 lines
4.7 KiB
Go
package handler
|
|
|
|
import (
|
|
"context"
|
|
"joybuywork/internal/service"
|
|
pb "joybuywork/proto/go_proto/w_campaign_stat"
|
|
)
|
|
|
|
type WCampaignStatServer struct {
|
|
ser service.WCampaignStat
|
|
}
|
|
|
|
// Summary 活动概览数据
|
|
func (s *WCampaignStatServer) Summary(ctx context.Context, req *pb.SummaryReq, res *pb.SummaryRes) (err error) {
|
|
//初始化服务
|
|
srv := service.WCampaignStat{}
|
|
srv.Init(ctx)
|
|
err = srv.Summary(req, res)
|
|
return err
|
|
}
|
|
|
|
// Campaign 活动数据
|
|
func (s *WCampaignStatServer) Campaign(ctx context.Context, req *pb.CampaignReq, res *pb.CampaignRes) (err error) {
|
|
//初始化服务
|
|
srv := service.WCampaignStat{}
|
|
srv.Init(ctx)
|
|
err = srv.Campaign(req, res)
|
|
return err
|
|
}
|
|
|
|
// Related 裂变数据
|
|
func (s *WCampaignStatServer) Related(ctx context.Context, req *pb.RelatedReq, res *pb.RelatedRes) (err error) {
|
|
//初始化服务
|
|
srv := service.WCampaignStat{}
|
|
srv.Init(ctx)
|
|
err = srv.Related(req, res)
|
|
return err
|
|
}
|
|
|
|
// Stat 统计事件数据
|
|
func (s *WCampaignStatServer) Stat(ctx context.Context, req *pb.StatReq, res *pb.StatRes) (err error) {
|
|
//初始化服务
|
|
srv := service.WCampaignStat{}
|
|
srv.Init(ctx)
|
|
err = srv.Stat(req, res)
|
|
return err
|
|
}
|
|
|
|
// Channel 渠道统计
|
|
func (s *WCampaignStatServer) Channel(ctx context.Context, req *pb.ChannelReq, res *pb.ChannelRes) (err error) {
|
|
//初始化服务
|
|
srv := service.WCampaignStat{}
|
|
srv.Init(ctx)
|
|
err = srv.Channel(req, res)
|
|
return err
|
|
}
|
|
|
|
// AdsSummary Ads总揽数据
|
|
func (s *WCampaignStatServer) AdsSummary(ctx context.Context, req *pb.AdsSummaryReq, res *pb.AdsSummaryRes) (err error) {
|
|
//初始化服务
|
|
srv := service.WCampaignStat{}
|
|
srv.Init(ctx)
|
|
err = srv.AdsSummary(req, res)
|
|
return err
|
|
}
|
|
|
|
// AdsTable Ads报表
|
|
func (s *WCampaignStatServer) AdsTable(ctx context.Context, req *pb.AdsTableReq, res *pb.AdsTableRes) (err error) {
|
|
//初始化服务
|
|
srv := service.WCampaignStat{}
|
|
srv.Init(ctx)
|
|
err = srv.AdsTable(req, res)
|
|
return err
|
|
}
|
|
|
|
// AdsReward Ads奖品
|
|
func (s *WCampaignStatServer) AdsReward(ctx context.Context, req *pb.AdsRewardReq, res *pb.AdsRewardRes) (err error) {
|
|
//初始化服务
|
|
srv := service.WCampaignStat{}
|
|
srv.Init(ctx)
|
|
err = srv.AdsReward(req, res)
|
|
return err
|
|
}
|
|
|
|
// InAppBP 应用内埋点埋点
|
|
func (s *WCampaignStatServer) InAppBP(ctx context.Context, req *pb.InAppBPReq, res *pb.InAppBPRes) (err error) {
|
|
//初始化服务
|
|
srv := service.WCampaignStat{}
|
|
srv.Init(ctx)
|
|
err = srv.InAppBP(req, res)
|
|
return err
|
|
}
|
|
|
|
// OutAppBP 应用外埋点
|
|
func (s *WCampaignStatServer) OutAppBP(ctx context.Context, req *pb.OutAppBPReq, res *pb.OutAppBPRes) (err error) {
|
|
//初始化服务
|
|
srv := service.WCampaignStat{}
|
|
srv.Init(ctx)
|
|
err = srv.OutAppBP(req, res)
|
|
return err
|
|
}
|
|
|
|
// ReportInfo 报表信息
|
|
func (s *WCampaignStatServer) ReportInfo(ctx context.Context, req *pb.ReportInfoReq, res *pb.ReportInfoRes) (err error) {
|
|
//初始化服务
|
|
srv := service.WCampaignStat{}
|
|
srv.Init(ctx)
|
|
err = srv.ReportInfo(req, res)
|
|
return err
|
|
}
|
|
|
|
// StatEvent 活动统计的维度
|
|
func (s *WCampaignStatServer) StatEvent(ctx context.Context, req *pb.StatEventReq, res *pb.StatEventRes) (err error) {
|
|
//初始化服务
|
|
srv := service.WCampaignStat{}
|
|
srv.Init(ctx)
|
|
err = srv.StatEvent(req, res)
|
|
return err
|
|
}
|
|
|
|
// DemTitle 维度标题数据
|
|
func (s *WCampaignStatServer) DemTitle(ctx context.Context, req *pb.DemTitleReq, res *pb.DemTitleRes) (err error) {
|
|
//初始化服务
|
|
srv := service.WCampaignStat{}
|
|
srv.Init(ctx)
|
|
err = srv.DemTitle(req, res)
|
|
return err
|
|
}
|
|
|
|
// TopTen 活动前十排行榜
|
|
func (s *WCampaignStatServer) TopTen(ctx context.Context, req *pb.TopTenReq, res *pb.TopTenRes) (err error) {
|
|
//初始化服务
|
|
srv := service.WCampaignStat{}
|
|
srv.Init(ctx)
|
|
err = srv.TopTen(req, res)
|
|
return err
|
|
}
|
|
|
|
// UserCycle 用户明细占比数据
|
|
func (s *WCampaignStatServer) UserCycle(ctx context.Context, req *pb.UserCycleReq, res *pb.UserCycleRes) (err error) {
|
|
//初始化服务
|
|
srv := service.WCampaignStat{}
|
|
srv.Init(ctx)
|
|
err = srv.UserCycle(req, res)
|
|
return err
|
|
}
|
|
|
|
// Active 用户活跃
|
|
func (s *WCampaignStatServer) Active(ctx context.Context, req *pb.ActiveReq, res *pb.ActiveRes) (err error) {
|
|
//初始化服务
|
|
srv := service.WCampaignStat{}
|
|
srv.Init(ctx)
|
|
err = srv.Active(req, res)
|
|
return err
|
|
}
|
|
|
|
// ChildBP 应用内埋点
|
|
func (s *WCampaignStatServer) ChildBP(ctx context.Context, req *pb.ChildBPReq, res *pb.ChildBPRes) (err error) {
|
|
//初始化服务
|
|
srv := service.WCampaignStat{}
|
|
srv.Init(ctx)
|
|
err = srv.ChildBP(req, res)
|
|
return err
|
|
}
|
|
|
|
// ChildReportInfo 子活动报表信息
|
|
func (s *WCampaignStatServer) ChildReportInfo(ctx context.Context, req *pb.ChildReportInfoReq, res *pb.ChildReportInfoRes) (err error) {
|
|
//初始化服务
|
|
srv := service.WCampaignStat{}
|
|
srv.Init(ctx)
|
|
err = srv.ChildReportInfo(req, res)
|
|
return err
|
|
}
|