Initial commit

This commit is contained in:
2026-05-20 16:13:58 +08:00
commit ceffbe382e
500 changed files with 157469 additions and 0 deletions
+291
View File
@@ -0,0 +1,291 @@
package proto
import (
"stat/common"
"stat/models/activitymod"
"time"
"go.mongodb.org/mongo-driver/bson/primitive"
)
// 活动列表 请求数据
type ActivityListReq struct {
common.Page
Enable *bool `json:"enable" form:"enable"` // 开关
Name *string `json:"name" form:"name"` // 活动名称
}
// 活动列表 返回数据
type ActivityListResp struct {
Total int64 `json:"total" bson:"total"` // 数量
List []*ActivityInfo `json:"list" bson:"list"` // 活动信息列表
}
type ActivityInfo struct {
Id primitive.ObjectID `json:"id" bson:"_id"` // 唯一ID
Name string `json:"name" bson:"name"` // 活动名称
Desc string `json:"desc" bson:"desc"` // 活动说明
SortCode int `json:"sortCode" bson:"sortCode"` // 排序号
H5Domain string `json:"h5Domain" bson:"h5Domain"` // 活动H5地址
GiftDesc string `json:"giftDesc" bson:"giftDesc"` // 奖励说明
Enable bool `json:"enable" bson:"enable"` // 活动开关
Background string `json:"background" bson:"background"` // 背景图
StartTime time.Time `json:"startTime" bson:"startTime"` // 活动开始时间
EndTime time.Time `json:"endTime" bson:"endTime"` // 活动结束时间
UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"`
CreatedAt time.Time `json:"createdAt" bson:"createdAt"`
Banner []activitymod.BannerInfo `json:"banner" bson:"banner"` // banner列表
LotteryCodeNum int64 `json:"lotteryCodeNum" bson:"lotteryCodeNum"` // 抽奖码总数量
UsedLotteryCodeNum int64 `json:"usedLotteryCodeNum" bson:"usedLotteryCodeNum"` // 抽奖码已使用数量
GiftCodeNum int64 `json:"giftCodeNum" bson:"giftCodeNum"` // 奖品兑换码总数量
GiftCodeGivedNum int64 `json:"giftCodeGivedNum" bson:"giftCodeGivedNum"` // 奖品兑换码已发放数量
GiftCodeUsedNum int64 `json:"giftCodeUsedNum" bson:"giftCodeUsedNum"` // 奖品兑换码已使用数量
}
// 新增活动 请求数据
type AddActivityReq struct {
Name string `json:"name" bson:"name"` // 活动名称
Desc string `json:"desc" bson:"desc"` // 活动描述
SortCode int32 `json:"sortCode" bson:"sortCode"` // 排序号
H5Domain string `json:"h5Domain" bson:"h5Domain"` // 活动H5地址
GiftDesc string `json:"giftDesc" bson:"giftDesc"` // 奖励说明
Enable bool `json:"enable" bson:"enable"` // 活动开关
Background string `json:"background" bson:"background"` // 背景图
StartTime time.Time `json:"startTime" bson:"startTime"` // 活动开始时间
EndTime time.Time `json:"endTime" bson:"endTime"` // 活动结束时间
Banner []activitymod.BannerInfo `json:"banner" bson:"banner"` // banner列表
}
// 修改活动 请求数据
type UpdateActivityReq struct {
Id primitive.ObjectID `json:"id" bson:"_id,omitempty" binding:"required"` // 唯一ID
Name *string `json:"name" bson:"name,omitempty"` // 活动名称
Desc *string `json:"desc" bson:"desc,omitempty"` // 活动描述
SortCode *int `json:"sortCode" bson:"sortCode,omitempty"` // 排序号
H5Domain *string `json:"h5Domain" bson:"h5Domain,omitempty"` // 活动H5地址
GiftDesc *string `json:"giftDesc" bson:"giftDesc,omitempty"` // 奖励说明
Enable *bool `json:"enable" bson:"enable,omitempty"` // 活动开关
Background *string `json:"background" bson:"background,omitempty"` // 背景图
StartTime *time.Time `json:"startTime" bson:"startTime,omitempty"` // 活动开始时间
EndTime *time.Time `json:"endTime" bson:"endTime,omitempty"` // 活动结束时间
Banner *[]activitymod.BannerInfo `json:"banner" bson:"banner"` // banner列表
UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt,omitempty"`
}
// 删除活动 请求数据
type DelActivityReq struct {
Id primitive.ObjectID `json:"id" binding:"required"` // 唯一ID
}
// 生成抽奖码 请求数据
type GenLotteryCodeReq struct {
CodeNum int32 `json:"codeNum" bson:"codeNum" binding:"required,gt=0"` // 生产的抽奖码个数
ActId primitive.ObjectID `json:"actId" bson:"actId" binding:"required"` // 所属活动的ID
CodeLen int32 `json:"codeLen" bson:"codeLen" binding:"required,gt=0"` // 抽奖码长度
}
// 修改抽奖码 请求数据
type UpdateLotteryCodeReq struct {
LotteryCodeId primitive.ObjectID `json:"lotteryCodeId" bson:"lotteryCodeId" binding:"required"` // 抽奖码Id
Mark string `json:"mark" bson:"mark"` // 备注
}
// 删除活动抽奖码 请求数据
type DelLotteryCodeReq struct {
LotteryCodeId primitive.ObjectID `json:"lotteryCodeId" binding:"required"` // 唯一ID
}
// 活动抽奖码列表 请求数据
type LotteryCodeListReq struct {
common.Page
LotteryCode *string `json:"lotteryCode" form:"lotteryCode"` // 抽奖码
ActId *string `json:"actId" form:"actId"` // 所属活动的ID
ActName *string `json:"actName" form:"actName"` // 活动名称
UserIp *string `json:"userIp" form:"userIp"` // 抽奖者IP
IsUsed *bool `json:"isUsed" form:"isUsed"` // 抽奖码是否已使用
GiftCode *string `json:"giftCode" form:"giftCode"` // 奖品兑换码
}
// 活动抽奖码列表 返回数据
type LotteryCodeListResp struct {
Total int64 `json:"total" bson:"total"` // 数量
List activitymod.LottertyCodeInfoList `json:"list" bson:"list"` // 活动抽奖码列表
}
// 活动奖品列表 请求数据
type GiftListReq struct {
common.Page
ActId *string `json:"actId" form:"actId"` // 所属活动的ID
GiftName *string `json:"giftName" form:"giftName"` // 奖品名称
GiftDesc *string `json:"giftDesc" form:"giftDesc"` // 奖品描述
Rate *int32 `json:"rate" form:"rate"` // 备注
}
// 活动奖品列表 返回数据
type GiftListResp struct {
Total int64 `json:"total" bson:"total"` // 数量
List []*GiftInfo `json:"list" bson:"list"`
}
type GiftInfo struct {
Id primitive.ObjectID `json:"id" bson:"_id"` // 唯一ID
ActId string `json:"actId" bson:"actId"` // 所属活动的ID
ActName string `json:"actName" bson:"actName"` // 所属活动的名称
GiftName string `json:"giftName" bson:"giftName"` // 奖品名称
GiftDesc string `json:"giftDesc" bson:"giftDesc"` // 奖品描述
Rate int32 `json:"rate" bson:"rate"` // 备注
Sort int32 `json:"sort" bson:"sort"` // 排序
UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"`
CreatedAt time.Time `json:"createdAt" bson:"createdAt"`
GiftNum int64 `json:"giftNum" bson:"giftNum"` // 抽奖码总数量
ReceivedGiftNum int64 `json:"receivedGiftNum" bson:"receivedGiftNum"` // 抽奖码已使用数量
}
// 添加活动奖品 请求数据
type AddGiftReq struct {
ActId primitive.ObjectID `json:"actId" bson:"actId" binding:"required"` // 所属活动的ID
GiftName string `json:"giftName" bson:"giftName"` // 奖品名称
GiftDesc string `json:"giftDesc" bson:"giftDesc"` // 奖品描述
Sort int32 `json:"sort" bson:"sort"` // 排序
Rate int32 `json:"rate" bson:"rate"` // 中奖率
}
// 更新活动奖品 请求数据
type UpdateGiftReq struct {
Id primitive.ObjectID `json:"id" bson:"_id" binding:"required"` // 奖品唯一ID
ActId *string `json:"actId" bson:"actId,omitempty" binding:"required"` // 所属活动的ID
ActName *string `json:"actName" bson:"actName,omitempty"` // 所属活动的名称
GiftName *string `json:"giftName" bson:"giftName,omitempty"` // 奖品名称
GiftDesc *string `json:"giftDesc" bson:"giftDesc,omitempty"` // 奖品描述
Rate *int32 `json:"rate" bson:"rate,omitempty"` // 中奖率
Sort *int32 `json:"sort" bson:"sort,omitempty"` // 排序
UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"`
}
// 删除活动奖品 请求数据
type DelGiftReq struct {
Id primitive.ObjectID `json:"id" binding:"required"` // 奖品唯一ID
}
// 生成奖品兑换码 请求数据
type GenGiftCodeRes struct {
GiftId primitive.ObjectID `json:"giftId" bson:"giftId"` // 奖品唯一ID
CodeNum int32 `json:"codeNum" bson:"codeNum"` // 生成奖品兑换码的数量
CodeLen int32 `json:"codeLen" bson:"codeLen"` // 生成奖品兑换码的长度
}
// 奖品兑换详情列表 请求数据
type GetGiftInfoReq struct {
common.Page
LotteryCode *string `json:"lotteryCode" form:"lotteryCode"` // 抽奖码
ActId *string `json:"actId" form:"actId"` // 所属活动的ID
ActName *string `json:"actName" form:"actName"` // 所属活动的名称
GiftId *string `json:"giftId" form:"giftId"` // 所属活动奖品的ID
GiftName *string `json:"giftName" form:"giftName"` // 奖品名称
UserId *string `json:"userId" form:"userId"` // 兑换者Id
AppName *string `json:"appName" form:"appName"` // 所属app的名字
IsGaveOut *bool `json:"isGaveOut" form:"isGaveOut"` // 兑换码是否已发放
IsUsed *bool `json:"isUsed" form:"isUsed"` // 奖品兑换码是否已使用
GiftCode *string `json:"giftCode" form:"giftCode"` // 奖品兑换码
}
// 奖品兑换详情列表 返回数据
type GetGiftInfoResp struct {
Total int64 `json:"total" bson:"total"` // 数量
List activitymod.LotteryGetGiftList `json:"list" bson:"list"`
}
// 删除兑换详情 请求数据
type DelGetGiftReq struct {
Id primitive.ObjectID `json:"id" binding:"required"` // 兑换详情唯一ID
}
// 更新活动奖品兑换详情 请求数据
type UpdateGetGiftReq struct {
Id primitive.ObjectID `json:"id" binding:"required"` // 奖品唯一ID
UserId *string `json:"userId"` // 兑换者Id
AppName *string `json:"appName"` // 所属app的名字
Remark *string `json:"remark"` // 备注
GiftCode string `json:"giftCode" binding:"required"` // 奖品兑换码
}
// h5活动信息 请求数据
type ActivityInfoReq struct {
ActId primitive.ObjectID `json:"actId" bson:"actId"` // 活动ID
}
type ActivityInfoResp struct {
Id primitive.ObjectID `json:"id" bson:"_id"` // 唯一ID
Name string `json:"name" bson:"name"` // 活动名称
Desc string `json:"desc" bson:"desc"` // 活动说明
H5Domain string `json:"h5Domain" bson:"h5Domain"` // 活动H5地址
GiftDesc string `json:"giftDesc" bson:"giftDesc"` // 奖励说明
Enable bool `json:"enable" bson:"enable"` // 活动开关
StartTime time.Time `json:"startTime" bson:"startTime"` // 活动开始时间
EndTime time.Time `json:"endTime" bson:"endTime"` // 活动结束时间
Banner []activitymod.BannerInfo `json:"banner" bson:"banner"` // banner列表
}
// h5活动奖品信息 请求数据
type ActivityGiftInfoReq struct {
ActId string `json:"actId" binding:"required"` // 活动ID
}
// h5活动奖品信息 返回数据
type ActivityGiftInfoResp struct {
Count int64 `json:"count" bson:"count"` // 奖品总数
List []*H5GiftInfo `json:"list" bson:"list"`
}
type H5GiftInfo struct {
Id string `json:"id" bson:"_id"` // 奖品ID
GiftName string `json:"giftName" bson:"giftName"` // 奖品名称
}
// h5抽奖 请求数据
type DrawReq struct {
Ip string `json:"ip" binding:"required"` // 用户IP
ActId primitive.ObjectID `json:"actId" binding:"required"` // 活动ID
LotteryCode string `json:"lotteryCode" binding:"required"` // 抽奖码
}
// h5抽奖 返回数据
type DrawResp struct {
GiftCode string `json:"giftCode" bson:"giftCode"` // 奖品兑换码
GiftId string `json:"giftId" bson:"giftId"` // 奖品ID
GiftName string `json:"giftName" bson:"giftName"` // 奖品名称
}
type ActivityVisitCountReq struct {
AppId int32 `from:"appId" json:"appId"` //AppID
Ip string `from:"ip" json:"ip"` //ip
Domain string `from:"domain" json:"domain"` //落地页域名
CH string `from:"ch" json:"ch"` //渠道号
ActivityId primitive.ObjectID `json:"activityId"` //活动ID
ActivityName string `json:"activityName"` //活动名字
}
type ActivityVisitCountListReq struct {
common.Page
ActivityId *string `json:"activityId" form:"activityId"` // 活动ID
AppId *int32 `json:"appId" form:"appId"` // AppID
CH *string `json:"ch" form:"ch"` // 渠道名字
}
type ActivityVisitListResp struct {
Total int64 `json:"total" bson:"total"` // 数量
List []*ActivityVisitInfo `json:"list" bson:"list"` // 活动信息列表
}
type ActivityVisitInfo struct {
AppId int32 `json:"appId"` // appId
CH string `json:"ch"` // 商区序列
IP string `json:"ip"` // 用户IP
DevType string `json:"devType"` // 设备类型
SysType string `json:"sysType"` // 系统类型
PeerIP string `json:"peerIP"` // 网站IP
ActivityId string `json:"activityId"` // 活动Id
ActivityName string `json:"activityName"` // 活动名字
CreatedAt time.Time `json:"createdAt"` // 创建时间
UpdatedAt time.Time `json:"updatedAt"` // 更新时间
}
+75
View File
@@ -0,0 +1,75 @@
package proto
import (
"stat/common"
"time"
)
// 管理员登陆请求
type AdminLoginReq struct {
Account *string `form:"account" json:"account" binding:"required"` // 账号
Password *string `form:"password" json:"password" binding:"required"` // 密码
}
// 管理员验证请求
type AdminVerifyReq struct {
Account *string `form:"account" json:"account" binding:"required"` // 账号
VerifyCode *string `form:"verifyCode" json:"verifyCode" binding:"required"` // 验证码
}
// 管理员登陆响应
type AdminLoginRes struct {
Account string `json:"account"` // 用户名
Token string `json:"token"` // token
Name string `json:"name"` // 名称
RoleInfo RoleInfo `json:"roleInfo"` // 角色信息
}
// 请求管理员列表
type AdminListReq struct {
common.Page
BlocRole *int `json:"blocRole"` // 角色
}
type AdminInfo struct {
Account string `json:"account"` // 账号
Password string `json:"password"` // 密码
Name string `json:"name"` // 名称
RoleId int64 `json:"roleId"` // 角色
Role string `json:"role"` // 角色
MerchantId string `json:"merchantId"` // 商人id
CreatedAt time.Time `json:"createdAt"` // 创建时间
UpdatedAt time.Time `json:"updatedAt"` // 更新时间
LastTime time.Time `json:"lastTime"` // 登录时间
}
// 响应管理员列表
type AdminListRes struct {
Total int64 `json:"total"`
List []AdminInfo `json:"list"`
}
// 新增管理员账号
type AddAdminReq struct {
Account *string `form:"account" json:"account" binding:"required"` // 账号(唯一)
Password *string `form:"password" json:"password" binding:"required"` // 密码
Name *string `form:"name" json:"name" binding:"required"` // 名称
RoleId *int64 `form:"roleId" json:"roleId" binding:"required"` // 角色id
MerchantId *string `form:"merchantId" json:"merchantId" binding:"omitempty"` // 商人id
BlocRole *int `json:"blocRole"` // 角色
}
// 更新管理员信息
type UpdateAdminReq struct {
Account *string `form:"account" json:"account" binding:"required"` // 用户名
Password *string `form:"password" json:"password" binding:"omitempty"` // 密码
Name *string `form:"name" json:"name" binding:"omitempty"` // 名称
RoleId *int64 `form:"roleId" json:"roleId" binding:"omitempty"` // 角色id
Status *int64 `form:"status" json:"status" binding:"omitempty"` // 状态
MerchantId *string `form:"merchantId" json:"merchantId" binding:"omitempty"` // 商人id
BlocRole *int `json:"blocRole"` // 角色
}
type DelAdminReq struct {
Account *string `form:"account" json:"account" binding:"required"` // 用户id
}
+127
View File
@@ -0,0 +1,127 @@
package proto
import (
"stat/common"
"stat/models/advertiseMod"
"time"
)
// 广告位置列表请求
type ListAdsReq struct {
AppId *int32 `form:"appId" json:"appId" binding:"omitempty"` // appId,过滤条件
IsActive *bool `form:"isActive" json:"isActive" binding:"omitempty"` // appId,过滤条件
LocId *int32 `json:"locId"` // 位置id
common.Page
Link *string `form:"link" json:"link"` // 链接地址
Title *string `form:"title" json:"title"` // 广告标题
DaoLiangTitle *string `json:"daoLiangTitle"` // 广告导量标题
}
type ListAdsRes struct {
Total int64 `json:"total"`
List []AdsInfo `json:"list"`
}
type LinkInfo struct {
Link string `json:"link"` // 链接地址
Foreign bool `json:"foreign"` // true 国外用户
Weight int `json:"weight"` // 权重
}
type AdsInfo struct {
Id int64 `json:"id"` // 广告id
AppId int32 `json:"appId"` // 应用id
AppName string `json:"appName"` // 应用名称
Title string `json:"title"` // 广告标题
DaoLiangTitle string `json:"daoLiangTitle"` // 广告导量标题
Tags []string `json:"tags"` // 广告标签
CoverImg string `json:"coverImg"` // 封面
VisibleChannels []string `json:"visibleChannels"` // 可见的渠道
LocId int32 `json:"locId"` // 位置id
ImgSizeDesc string `json:"imgSizeDesc"` // 图片尺寸
LocName string `json:"locName"` // 位置名称
Links []LinkInfo `json:"links"` // 链接地址
Sort int64 `json:"sort"` // 排序值--优先级
IsActive bool `json:"isActive"` // 是否激活
StartTime time.Time `json:"startTime"` // 开始时间
EndTime time.Time `json:"endTime"` // 结束时间
Remark string `json:"remark"` // 备注
ClickCount int64 `json:"clickCount"` // 点击次数
AmbientColor string `json:"ambientColor"` // 氛围色
CreatedAt time.Time `json:"createAt"` // 创建时间
UpdatedAt time.Time `json:"updatedAt"` // 更新时间
}
// 添加广告请求
type AddAdsReq struct {
AppId int32 `form:"appId" json:"appId"` // 应用id
Title string `form:"title" json:"title" ` // 广告标题
Tags string `form:"tags" json:"tags" ` // 广告标签
CoverImg string `form:"coverImg" json:"coverImg"` // 封面
LocId int32 `form:"locId" json:"locId"` // 位置id
Sort int64 `form:"sort" json:"sort"` // 排序值--优先级
IsActive bool `form:"isActive" json:"isActive"` // 是否激活
Links []LinkInfo `form:"links" json:"links"` // 链接地址
StartTime time.Time `form:"startTime" json:"startTime" ` // 开始时间
EndTime time.Time `form:"endTime" json:"endTime"` // 结束时间
Remark string `form:"remark" json:"remark"` // 备注
AmbientColor string `form:"ambientColor" json:"ambientColor"` // 氛围色
}
// 更新广告请求
type UpdateAdsReq struct {
Id *int64 `form:"id" json:"id" binding:"omitempty"` // 广告id
AppId *int32 `form:"appId" json:"appId" binding:"omitempty"` // 应用id
Title *string `form:"title" json:"title" binding:"omitempty"` // 广告标题
DaoLiangTitle *string `form:"daoLiangTitle" json:"daoLiangTitle" binding:"omitempty"` // 广告导量标题
Tags *string `form:"tags" json:"tags" binding:"omitempty"` // 广告标签
CoverImg *string `form:"coverImg" json:"coverImg" binding:"omitempty"` // 封面
VisibleChannels *string `form:"visibleChannels" json:"visibleChannels" binding:"omitempty"` // 可见的渠道,可输入多个渠道,用英文逗号","分隔开
Location *int64 `form:"locId" json:"locId" binding:"omitempty"` // 位置
JumpType *advertiseMod.JumpType `form:"jumpType" json:"jumpType" binding:"omitempty"` // 跳转方式 0:外部浏览器跳转 1:内部浏览器跳转 2:app内部跳转
Links *[]LinkInfo `form:"links" json:"links" binding:"omitempty"` // 链接地址
Sort *int64 `form:"sort" json:"sort" binding:"omitempty"` // 排序值--优先级
IsActive *bool `form:"isActive" json:"isActive" binding:"omitempty"` // 是否激活
StartTime *time.Time `form:"startTime" json:"startTime" binding:"omitempty"` // 开始时间s
EndTime *time.Time `form:"endTime" json:"endTime" binding:"omitempty"` // 结束时间
Remark *string `form:"remark" json:"remark" binding:"omitempty"`
AmbientColor *string `form:"ambientColor" json:"ambientColor" binding:"omitempty"` //氛围色
}
// 删除广告请求
type DelAdsReq struct {
Id *int64 `form:"id" json:"id" binding:"required"` // 应用id
}
// 外部获取广告
type AdvertiseReq struct {
AppId int32 `form:"appId" json:"appId" binding:"required"` // 应用id
LocId *int32 `form:"locId" json:"locId" binding:"omitempty"` // 位置id
UserId *uint64 `form:"userId" json:"userId" binding:"omitempty"` // 用户ID
IP *string `form:"ip" json:"ip" binding:"omitempty"` // 用户IP
}
type AdvertiseRes struct {
AdvertiseList []*AdvertiseInfo `json:"advertiseList"` // 广告列表
}
// 外部广告信息
type AdvertiseInfo struct {
Id int64 `json:"id"` // 广告id
Title string `json:"title"` // 广告标题
CoverImg string `json:"coverImg"` // 封面
LocId int32 `json:"locId"` // 位置id
JumpType advertiseMod.JumpType `json:"jumpType"` // 跳转方式 0:外部浏览器跳转 1:内部浏览器跳转 2:app内部跳转
Link string `json:"link"` // 链接地址
Sort int64 `json:"sort"` // 排序
Tags string `json:"tags"` // 标签
Remark string `json:"remark"` // 备注描述
AmbientColor string `json:"ambientColor"` // 氛围色(逼哩漫画)
Type int // 0:系统 1:渠道
}
// 广告点击请求
type AdsClickReq struct {
Id *int64 `from:"id" json:"id" binding:"required"` // 广告id
AppId *int32 `from:"appId" json:"appId" binding:"required"` // 应用id
}
+53
View File
@@ -0,0 +1,53 @@
package proto
import (
"stat/common"
"time"
)
// 广告位置列表请求
type ListAdsLocReq struct {
AppId *int32 `form:"appId" json:"appId" binding:"omitempty"` // appId,过滤条件
common.Page
}
type ListAdsLocRes struct {
Total int64 `json:"total"`
List []AdsLocInfo `json:"list"`
}
type AdsLocInfo struct {
Id int64 `json:"id"` // 唯一id
AppId int32 `json:"appId"` // 应用id
AppName string `json:"appName"` // 应用名称
LocId int32 `json:"locId"` // 位置id
Name string `json:"name"` // 位置名称
ImgSizeDesc string `json:"imgSizeDesc"` // 图片尺寸描述
Remark string `json:"remark"` // 备注
CreatedAt time.Time `json:"createAt"` // 创建时间
UpdatedAt time.Time `json:"updatedAt"` // 更新时间
}
// 添加广告位置信息请求
type AddAdsLocReq struct {
AppId *int32 `form:"appId" json:"appId" binding:"required"` // 应用Id
LocId *int32 `form:"locId" json:"locId" binding:"required"` // 位置id
Name *string `form:"name" json:"name" binding:"required"` // 位置名称
ImgSizeDesc string `form:"imgSizeDesc" json:"imgSizeDesc" binding:"omitempty"` // 图片尺寸描述
Remark string `form:"remark" json:"remark" binding:"omitempty"` // 备注
}
// 更新广告位置信息请求
type UpdateAdsLocReq struct {
Id *int64 `form:"id" json:"id" binding:"required"` // id
AppId *int32 `form:"appId" json:"appId" binding:"omitempty"` // 应用id
LocId *int32 `form:"locId" json:"locId" binding:"omitempty"` // 位置id
Name *string `form:"name" json:"name" binding:"omitempty"` // 位置名称
ImgSizeDesc *string `form:"imgSizeDesc" json:"imgSizeDesc" binding:"omitempty"` // 图片尺寸描述
Remark *string `form:"remark" json:"remark" binding:"omitempty"` // 备注
}
// 删除广告位置信息请求
type DelAdsLocReq struct {
Id *int64 `form:"id" json:"id" binding:"required"` // 应用id
}
+85
View File
@@ -0,0 +1,85 @@
package proto
import (
"stat/common"
"time"
)
// 公告列表请求
type ListAnnounReq struct {
AppId *int32 `json:"appId"` // 应用id 筛选条件
common.Page
}
// 公告列表响应
type ListAnnounRes struct {
Total int64 `json:"total"`
List []AnnounInfo `json:"list"`
}
// 公告信息
type AnnounInfo struct {
ID string `json:"id"` // 公告id
AppId int32 `json:"appId"` // 应用id
AppName string `json:"appName"` // 应用名称
Title string `json:"title"` // 公告标题
Content string `json:"content"` // 公告内容
Cover string `json:"cover"` // 公告封面图
Href string `json:"href"` // 公告跳转地址
Type int `json:"type"` // 公告类型 0,外部连接;1,直接安装app
Active bool `json:"active"` // 是否激活
StartTime time.Time `json:"startTime"` // 开始时间
EndTime time.Time `json:"endTime"` // 结束时间
}
// 添加公告
type AddAnnounReq struct {
AppId *int32 `from:"appId" json:"appId" binding:"required"` // 应用id
Title *string `from:"title" json:"title" binding:"required"` // 公告标题
Content *string `from:"content" json:"content" binding:"required"` // 公告内容
Cover *string `from:"cover" json:"cover" binding:"omitempty"` // 公告封面图
Href *string `from:"href" json:"href" binding:"omitempty"` // 公告跳转地址
Type *int `from:"type" json:"type" binding:"required"` // 公告类型 0,外部连接;1,直接安装app
Active *bool `from:"active" json:"active" binding:"required"` // 是否激活
StartTime *time.Time `from:"startTime" json:"startTime" binding:"required"` // 公告开始时间
EndTime *time.Time `from:"endTime" json:"endTime" binding:"required"` // 公告结束时间
}
// 修改公告
type UpdateAnnounReq struct {
Id *string `form:"id" json:"id" binding:"required"` // 公告id
AppId *int32 `form:"appId" json:"appId" binding:"omitempty"` // 应用id
Title *string `form:"title" json:"title" binding:"omitempty"` // 公告标题
Content *string `form:"content" json:"content" binding:"omitempty"` // 公告内容
Cover *string `form:"cover" json:"cover" binding:"omitempty"` // 公告封面图
Href *string `form:"href" json:"href" binding:"omitempty"` // 公告跳转地址
Type *int `form:"type" json:"type" binding:"omitempty"` // 公告类型 0,外部连接;1,直接安装app
Active *bool `from:"active" json:"active" binding:"omitempty"` // 是否激活
StartTime *time.Time `from:"startTime" json:"startTime" binding:"omitempty"` // 公告开始时间
EndTime *time.Time `from:"endTime" json:"endTime" binding:"omitempty"` // 公告结束时间
}
// 删除公告
type DelAnnounReq struct {
Id *string `json:"id" binding:"required"` // 公告id
}
// 外部获取公告请求
type AnnouncementReq struct {
AppId *int32 `form:"appId" json:"appId" binding:"required"` // 应用id
}
// 外部获取公告响应
type AnnouncementRes struct {
AnnounceList []AnnouncementInfo `json:"announceList"` // 公告列表
}
// 外部获取公告
type AnnouncementInfo struct {
ID string `json:"id"` // 公告id
Title string `json:"title"` // 公告标题
Content string `json:"content"` // 公告内容
Cover string `json:"cover"` // 公告封面图
Href string `json:"href"` // 公告跳转地址
Type int `json:"type"` // 公告类型 0,外部连接;1,直接安装app
}
+53
View File
@@ -0,0 +1,53 @@
package proto
import (
"stat/common"
"time"
)
// 请求app列表
type ListAppInfoReq struct {
AppName *string `form:"appName" json:"appName" binding:"omitempty"` // appId
Used *bool `form:"used" json:"used" binding:"omitempty"` // 渠道
common.Page
}
// 响应app列表
type ListAppInfoRes struct {
Total int64 `json:"total"`
List []AppInfoRes `json:"list"`
}
type AppInfoRes struct {
AppId int32 `json:"appId"` // appId,唯一id
Name string `json:"name"` // app名称
LandPages []string `json:"landPages"` // 落地页列表
IconImg string `json:"iconImg"` // 应用图标
AdvertiseNum int64 `json:"advertiseNum"` // 广告系数
AdvertiseNewNum int64 `json:"advertiseNewNum"` // 广告新增系数
CreatedAt time.Time `json:"createdAt"` // 创建时间
UpdatedAt time.Time `json:"updatedAt"` // 更新时间
}
// 添加app
type AddAppInfoReq struct {
AppId *int32 `form:"appId" json:"appId" binding:"required"` // appId,唯一id
Name *string `form:"name" json:"name" binding:"required"` // app名称
IconImg *string `form:"iconImg" json:"iconImg" binding:"required"` // 应用图标
// LandPages *[]string `form:"landPages" json:"landPages" binding:"required"` // 落地页列表
}
// 修改app
type UpdateAppInfoReq struct {
AppId *int32 `form:"appId" json:"appId" binding:"required"` // appId,唯一id
Name *string `form:"name" json:"name" binding:"omitempty"` // app名称
IconImg *string `form:"iconImg" json:"iconImg" binding:"omitempty"` // 应用图标
AdvertiseNum *int64 `form:"advertiseNum" json:"advertiseNum" binding:"omitempty"` // 广告系数
AdvertiseNewNum *int64 `form:"advertiseNewNum" json:"advertiseNewNum" binding:"omitempty"` // 广告新增系数
LandPages *[]string `form:"landPages" json:"landPages" binding:"omitempty"` // 落地页列表
}
// 删除app
type DelAppInfoReq struct {
AppId *int32 `form:"appId" json:"appId" binding:"required"` // appId,唯一id
}
+108
View File
@@ -0,0 +1,108 @@
package proto
import (
"stat/common"
"stat/models/applicationmod"
"time"
"go.mongodb.org/mongo-driver/bson/primitive"
)
// DelAppReq
type DelAppReq struct {
Id primitive.ObjectID `json:"id"`
}
type GetApplicationsReq struct {
Id *string `json:"id" bson:"_id"`
ParentAppId *int64 `json:"parentAppId" bson:"parentAppId"` //所属appId
Name *string `json:"name" bson:"name"` //应用名
DaoLiangTitle *string `bson:"daoLiangTitle"` // 广告导量标题
//Tag *common.AppReqType `json:"tag" bson:"tag"` //标签
Status *bool `json:"status" bson:"status"` //状态
Category *int64 `json:"category" bson:"category"` //分类ID
PageNum int64 `json:"pageNum"` // 分页参数
PageSize int64 `json:"pageSize" binding:"required"` // 分页参数
LocIds []int32 `json:"locIds"` // 位置id
DownloadUrl *string `json:"download_url"` //下载地址
IosUrl *string `json:"iosUrl"` //ios链接
AndroidUrl *string `json:"androidUrl"` //安卓链接
IsHighQuality *bool `json:"isHighQuality"` // 是否是优质APP推荐
}
type GetApplicationsResp struct {
List applicationmod.ApplicationList `json:"list"`
Total int64 `json:"total"`
}
type AppCategoryInfo struct {
Id int64 `json:"id"` // 分类ID
Name string `json:"name" bson:"name"` // 名称
Applications CenterApplicationList `json:"applications" bson:"applications"` // 分类app列表
}
type ApplicationClickReq struct {
Id string `from:"id" json:"id" binding:"required"` // applicationid
}
// 应用中心
type CenterApplication struct {
Id primitive.ObjectID `json:"id" bson:"_id"`
AppId int64 `json:"appId" bson:"appId"` //appId
ParentAppId int64 `json:"parentAppId" bson:"parentAppId"` //所属appId
Name string `json:"name" bson:"name"` //应用名
Tag int32 `json:"tag" bson:"tag"` //标签
Internal bool `json:"internal" bson:"internal"` //是否内部应用
Categories []*common.CategoryRank `json:"categories" bson:"categories"` //分类排序
Desc string `json:"desc" bson:"desc"` //描述
DownloadUrl string `json:"download_url" bson:"download_url"` //下载地址
IosUrl string `json:"iosUrl" bson:"iosUrl"` //ios链接
AndroidUrl string `json:"androidUrl" bson:"androidUrl"` //安卓链接
Avatar string `json:"avatar" bson:"avatar"` //头像图片
Status bool `json:"status" bson:"status"` //状态
Rank int64 `json:"rank" bson:"rank"` //默认排序
Total int64 `json:"total" bson:"total"` //总点击
CreatedId int64 `json:"created_id" bson:"created_id"` //创建人
UpdatedId int64 `json:"updated_id" bson:"updated_id"` //最后更新人
CreatedAt time.Time `json:"createdAt" bson:"createdAt"` //创建时间
UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` //更新时间
NineShow bool `json:"nineShow" bson:"nineShow"` //是否九宫格
RecreationShow bool `json:"recreationShow" bson:"recreationShow"` //是否娱乐中心显示
IsRecommend bool `json:"isRecommend" bson:"isRecommend"` //是否推荐
IsGame bool `json:"isGame" bson:"isGame"` //是否游戏
HomeShow bool `json:"homeShow" bson:"homeShow"` //是否首页展示
LocIds []int64 `json:"locIds" bson:"locIds"` //位置id
SmallImg string `json:"smallImg" bson:"smallImg"` // 小图标
BigImg string `json:"bigImg" bson:"bigImg"` // 大图标
IsHighQuality bool `json:"isHighQuality" bson:"isHighQuality"` // 是否是优质APP推荐
HighQualityType int64 `json:"highQualityType" bson:"highQualityType"` // 优质APP推荐展示方式 0:应用图标 1:展示描述文字
}
type CenterApplicationList []*CenterApplication
// 外部获取app
type CenterApplicationReq struct {
ParentAppId int64 `json:"parentAppId" binding:"required"` // 所属应用appId
LocId *int32 `json:"locId"` // 位置id
UserId *uint64 `json:"userId"` // 用户ID
}
type CenterAppCategory struct {
Id int64 `json:"id" bson:"_id,omitempty"`
ParentAppId int64 `json:"parentAppId" bson:"parentAppId"`
Name string `json:"name" bson:"name"` // 名称
Desc string `json:"desc" bson:"desc"` // 描述
Status bool `json:"status" bson:"status"` // 状态
Rank int64 `json:"rank" bson:"rank"` // 应用排序
CreatedAt time.Time `json:"createdAt" bson:"createdAt"` // 创建时间
UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` // 更新时间
ImgType int64 `json:"imgType" bson:"imgType"` // 图片展示类型 0:应用图标 1.小图标 2.大图标
}
type CenterAppCategoryList []*CenterAppCategory
type CenterApplicationRes struct {
List CenterApplicationList `json:"list"` // 应用列表
AppCategoryList CenterAppCategoryList `json:"appCategoryList"` // 列表
}
+53
View File
@@ -0,0 +1,53 @@
package proto
import (
"stat/common"
"time"
)
// 广告位置列表请求
type ListAppLocReq struct {
AppId *int32 `form:"appId" json:"appId" binding:"omitempty"` // appId,过滤条件
common.Page
}
type ListAppLocRes struct {
Total int64 `json:"total"`
List []AppLocInfo `json:"list"`
}
type AppLocInfo struct {
Id int64 `json:"id"` // 唯一id
AppId int32 `json:"appId"` // 应用id
AppName string `json:"appName"` // 应用名称
LocId int32 `json:"locId"` // 位置id
Name string `json:"name"` // 位置名称
ImgSizeDesc string `json:"imgSizeDesc"` // 图片尺寸描述
Remark string `json:"remark"` // 备注
CreatedAt time.Time `json:"createAt"` // 创建时间
UpdatedAt time.Time `json:"updatedAt"` // 更新时间
}
// 添加广告位置信息请求
type AddAppLocReq struct {
AppId *int32 `form:"appId" json:"appId" binding:"required"` // 应用Id
LocId *int32 `form:"locId" json:"locId" binding:"required"` // 位置id
Name *string `form:"name" json:"name" binding:"required"` // 位置名称
ImgSizeDesc string `form:"imgSizeDesc" json:"imgSizeDesc" binding:"omitempty"` // 图片尺寸描述
Remark string `form:"remark" json:"remark" binding:"omitempty"` // 备注
}
// 更新广告位置信息请求
type UpdateAppLocReq struct {
Id *int64 `form:"id" json:"id" binding:"required"` // id
AppId *int32 `form:"appId" json:"appId" binding:"omitempty"` // 应用id
LocId *int32 `form:"locId" json:"locId" binding:"omitempty"` // 位置id
Name *string `form:"name" json:"name" binding:"omitempty"` // 位置名称
ImgSizeDesc *string `form:"imgSizeDesc" json:"imgSizeDesc" binding:"omitempty"` // 图片尺寸描述
Remark *string `form:"remark" json:"remark" binding:"omitempty"` // 备注
}
// 删除广告位置信息请求
type DelAppLocReq struct {
Id *int64 `form:"id" json:"id" binding:"required"` // 应用id
}
+38
View File
@@ -0,0 +1,38 @@
package proto
import (
"stat/common"
"time"
)
type RoleListReq struct {
common.Page
}
type RoleInfo struct {
RoleId int64 `json:"roleId"` // id
Role string `json:"role"` // 角色
AuthJson string `json:"authJson"` // 权限json数据
CreatedAt time.Time `json:"createdAt"` // 创建时间
UpdatedAt time.Time `json:"updatedAt"` // 修改时间
}
type RoleListRes struct {
Total int64 `json:"total"`
List []RoleInfo `json:"list"`
}
type AddRoleReq struct {
Role *string `form:"role" json:"role" binding:"required"` // 角色
AuthJson *string `form:"authJson" json:"authJson" binding:"required"` // 权限json数据
}
type UpdateRoleReq struct {
RoleId *int64 `form:"roleId" json:"roleId" binding:"required"` // id
Role *string `form:"role" json:"role" binding:"omitempty"` // 角色
AuthJson *string `form:"authJson" json:"authJson" binding:"omitempty"` // 权限json数据
}
type DelRoleReq struct {
RoleId *int64 `form:"roleId" json:"roleId" binding:"required"` // id
}
+43
View File
@@ -0,0 +1,43 @@
package proto
// 发起提现
type AgentWithdraw struct {
Mobile string `form:"mobile" json:"mobile" binding:"required"` //手机号
Captcha string `form:"captcha" json:"captcha" binding:"required"` //验证码
PayMentAct string `form:"act" json:"act" binding:"required"` //交易账户
PayMentName string `form:"actName" json:"actName" binding:"required"` //交易账户持有人
PaymentMethod string `form:"paymentMethod" json:"paymentMethod" binding:"required"` //提现方式,alipay,bankcard,USDT
Yuan float64 `form:"yuan" json:"yuan" binding:"required,min=100"` //提现金额
WithdrawType int `form:"withdrawType" json:"withdrawType"` //提现类型 1:财务转账 0:提现
AppId int32 `form:"appId" json:"appId" binding:"required"` //所选APP
}
// 提现审核
type WithdrawAllow struct {
ID string `json:"id"` //订单id
Allow bool `json:"allow"` //true:允许 false:拒绝
StatusDesc string `json:"statusDesc"` //描述
}
type TransStatus int
const (
Transferred TransStatus = 1 //已转账
TransRefund TransStatus = 2 //转账被拒绝
)
// 财务转账回执
type FinancialReceipt struct {
ID string `form:"id" json:"id" binding:"required"` //ID
TransState TransStatus `form:"transState" json:"transState" binding:"required"` //转账状态 1:已转账 2:转账被拒绝
Remark string `form:"remark" json:"remark"` //备注
}
// ExchgBack 回掉结构体
type ExchgBack struct {
OID string `json:"oid" binding:"required"` //支付平台订单号
Money int64 `json:"money" binding:"required"` //兑换金额
TradeNo string `json:"tradeNo" binding:"required"` //商户订单号
Status string `json:"status"` //200成功
Mark string `json:"mark"` //拒绝兑换理由
}
+88
View File
@@ -0,0 +1,88 @@
package proto
import (
"stat/common"
"time"
)
// 日常统计列表请求
type ListBlocDailyStatReq struct {
AppId *int32 `form:"appId" json:"appId" binding:"omitempty"` // appId
StartTime *time.Time `form:"startTime" json:"startTime"` // 开始时间
EndTime *time.Time `form:"endTime" json:"endTime" binding:"omitempty"` // 结束时间
common.Page
}
type ListBlocDailyStatRes struct {
Total int64 `json:"total"`
TotalInfo BlocDailyStatInfo `json:"totalInfo"`
List []BlocDailyStatInfo `json:"list"`
}
type BlocDailyStatInfo struct {
SumDate time.Time `json:"sumDate"` // 记录时间 按天对齐
AppId int32 `json:"appId"` // appId
AppName string `json:"appName"` // app名称
TotalVisitCount int64 `json:"totalVisitCount"` // 日活
TotalNewCount int64 `json:"totalNewCount"` // 新增
TotalAmount int64 `json:"totalAmount"` // 总充值
ARPU int64 `json:"ARPU"` // 人均充值
ARPPU int64 `json:"ARPPU"` // 付费用户人均充值
NewDirectCount int64 `json:"newDirectCount"` // 新增直推
NewFissionCount int64 `json:"newFissionCount"` // 新增裂变
DirectVisitCount int64 `json:"directVisitCount"` // 直推访问数
FissionVisitCount int64 `json:"fissionVisitCount"` // 裂变访问数
Day1RetainRate float64 `json:"day1RetainRate"` // 次日留存率
Day3RetainRate float64 `json:"day3RetainRate"` // 3日留存率
Day7RetainRate float64 `json:"day7RetainRate"` // 7日留存率
DirectAmount int64 `json:"directAmount"` // 直推充值金额
FissionAmount int64 `json:"fissionAmount"` // 裂变充值金额
NewRechargeCount int64 `json:"newRechargeCount"` // 新增充值数
NewRechargeAmount int64 `json:"newRechargeAmount"` // 新增充值金额
OldRechargeAmount int64 `json:"oldRechargeAmount"` // 老用户充值金额
DaichongAmout int64 `json:"daichongAmout"` // 代充充值金额
OnlineAmount int64 `json:"onlineAmount"` // 在线充值金额
NewRechargeRate float64 `json:"newRechargeRate"` // 新增充值率
VisitRechargeRate float64 `json:"visitRechargeRate"` // 登陆充值率
UserWithDrawAmount int64 `json:"userWithDrawAmount"` // 用户提现金额
UserWithDrawPaymoneyAmount int64 `json:"userWithDrawPaymoneyAmount"` // 用户提现金额(实际到账)
GameRechageAmount int64 `json:"gameRechageAmount"` // 游戏充值
GameWithdrawAmount int64 `json:"gameWithdrawAmount"` // 游戏提现
TotalRechargeCount int64 `json:"totalRechargeCount"` // 总充值人数
UpdatedAt time.Time `json:"updatedAt"` // 更新时间
}
type ListBlocDailyStatTotalReq struct {
StartTime *time.Time `form:"startTime" json:"startTime"` // 开始时间
EndTime *time.Time `form:"endTime" json:"endTime" binding:"omitempty"` // 结束时间
common.Page
}
type ListBlocDailyStatTotalRes struct {
Total int64 `json:"total"`
List []BlocDailyStatTotalInfo `json:"list"`
}
type BlocDailyStatTotalInfo struct {
SumDate time.Time `json:"sumDate"` // 记录时间 按天对齐
TotalVisitCount int64 `json:"totalVisitCount"` // 日活
TotalNewCount int64 `json:"totalNewCount"` // 新增
TotalAmount int64 `json:"totalAmount"` // 总充值
NewDirectCount int64 `json:"newDirectCount"` // 新增直推
NewFissionCount int64 `json:"newFissionCount"` // 新增裂变
DirectVisitCount int64 `json:"directVisitCount"` // 直推访问数
FissionVisitCount int64 `json:"fissionVisitCount"` // 裂变访问数
DirectAmount int64 `json:"directAmount"` // 直推充值金额
FissionAmount int64 `json:"fissionAmount"` // 裂变充值金额
NewRechargeCount int64 `json:"newRechargeCount"` // 新增充值数
NewRechargeAmount int64 `json:"newRechargeAmount"` // 新增充值金额
OldRechargeAmount int64 `json:"oldRechargeAmount"` // 老用户充值金额
DaichongAmout int64 `json:"daichongAmout"` // 代充充值金额
OnlineAmount int64 `json:"onlineAmount"` // 在线充值金额
UserWithDrawAmount int64 `json:"userWithDrawAmount"` // 用户提现金额
UserWithDrawPaymoneyAmount int64 `json:"userWithDrawPaymoneyAmount"` // 用户提现金额(实际到账)
GameRechageAmount int64 `json:"gameRechageAmount"` // 游戏充值
GameWithdrawAmount int64 `json:"gameWithdrawAmount"` // 游戏提现
TotalRechargeCount int64 `json:"totalRechargeCount"` // 总充值人数
UpdatedAt time.Time `json:"updatedAt"` // 更新时间
}
+111
View File
@@ -0,0 +1,111 @@
package proto
import (
"stat/common"
"time"
)
// 日常统计列表请求
type ListBlocRegisterDetailsReq struct {
AppId *int32 `form:"appId" json:"appId"` // appId
StartTime *time.Time `form:"startTime" json:"startTime"` // 开始时间
EndTime *time.Time `form:"endTime" json:"endTime"` // 结束时间
common.Page
}
type ListBlocRegisterDetailsRes struct {
Total int64 `json:"total"`
List []BlocRegisterDetailsInfo `json:"list"`
}
type BlocRegisterDetailsInfo struct {
UserId string `json:"userId" bson:"userId"` // 用户ID
AppName string `json:"appName" bson:"appName"` // appID
SysType string `json:"sysType" bson:"sysType"` // 操作系统类型 安卓 IOS
DevType string `json:"devType" bson:"devType"` // 设备类型
Mobile string `json:"mobile" bson:"mobile"` // 手机号
IP string `json:"ip,omitempty" bson:"ip"` // IP
Name string `json:"name" bson:"name"` // 名称
IsDirect bool `json:"isDirect" bson:"isDirect"` // true:直推用户
RegisterTime time.Time `json:"registerTime" bson:"registerTime"` // 注册时间
}
// 日常统计列表请求
type ListBlocRechargeDetailsReq struct {
AppId *int32 `form:"appId" json:"appId" binding:"omitempty"` // appId
StartTime *time.Time `form:"startTime" json:"startTime"` // 开始时间
EndTime *time.Time `form:"endTime" json:"endTime" binding:"omitempty"` // 结束时间
common.Page
}
type ListBlocRechargeDetailsRes struct {
Total int64 `json:"total"`
List []BlocRechargeDetailsInfo `json:"list"`
}
type BlocRechargeDetailsInfo struct {
UserId string `json:"userId" bson:"userId"` // 用户ID
AppName string `json:"appName" bson:"appName"` // appID
SysType string `json:"sysType" bson:"sysType"` // 操作系统类型 安卓 IOS
DevType string `json:"devType" bson:"devType"` // 设备类型
ChannelName string `json:"channelName" bson:"channelName"` // 支付渠道名字
CID string `json:"cid" bson:"cid"` // 渠道id
Type string `bson:"type" json:"type"` // 充值方式
OrderId string `json:"orderId" bson:"orderId"` // 流水id
Money int64 `json:"money" bson:"money"` // 充值金额 订单金额
PayMoney int64 `json:"payMoney" bson:"payMoney"` // 实际到账金额 用户实际支付金额
Status int `json:"status" bson:"status"` // 3付款成功
SuccessAt time.Time `json:"successAt,omitempty" bson:"successAt,omitempty"` // 成功时间
}
type ListBlocWithdrawDetailsReq struct {
AppId *int32 `form:"appId" json:"appId" binding:"omitempty"` // appId
StartTime *time.Time `form:"startTime" json:"startTime"` // 开始时间
EndTime *time.Time `form:"endTime" json:"endTime" binding:"omitempty"` // 结束时间
common.Page
}
type ListBlocWithdrawDetailsRes struct {
Total int64 `json:"total"`
List []ListBlocWithdrawDetailsInfo `json:"list"`
}
type ListBlocWithdrawDetailsInfo struct {
UID string `json:"uid" bson:"uid"` //用户Id
Name string `json:"name" bson:"name"` //用户名
AppName string `json:"appName" bson:"appName"` // appID
Amount int64 `json:"amount" bson:"amount"` //金币数量
Money int64 `json:"money" bson:"money" binding:"required"` //提现金额
PayMoney int64 `json:"payMoney" bson:"payMoney"` //实际到账
PayType string `json:"payType" bson:"payType" binding:"required"` //提现方式,alipay,bankcard
OID string `json:"oid" bson:"oid"` //第三方支付平台id
ActName string `json:"actName" bson:"actName"` //交易账户持有人
Act string `json:"act" bson:"act"` //交易账户
UserIP string `json:"userIp" bson:"userIp"` //用户ip
DeviceType string `json:"deviceType" bson:"deviceType"` //设备类型
DevID string `json:"devID" bson:"devID"` //设备id
Status int `json:"status" bson:"status"` //1未审核 2审核通过,转账中 3已拒绝 4未知错误 5提现成功 6提现失败
StatusDesc string `json:"statusDesc" bson:"statusDesc"` //状态说明
SuccessAt time.Time `json:"successAt" bson:"successAt"` //回调成功时间
ReceivedAt time.Time `json:"receivedAt" bson:"receivedAt"` //到账时间 李秋山确认 三方出款时间
}
type ListBlocRechargeChannelReq struct {
AppId *int32 `form:"appId" json:"appId" binding:"omitempty"` // appId
StartTime *time.Time `form:"startTime" json:"startTime"` // 开始时间
EndTime *time.Time `form:"endTime" json:"endTime" binding:"omitempty"` // 结束时间
ChannelName *string `form:"channelName" json:"channelName" binding:"omitempty"` // 渠道名称筛选
common.Page
}
type ListBlocRechargeChannelRes struct {
Total int64 `json:"total"`
List []ListBlocRechargeChannelInfo `json:"list"`
}
type ListBlocRechargeChannelInfo struct {
SumDate time.Time `json:"sumDate"` // 记录时间 按天对齐
ChannelName string `json:"channelName"` // 支付渠道名称
BlocOrderMoney int64 `json:"blocOrderMoney"` // 订单金额
BlocChannelRate int64 `json:"blocChannelRate"` // 费率
}
+279
View File
@@ -0,0 +1,279 @@
package proto
import (
"stat/common"
"stat/models/channelmod"
"time"
)
type AgentLoginReq struct {
Account *string `form:"account" json:"account" binding:"required"` // 账号
Password *string `form:"password" json:"password" binding:"required"` // 密码
ImgCode string `form:"imgCode" json:"imgCode"` // 图片验证码
ImgID string `form:"imgID" json:"imgID"` // 图片编号
}
type AgentLoginRes struct {
Token string `json:"token"` // token
Channel string `json:"channel"` // 渠道
Detail *ChannelAgentInfo `json:"detail"` // 渠道详情
}
type AgentImgVerifyCode struct {
VerifyImg []byte `form:"verifyImg" json:"verifyImg"` // 验证码数据
ImgId string `form:"imgId" json:"imgId"` // 验证码ID
}
type AgentChannelInfoSearch struct {
ID *string `json:"id"` // ID
AppId *int32 `json:"appId"` // 渠道对应的appId
Type *channelmod.ChannelType `json:"Type"` // 渠道类型:1 一级 2:二级
common.Page
}
type ChannelAppInfoReq struct {
Channel string `bson:"channel" json:"channel"` // 渠道
}
type ChannelAppInfo struct {
AppId int32 `bson:"appId" json:"appId"` // 应用ID
AppName string `bson:"appName" json:"appName"` // 应用名称
LandingPage string `bson:"landingPage" json:"landingPage"` // 落地页
}
type ChannelAppInfoResp struct {
List []ChannelAppInfo `bson:"list" json:"list"`
}
type ChannelAgentInfo struct {
Channel string `bson:"channel" json:"channel"` // 渠道
AppIds []int32 `bson:"appIds" json:"appIds"` // 渠道对应的app
UserName string `bson:"userName" json:"userName"` // 所有者
ParentAgent string `bson:"parentAgent" json:"parentAgent"` // 父代理
ChildCount int64 `bson:"childCount" json:"childCount"` // 子渠道数量
Status bool `bson:"status" json:"status"` // 状态 开/关
Mobile string `bson:"mobile" json:"mobile"` // 手机号
Type channelmod.ChannelType `bson:"type" json:"type"` // 渠道类型:1 一级 2:二级
Remark string `bson:"remark" json:"remark"` // 备注
Lock bool `bson:"lock" json:"lock"` // 禁止登陆
Settlement channelmod.SettlementWay `bson:"settlement" json:"settlement"` // 结算方式 cps/cpa/cpt/cpc
CPAPrice int64 `bson:"cpaPrice" json:"cpaPrice"` // 单价
CPSRate int64 `bson:"cpsRate" json:"cpsRate"` // CPS 分成比列 0-100
DivideRate int64 `bson:"divideRate" json:"divideRate"` // 分成比例
ChildShowDivideRate bool `bson:"childShowDivideRate" json:"childShowDivideRate"` // 下级是否显示分成比例
Wallet channelmod.Wallet `bson:"wallet" json:"wallet"` // 钱包地址
AppType channelmod.AppType `bson:"appType" json:"appType"` // 应用类型
PromoteMode channelmod.PromoteMode `bson:"promoteMode" json:"promoteMode"` // 推广类型
CreatedAt time.Time `bson:"createdAt" json:"createdAt"` // 创建时间
UpdatedAt time.Time `bson:"updatedAt" json:"updatedAt"` // 更新时间
}
type AgentChannelInfoSearchResp struct {
Total int64 `json:"total"`
List []ChannelAgentInfo `json:"list"`
}
type AgentChannelRuleUpdate struct {
Channel string `bson:"channel" json:"channel"` // 渠道
CPAPrice *int64 `bson:"cpaPrice" json:"cpaPrice"` // 单价
CPSRate *int64 `bson:"cpsRate" json:"cpsRate"` // CPS 分成比列 0-100
DivideRate *int64 `bson:"divideRate" json:"divideRate"` // 分成比例
ChildShowDivideRate *bool `bson:"childShowDivideRate" json:"childShowDivideRate"` // 渠道:下级是否显示分成比例
Remark *string `bson:"remark" json:"remark"` // 备注
}
type AgentChannelInfoUpdate struct {
Channel string `json:"channel"` // 渠道
Mobile *string `json:"mobile"` // 手机号
WalletAddr1 *string `json:"walletAddr1"` // 钱包地址1
WalletAddr2 *string `json:"walletAddr2"` // 钱包地址2
Status *bool `json:"status"` // 状态 开/关
}
type AgentChannelPasswordUpdate struct {
OldPassword string `json:"oldPassword"` // 代理商旧密码
NewPassword string `json:"newPassword"` // 代理商新密码
}
type AgentChannelPasswordReset struct {
Channel string `json:"channel"` // 下级渠道
Password string `json:"password"` // 新密码
}
// AgentChannelInfoAdd 新增渠道
type AgentChannelInfoAdd struct {
Password string `json:"password"` // 代理商密码
Mobile string `json:"mobile"` // 手机号
WalletAddr1 string `json:"walletAddr1"` // 钱包地址1
WalletAddr2 string `json:"walletAddr2"` // 钱包地址2
Status bool `bson:"status"` // 状态 开/关
Remark string `json:"remark"` // 备注
}
// AgentDeductedStat 渠道后台查询结算
type AgentDeductedStat struct {
Channel string `bson:"channel" json:"channel"` // 渠道
AppName string `bson:"appName" json:"appName"` // 应用名称
AppId int32 `bson:"appId" json:"appId"` // appId
Settlement channelmod.SettlementWay `bson:"settlement" json:"settlement"` // 结算方式 cps/cpa/cpt/cpc
CPAPrice int64 `bson:"cpaPrice" json:"cpaPrice"` // 单价
CPSRate int64 `bson:"cpsRate" json:"cpsRate"` // CPS 分成比列 0-100
DivideRate int64 `bson:"divideRate" json:"divideRate"` // 分成比例
SumDate time.Time `bson:"sumDate" json:"sumDate"` // 记录时间
VisitCount int64 `bson:"visitCount" json:"visitCount"` // 访问量
DirectCount int64 `bson:"directCount" json:"directCount"` // 新增量(包含子渠道和渠道本身)
DirectCountSelf int64 `bson:"directCountSelf" json:"directCountSelf"` // 自身渠道新增量
DirectCountChild int64 `bson:"directCountChild" json:"directCountChild"` // 子渠道新增量
Recharge int64 `bson:"recharge" json:"recharge"` // 充值金额(包含子渠道和渠道本身)
RechargeSelf int64 `bson:"rechargeSelf" json:"rechargeSelf"` // 来自自身渠道充值金额
RechargeChild int64 `bson:"rechargeChild" json:"rechargeChild"` // 来自子渠道充值金额
Income int64 `bson:"income" json:"income"` // 当日收益(自身+子渠道)
IncomeChild int64 `bson:"incomeChild" json:"incomeChild"` // 来自子渠道的当日收益
IncomeSelf int64 `bson:"incomeSelf" json:"incomeSelf"` // 来自自身渠道的当日收益
ChildRebate int64 `bson:"childRebate" json:"childRebate"` // 子渠道返佣
UpdatedAt time.Time `bson:"updatedAt" json:"updatedAt"` // 更新时间
}
type AgentChannelStatSearch struct {
AppId *int32 `json:"appId"` // appId
Channel *string `bson:"channel" json:"channel"` // 渠道
Start *time.Time `json:"start"` // 开始时间
End *time.Time `json:"end"` // 结束时间
common.Page
}
type AgentChannelStatResp struct {
Total int64 `json:"total"`
List []*AgentDeductedStat `json:"list"`
TotalInfo AgentDeductedStat `json:"totalInfo"`
}
type AgentChannelStatOldSearch struct {
AppId *int32 `json:"appId"` // appId
Channel *string `bson:"channel" json:"channel"` // 渠道
Start *time.Time `json:"start"` // 开始时间
End *time.Time `json:"end"` // 结束时间
common.Page
}
// AgentChannelStat 渠道后台查询结算
type AgentChannelStatOld struct {
Channel string `bson:"channel" json:"channel"` // 渠道
AppName string `bson:"appName" json:"appName"` // 应用名称
AppId int32 `bson:"appId" json:"appId"` // appId
SumDate time.Time `bson:"sumDate" json:"sumDate"` // 记录时间
DirectCount int64 `bson:"newDirectCount,omitempty" json:"newDirectCount"` // 下载量
VisitCount int64 `bson:"directVisitCount" json:"directVisitCount"` // 访问量
RechargeAmount int64 `bson:"directAmount" json:"directAmount"` // 充值金额
TodayIncome int64 `bson:"todayIncome" json:"todayIncome"` // 当日收益
UpdatedAt time.Time `bson:"updatedAt" json:"updatedAt"` // 更新时间
}
type AgentChannelStatOldResp struct {
Total int64 `json:"total"`
List []AgentChannelStatOld `json:"list"`
TotalInfo AgentChannelStatOld `json:"totalInfo"`
}
type StatDataSimple struct {
VisitCount int64 `bson:"visitCount" json:"visitCount"` // 访问总量(包含子渠道和渠道本身)
DirectCount int64 `bson:"directCount" json:"directCount"` // 新增总量(包含子渠道和渠道本身)
Recharge int64 `bson:"recharge" json:"recharge"` // 充值金额(包含子渠道和渠道本身)
Income int64 `bson:"income" json:"income"` // 收益(自身+子渠道)
}
type StatDataDetail struct {
StatDataSimple
DirectCountSelf int64 `bson:"directCountSelf" json:"directCountSelf"` // 自身渠道新增量
DirectCountChild int64 `bson:"directCountChild" json:"directCountChild"` // 子渠道新增量
RechargeSelf int64 `bson:"rechargeSelf" json:"rechargeSelf"` // 来自自身渠道充值金额
RechargeChild int64 `bson:"rechargeChild" json:"rechargeChild"` // 来自子渠道充值金额
IncomeChild int64 `bson:"incomeChild" json:"incomeChild"` // 子渠道的收益
IncomeSelf int64 `bson:"incomeSelf" json:"incomeSelf"` // 自身渠道的收益
ChildRebate int64 `bson:"childRebate" json:"childRebate"` // 子渠道返佣
}
func (s *StatDataDetail) ToStatDataSimple() *StatDataSimple {
return &s.StatDataSimple
}
// AgentSummaryStatHome 渠道汇总
type AgentSummaryStatHome struct {
Channel string `bson:"channel" json:"channel"` // 渠道
ParentAgent string `bson:"parentAgent" json:"parentAgent"` // 父代理
ChildCount int64 `bson:"childCount" json:"childCount"` // 子渠道数量
AppName string `bson:"appName" json:"appName"` // 应用名称
AppId int32 `bson:"appId" json:"appId"` // appId
Settlement channelmod.SettlementWay `bson:"settlement" json:"settlement"` // 结算方式 cps/cpa/cpt/cpc
CPAPrice int64 `bson:"cpaPrice" json:"cpaPrice"` // 单价
CPSRate int64 `bson:"cpsRate" json:"cpsRate"` // CPS 分成比列 0-100
DivideRate int64 `bson:"divideRate" json:"divideRate"` // 分成比例
TotalStat *StatDataDetail `bson:"totalStat" json:"totalStat"` // 所有统计
TodayStat *StatDataDetail `bson:"todayStat" json:"todayStat"` // 今日统计
WeekStat *StatDataDetail `bson:"weekStat" json:"weekStat"` // 本周统计
MonthStat *StatDataDetail `bson:"monthStat" json:"monthStat"` // 本月统计
YearStat *StatDataDetail `bson:"yearStat" json:"yearStat"` // 本年统计
}
func (s *AgentSummaryStatHome) ToAgentSummaryStatChild() *AgentSummaryStatChild {
stat := &AgentSummaryStatChild{
Channel: s.Channel,
ParentAgent: s.ParentAgent,
ChildCount: s.ChildCount,
AppName: s.AppName,
AppId: s.AppId,
Settlement: s.Settlement,
CPAPrice: s.CPAPrice,
CPSRate: s.CPSRate,
DivideRate: s.DivideRate,
TotalStat: s.TotalStat.ToStatDataSimple(),
TodayStat: s.TodayStat.ToStatDataSimple(),
WeekStat: s.WeekStat.ToStatDataSimple(),
MonthStat: s.MonthStat.ToStatDataSimple(),
YearStat: s.YearStat.ToStatDataSimple(),
}
return stat
}
type AgentSummaryStatHomeList []*AgentSummaryStatHome
func (a AgentSummaryStatHomeList) Len() int { return len(a) }
func (a AgentSummaryStatHomeList) Less(i, j int) bool {
return a[i].TotalStat.Income > a[j].TotalStat.Income
}
func (a AgentSummaryStatHomeList) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
type AgentSummaryStatHomeSearch struct {
common.Page
}
type AgentSummaryStatHomeResp struct {
Total int64 `json:"total"`
List AgentSummaryStatHomeList `json:"list"`
}
// AgentSummaryStatChild 下级渠道汇总
type AgentSummaryStatChild struct {
Channel string `bson:"channel" json:"channel"` // 渠道
ParentAgent string `bson:"parentAgent" json:"parentAgent"` // 父代理
ChildCount int64 `bson:"childCount" json:"childCount"` // 子渠道数量
AppName string `bson:"appName" json:"appName"` // 应用名称
AppId int32 `bson:"appId" json:"appId"` // appId
Settlement channelmod.SettlementWay `bson:"settlement" json:"settlement"` // 结算方式 cps/cpa/cpt/cpc
CPAPrice int64 `bson:"cpaPrice" json:"cpaPrice"` // 单价
CPSRate int64 `bson:"cpsRate" json:"cpsRate"` // CPS 分成比列 0-100
DivideRate int64 `bson:"divideRate" json:"divideRate"` // 分成比例
TotalStat *StatDataSimple `bson:"totalStat" json:"totalStat"` // 所有统计
TodayStat *StatDataSimple `bson:"todayStat" json:"todayStat"` // 今日统计
WeekStat *StatDataSimple `bson:"weekStat" json:"weekStat"` // 本周统计
MonthStat *StatDataSimple `bson:"monthStat" json:"monthStat"` // 本月统计
YearStat *StatDataSimple `bson:"yearStat" json:"yearStat"` // 本年统计
}
type AgentSummaryStatChildList []*AgentSummaryStatChild
type AgentSummaryStatChildSearch struct {
common.Page
}
type AgentSummaryStatChildResp struct {
Total int64 `json:"total"`
List AgentSummaryStatChildList `json:"list"`
}
+114
View File
@@ -0,0 +1,114 @@
package proto
import (
"stat/common"
"time"
)
// 请求渠道码列表
type ListChannelCodeReq struct {
AppId *int32 `form:"appId" json:"appId" binding:"omitempty"` // appId
Channel *string `form:"channel" json:"channel" binding:"omitempty"` // 渠道
ChannelCode *string `form:"channelCode" json:"channelCode" binding:"omitempty"` // 渠道码
IsAdmin *bool `form:"isAdmin" json:"isAdmin" binding:"omitempty"` // 是否是管理员
common.Page
}
// 响应渠道码列表
type ListChannelCodeRes struct {
Total int64 `json:"total"`
List []ChannelCodeInfo `json:"list"`
}
// 渠道码信息
type ChannelCodeInfo struct {
ID string `json:"id"` // 公告id
ChannelCode string `json:"channelCode"` // 渠道码
AppId int32 `json:"appId"` // appId
AppName string `json:"appName"` // app名称
Channel string `json:"channel"` // 该渠道码所属渠道渠道
ParentChannel string `json:"parentChannel"` // 该渠道码所属渠道渠道的父渠道
// Settlement channelmod.SettlementWay `json:"settlement"` // 结算方式 cps/cpa/cpt
// DeductionStatus bool `json:"deductionStatus"` // 是否需要扣量
// DedNewRule DeductionRuleInfo `json:"dedNewRule"` // 新增扣量规则
// DedRechargeRule DeductionRuleInfo `json:"dedRechargeRule"` // 充值扣量规则
Status bool `json:"status"` // 状态 开/关
Links []string `json:"links"` // 推广链接
OpeninstallLink string `json:"openinstallLink"` // 推广链接
SharePassword string `json:"sharePassword"` // 推广链接 密码
CreatedAt time.Time `json:"createdAt"` // 创建时间
UpdatedAt time.Time `json:"updatedAt"` // 更新时间
}
// 请求添加渠道码
type AddChannelCodeReq struct {
Channel *string `form:"channel" json:"channel" binding:"required"` // 渠道
AppId *int32 `form:"appId" json:"appId" binding:"required"` // appId
ChannelCode *string `form:"channelCode" json:"channelCode" binding:"required"` // 渠道码
Status *bool `form:"status" json:"status" binding:"required"` // 状态 开/关
IsAdmin *bool `form:"isAdmin" json:"isAdmin" binding:"required"` // 是否是管理员
}
// 请求修改渠道
type UpdateChannelCodeReq struct {
Id *string `form:"id" json:"id" binding:"required"` // ID
ChannelCode *string `form:"channelCode" json:"channelCode"` // 渠道码
AppId *int32 `form:"appId" json:"appId"` // appId
Status *bool `form:"status" json:"status" ` // 状态 开/关
IsAdmin *bool `form:"isAdmin" json:"isAdmin"` // 是否是管理员
SharePassword *string `form:"sharePassword" json:"sharePassword"` // 渠道码
}
// 请求删除渠道
type DelChannelCodeReq struct {
ChannelCode *string `form:"channel" json:"channel" binding:"required"` // 渠道
AppId *int32 `form:"appId" json:"appId" binding:"required"` // appId
IsAdmin *bool `form:"isAdmin" json:"isAdmin" binding:"required"` // 是否是管理员
}
// 代理商渠道码列表请求
type ListAgentChannelCodeReq struct {
AppId *int32 `form:"appId" json:"appId" binding:"required"` // appId
ChannelCode *string `json:"channelCode"` // 渠道码
common.Page
}
// 代理商响应渠道码列表
type ListAgentChannelCodeRes struct {
Total int64 `json:"total"`
List []AgentChannelCodeInfo `json:"list"`
}
// 渠道码信息
type AgentChannelCodeInfo struct {
ChannelCode string `json:"channelCode"` // 渠道码
AppId int32 `json:"appId"` // appId
AppName string `json:"appName"` // app名称
Channel string `json:"channel"` // 该渠道码所属渠道渠道
ParentChannel string `json:"parentChannel"` // 该渠道码所属渠道渠道的父渠道
Status bool `json:"status"` // 状态 开/关
Links []string `json:"links"` // 推广链接
CreatedAt time.Time `json:"createdAt"` // 创建时间
UpdatedAt time.Time `json:"updatedAt"` // 更新时间
}
// 请求添加渠道码
type AddAgentChannelCodeReq struct {
Channel *string `form:"channel" json:"channel" binding:"required"` // 渠道
AppId *int32 `form:"appId" json:"appId" binding:"required"` // appId
ChannelCode *string `form:"channelCode" json:"channelCode" binding:"required"` // 渠道码
Status *bool `form:"status" json:"status" binding:"required"` // 状态 开/关
}
// 请求修改渠道
type UpdateAgentChannelCodeReq struct {
ChannelCode *string `form:"channelCode" json:"channelCode" binding:"required"` // 渠道码
AppId *int32 `form:"appId" json:"appId" binding:"required"` // appId
Status *bool `form:"status" json:"status" binding:"required"` // 状态 开/关
}
// 请求删除渠道
type DelAgentChannelCodeReq struct {
ChannelCode *string `form:"channel" json:"channel" binding:"required"` // 渠道码
AppId *int32 `form:"appId" json:"appId" binding:"required"` // appId
}
+47
View File
@@ -0,0 +1,47 @@
package proto
import (
"stat/common"
"time"
)
// 渠道码统计信息列表请求
type BlocListChannelCodeStatReq struct {
Channel *string `form:"channel" json:"channel" binding:"omitempty"` // 渠道
AppId *int32 `form:"appId" json:"appId" binding:"omitempty"` // appId
StartTime *time.Time `form:"startTime" json:"startTime" binding:"omitempty"` // 开始时间
EndTime *time.Time `form:"endTime" json:"endTime" binding:"omitempty"` // 结束时间
WithChild *bool `form:"withChild" json:"withChild" binding:"omitempty"` // 包含子渠道
common.Page
}
type BlocListChannelCodeStatRes struct {
Total int64 `json:"total"`
TotalInfo BlocChannelCodeStatInfo `json:"totalInfo"`
List []BlocChannelCodeStatInfo `json:"list"`
}
type BlocChannelCodeStatInfo struct {
SumDate time.Time `json:"sumDate"` // 记录时间 按天对齐
ChannelCode string `json:"channelCode"` // 渠道码
AppId int32 `json:"appId"` // appId
AppName string `json:"appName"` // app名称
Channel string `json:"channel"` // 该渠道码所属渠道渠道
NewDirectCount int64 `json:"newDirectCount"` // 新增直推
NewFissionCount int64 `json:"newFissionCount"` // 新增裂变
NewDeductionCount int64 `json:"newDeductionCount"` // 新增扣量(新增 = 新增直推+新增裂变+扣量)
DirectVisitCount int64 `json:"directVisitCount"` // 直推访问数
FissionVisitCount int64 `json:"fissionVisitCount"` // 裂变访问数
Day1RetainRate float64 `json:"day1RetainRate"` // 次日留存率
Day3RetainRate float64 `json:"day3RetainRate"` // 3日留存率
Day7RetainRate float64 `json:"day7RetainRate"` // 7日留存率
RechargeAmount int64 `json:"rechargeAmount"` // 直推充值金额
FissionAmount int64 `json:"fissionAmount"` // 裂变充值金额
DeductionAmount int64 `json:"deductionAmount"` // 扣量金额
NewRechargeCount int64 `json:"newRechargeCount"` // 新增充值数
NewRechargeAmount int64 `json:"newRechargeAmount"` // 新增充值金额
LandPageVisitCount int64 `json:"landPageVisitCount"` // 落地页访问次数
Settlement string `json:"settlement"` // 结算方式 cps/cpa/cpt/cpc
TodayIncome int64 `json:"todayIncome"` // 当日收益
UpdatedAt time.Time `json:"updatedAt"` // 更新时间
}
+403
View File
@@ -0,0 +1,403 @@
package proto
import (
"stat/common"
"stat/models/channelmod"
"stat/models/channelsettlementrecord"
"stat/models/registermod"
"time"
"go.mongodb.org/mongo-driver/bson/primitive"
)
// ChannelInfoSearch 渠道信息查询
type ChannelInfoSearch struct {
ID *string `json:"id"` // ID
Channel *string `json:"channel"` // 渠道
AppId *int32 `json:"appId"` // 渠道对应的appId
Type *channelmod.ChannelType `json:"Type"` // 渠道类型:1 一级 2:二级
ParentChannel *string `json:"parentChannel"` // 父渠道 二级:存在父渠道
UserName *string `json:"userName"` // 所有者
Status *bool `json:"status"` // 状态 开/关
Remark *string `json:"remark"` // 备注
Mobile *string `json:"mobile"` // 手机号
common.Page
}
type ChannelInfoSearchResp struct {
Total int64 `json:"total"`
List channelmod.ChannelInfoList `json:"list"`
}
// ChannelInfoUpdate 渠道更新
type ChannelInfoUpdate struct {
ID string `json:"id,omitempty" binding:"required"` // ID
Password *string `json:"password" bson:"password,omitempty"` // 渠道密码
Status *bool `json:"status" bson:"status,omitempty"` // 状态 开/关
Remark *string `json:"remark" bson:"remark,omitempty"` // 备注
Mobile *string `json:"mobile" bson:"mobile,omitempty"` // 手机号
ShowMagic *int32 `json:"showMagic" bson:"showMagic,omitempty"` // 异常登陆次数
Lock *bool `json:"lock" bson:"lock,omitempty"` // 禁止登陆
WalletAddr1 *string `json:"walletAddr1" bson:"wallet.addr1,omitempty"` // 钱包地址1
WalletAddr2 *string `json:"walletAddr2" bson:"wallet.addr2,omitempty"` // 钱包地址2
AutoGenApk *bool `bson:"autoGenApk" json:"autoGenApk,omitempty"` // 自动生成渠道包
ChildShowDivideRate *bool `bson:"childShowDivideRate" json:"childShowDivideRate,omitempty"` // 下级是否显示分成比例
UpdatedAt *time.Time `json:"updatedAt" bson:"updatedAt,omitempty"` // 更新时间
}
// ChannelOwnerUpdate 渠道所有者更新
type ChannelOwnerUpdate struct {
Channel string `json:"channel" bson:"channel" binding:"required"` // 渠道ID
UserName string `json:"userName" bson:"userName"` // 所有者名字
Mark string `json:"mark" bson:"mark"` // 备注
}
// ChannelInfoAdd 新增渠道
type ChannelInfoAdd struct {
Channel string `json:"channel" binding:"required"` // 渠道
Type channelmod.ChannelType `json:"type" binding:"required"` // 渠道类型:1 一级 2:二级
ParentChannel string `json:"parentChannel"` // 父渠道 如果为空字符串,则为渠道,否则为代理
Password string `json:"password"` // 代理商密
Status bool `json:"status"` // 状态 开/关
Remark string `json:"remark"` // 备注
Mobile string `json:"mobile"` // 手机号
Lock bool `json:"lock"` // 禁止登陆
ChildShowDivideRate bool `bson:"childShowDivideRate" json:"childShowDivideRate"` // 下级是否显示分成比例
}
// ChannelInfoDelete 删除渠道信息
type ChannelInfoDelete struct {
ID string `json:"id,omitempty" binding:"required"` // ID
}
// ChannelDeductionRuleSearch 渠道扣量规则查询
type ChannelDeductionRuleSearch struct {
AppId *int32 `json:"appId"` // 应用ID
Channel *string `json:"channel"` // 渠道
common.Page
}
type ChannelDeductionRuleSearchResp struct {
Total int64 `json:"total"`
List channelmod.ChannelDeductionRuleList `json:"list"`
}
// ChannelDeductionRuleUpdate 更新扣量规则
type ChannelDeductionRuleUpdate struct {
ID string `json:"id" binding:"required"` // ID
AppType *channelmod.AppType `json:"appType" bson:"appType,omitempty"` // 应用类型
PromoteMode *channelmod.PromoteMode `json:"promoteMode" bson:"promoteMode,omitempty"` // 推广类型
First *int32 `json:"first" bson:"first,omitempty" ` // 一阶(1单)
Second *int32 `json:"second" bson:"second,omitempty"` // 二阶(2-3单)
Third *int32 `json:"third" bson:"third,omitempty"` // 三阶(4-5单)
Fourth *int32 `json:"fourth" bson:"fourth,omitempty"` // 四阶(6-10单)
Fifth *int32 `json:"fifth" bson:"fifth,omitempty"` // 5阶(11单以上)
CPAPrice *int64 `json:"cpaPrice" bson:"cpaPrice,omitempty"` // 单价
CPSRate *int64 `json:"cpsRate" bson:"cpsRate,omitempty"` // CPS分成比列 0-100
CPSBegin *int64 `json:"cpsBegin" bson:"cpsBegin,omitempty"` // CPS 开始扣量金额
CPSDeductionRate *int64 `json:"cpsDeductionRate" bson:"cpsDeductionRate,omitempty"` // CPS 扣量比例
BeginTime *time.Time `json:"deductionAt" bson:"deductionAt,omitempty"` // 扣量开始时间
LandingPage *string `json:"landingPage" bson:"landingPage,omitempty"` // 落地页
ProxyDeduction *int64 `json:"proxyDeduction" bson:"proxyDeduction,omitempty"` // 代理扣量比例
DivideRate *int64 `json:"divideRate" bson:"divideRate,omitempty"` // 代理分成比例
UpdatedAt *time.Time `json:"updatedAt" bson:"updatedAt,omitempty"` // 更新时间
AutoDeduction *bool `json:"autoDeduction" bson:"autoDeduction,omitempty"` // 自动扣量开关
LessIncomeRate *float64 `json:"lessIncomeRate" bson:"lessIncomeRate,omitempty"` // 最低收益比 CPA低于该值开启扣量(0.1 - 3.0)
}
// ChannelDeductionRuleAdd 新增扣量规则
type ChannelDeductionRuleAdd struct {
AppId int32 `json:"appId" binding:"required"` // 应用ID
Channel string `json:"channel" binding:"required"` // 渠道
Settlement channelmod.SettlementWay `json:"settlement" binding:"required"` // 结算方式 cps/cpa/cpt/cpc (cpt/cpc 1-5阶设置100 不可编辑)
AppType channelmod.AppType `json:"appType" bson:"appType,omitempty"` // 应用类型
PromoteMode channelmod.PromoteMode `json:"promoteMode" bson:"promoteMode,omitempty"` // 推广类型
First int32 `json:"first" binding:"min=0,max=100"` // 一阶
Second int32 `json:"second" binding:"min=0,max=100"` // 二阶
Third int32 `json:"third" binding:"min=0,max=100"` // 三阶
Fourth int32 `json:"fourth" binding:"min=0,max=100"` // 四阶
Fifth int32 `json:"fifth" binding:"min=0,max=100"` // 5阶
CPAPrice int64 `json:"cpaPrice"` // 单价(分) 前端可设置1.80
CPSRate int64 `json:"cpsRate" binding:"min=0,max=100"` // CPS分成比列
CPSBegin int64 `json:"cpsBegin"` // CPS 开始扣量金额
CPSDeductionRate int64 `json:"cpsDeductionRate"` // CPS 扣量比例
LandingPage string `json:"landingPage"` // 落地页
ProxyDeduction int64 `json:"proxyDeduction" binding:"min=0,max=100"` // 代理扣量比例
DivideRate int64 `bson:"divideRate" json:"divideRate"` // 代理分成比例
BeginTime time.Time `json:"deductionAt"` // 扣量开始时间(默认当前时间)
AutoDeduction bool `json:"autoDeduction" bson:"autoDeduction"` // 自动扣量开关
LessIncomeRate *float64 `json:"lessIncomeRate" bson:"lessIncomeRate"` // 最低收益比 CPA低于该值开启扣量(0.1 - 3.0)
}
type ChannelDeductionRuleDelete struct {
ID string `json:"id,omitempty" binding:"required"` // ID
}
// ChannelStatSearch 渠道统计(每天)查询
type ChannelStatSearch struct {
DayType *int8 `json:"dayType"` // 天数
RankType *int8 `json:"rankType"` // 排序方式:统计时间+1充值,2新增,3收益
Channel *string `json:"channel"` // 渠道
AppId *[]int32 `json:"appId"` // appId
Start *time.Time `json:"start"` // 开始时间
End *time.Time `json:"end"` // 结束时间
WithChild *bool `json:"withChild"` // 包含子渠道
Detail *bool `json:"detail"` // true 渠道详细
SumDate *time.Time `json:"sumDate"` // 哪一天
UserName *string `json:"userName"` // 所有者
Settlement *channelmod.SettlementWay `bson:"settlement"` // 结算方式 cps/cpa/cpt/cpc
common.Page
}
func (s *ChannelStatSearch) CanCalcTotal() bool {
return s.Start != nil && s.End != nil && s.AppId != nil && s.Channel != nil
}
type ChannelStatSearchResp struct {
Total int64 `json:"total"`
TotalInfo channelmod.ChannelStat `json:"totalInfo"`
List channelmod.ChannelStatList `json:"list"`
Income int64 `bson:"income" json:"income"` // 总收益
Desc string `bson:"desc" json:"desc"` // 描述
}
// 结算对话框搜索
type ChannelStatSettlementSearch struct {
Channel *string `json:"channel" binding:"required"` // 渠道
AppId *int32 `json:"appId" binding:"required"` // appId
Start *time.Time `json:"start"` // 开始时间
End *time.Time `json:"end"` // 结束时间
WithChild *bool `json:"withChild"` // 包含子渠道
UserName *string `json:"userName"` // 所有者
Settlement *channelmod.SettlementWay `json:"settlement"` // 结算方式 cps/cpa/cpt/cpc/hz
common.Page
}
type ChannelStatSettlementSearchResp struct {
Total int64 `json:"total"`
TotalInfo channelmod.ChannelStat `json:"totalInfo"`
List channelmod.ChannelStatList `json:"list"`
Income int64 `bson:"income" json:"income"` // 总收益
Desc string `bson:"desc" json:"desc"` // 描述
}
type ChannelStatSettlementSearch2 struct {
Channel *string `json:"channel" binding:"required"` // 渠道
AppId *int32 `json:"appId" binding:"required"` // appId
Start *time.Time `json:"start"` // 开始时间
End *time.Time `json:"end"` // 结束时间
IsPayed *bool `json:"isPayed"` // 结算状态 true:已结算或正在结算,false:未结算
UserName *string `json:"userName"` // 所有者
common.Page
}
type ChannelStatSettlementSearch2Resp struct {
Channel string `json:"channel"` // 渠道
AppId int32 `json:"appId"` // appId
TotalCount int64 `json:"totalCount"` // 总条数
TotalInfo channelmod.ChannelStat `json:"totalInfo"` // 按总条数合计的数据
TotalIncome int64 `json:"totalIncome"` // 总收益(列表的所有数据合计)
TotalDesc string `json:"totalDesc"` // 总收益描述
ValidCount int64 `json:"validCount"` // 有效条数
ValidInfo channelmod.ChannelStat `json:"validInfo"` // 按有效条数合计的数据
ValidIncome int64 `json:"validIncome"` // 有效收益(可结算的收益)
ValidDesc string `json:"validDesc"` // 有效收益描述
InvalidCount int64 `json:"invalidCount"` // 无效条数
InvalidInfo channelmod.ChannelStat `json:"invalidInfo"` // 按无效条数合计的数据
InvalidIncome int64 `json:"invalidIncome"` // 无效收益(不可结算的收益)
InvalidDesc string `json:"invalidDesc"` // 无效收益描述
List channelmod.ChannelStatList `json:"list"` // 全部记录
RuleId primitive.ObjectID `json:"ruleId"` // 扣量规则ID
Wallet channelmod.Wallet `json:"wallet"` // 钱包信息
}
// ChannelSettlementSearch 渠道结算(每15分钟)
type ChannelSettlementSearch struct {
Channel *string `json:"channel"` // 渠道
AppId *int32 `json:"appId"` // appId
Start *time.Time `json:"start"` // 开始时间
End *time.Time `json:"end"` // 结束时间
WithChild *bool `json:"withChild"` // 包含子渠道
common.Page
}
type ChannelSettlementSearchResp struct {
Total int64 `json:"total"`
List channelmod.ChannelSettlementList `json:"list"`
}
type UserInfoSearch struct {
UserId *int64 `json:"id"` // 用户ID
AppId *int32 `json:"appId"` // 渠道对应的appId
Channel *string `json:"channel"` // 渠道
IP *string `json:"ip"` // IP
Start *time.Time `json:"start"` // 开始时间
End *time.Time `json:"end"` // 结束时间
common.Page
}
type UserInfoSearchResp struct {
Total int64 `json:"total"`
List []registermod.RegisterMod `json:"list"`
}
type GetSettlementApplicantListReq struct {
}
type GetSettlementApplicantListResp struct {
List []string `json:"list" bson:"list"`
}
type GetApplyFormReq struct {
AppId *int32 `json:"appId"` // appId
Start *time.Time `json:"start"` // 开始时间
End *time.Time `json:"end"` // 结束时间
Status *channelsettlementrecord.SettlementStatus `json:"status"` // 状态
common.Page
}
type ApplyFormRecord struct {
ID primitive.ObjectID `json:"id,omitempty"` // ID
Channel string `json:"channel"` // 渠道
AppId int32 `json:"appId"` // appId
BeginTime time.Time `json:"beginTime"` // 开始时间
EndTime time.Time `json:"endTime"` // 结束时间
TotalMoney int64 `json:"totalMoney"` // 计算出的总金额
SettleMoney int64 `json:"settleMoney"` // 手动输入的要结算的真实金额()
Settlement channelmod.SettlementWay `json:"settlement"` // 结算方式 cps/cpa/cpt/cpc
Wallet channelmod.Wallet `json:"wallet"` // 钱包地址
PayMoney int64 `json:"payMoney"` // 打款金额
Usdt int64 `json:"usdt"` // 打款Usdt 还是分
Status channelsettlementrecord.SettlementStatus `json:"status"` // 状态
Remark string `json:"remark"` // 备注
Pictures []string `json:"pictures"` // 上传的图片
UpdatedAt time.Time `json:"updatedAt"` // 更新时间
CreatedAt time.Time `json:"createdAt"` // 创建时间
}
type ApplyFormRecordList []*ApplyFormRecord
type GetApplyFormResp struct {
Total int64 `json:"total"`
List ApplyFormRecordList `json:"list"`
}
type SettlementInfoSearch struct {
PayType *int8 `json:"payType"` // 支付类型,1ERC 2TRC 3銀行卡 4支付寶
Channel *string `json:"channel"` // 渠道
AppId *int32 `json:"appId"` // appId
Start *time.Time `json:"start"` // 开始时间
End *time.Time `json:"end"` // 结束时间
Remark *string `json:"remark"` // 备注
Status []channelsettlementrecord.SettlementStatus `json:"status"` // 状态数组
Applicants []string `json:"applicants"` // 申请人列表
common.Page
}
type SettlementInfoSearchResp struct {
Total int64 `json:"total"`
List channelsettlementrecord.ChannelSettlementRecordList `json:"list"`
}
type SettlementInfoUpdate struct {
ID primitive.ObjectID `json:"id" binding:"required"` // ID
PayMoney *int64 `json:"payMoney"` // 打款金额
Status *channelsettlementrecord.SettlementStatus `json:"status"` // 状态
Remark *string `json:"remark"` // 备注
Usdt *int64 `json:"usdt"` // 打款Usdt 还是分
}
type SettlementInfoUpdate2 struct {
ID primitive.ObjectID `json:"id" binding:"required"` // ID
Remark *string `json:"remark"` // 备注
Status *channelsettlementrecord.SettlementStatus `json:"status"` // 状态
// 财务(可修改)
PayMoney *int64 `json:"payMoney"` // 打款金额
Usdt *int64 `json:"usdt"` // 打款Usdt 还是分
SettleMoney *int64 `json:"settleMoney"` // 申请结算的金额
// 图片
Pictures []string `json:"pictures"` // 上传的图片
}
// SettlementInfoAdd 渠道结算信息
type SettlementInfoAdd struct {
AppId int32 `json:"appId" binding:"required"` // 应用ID
Channel string `json:"channel" binding:"required"` // 渠道
BeginTime time.Time `json:"beginTime" binding:"required"` // 开始时间
EndTime time.Time `json:"endTime" binding:"required"` // 结束时间
TotalMoney int64 `json:"totalMoney" binding:"required"` // 总金额
}
// SettlementInfoAdd2 渠道结算信息
type SettlementInfoAdd2 struct {
AppId int32 `json:"appId" binding:"required"` // 应用ID
Channel string `json:"channel" binding:"required"` // 渠道
TotalMoney int64 `json:"totalMoney"` // 总金额(提交的总金额,必须和按ids条数合计出来数据按ruleId扣量后一致)
SettleMoney int64 `json:"settleMoney" binding:"required"` // 手动输入的要结算的金额(为什么和TotalMoney不一致,因为可能已经预付过了)
RuleId primitive.ObjectID `json:"ruleId" binding:"required"` // 扣量RuleId
SettleIds []primitive.ObjectID `json:"settleIds" binding:"required"` // 要结算的天记录ID列表
BeginTime *time.Time `json:"beginTime"` // 开始时间
EndTime *time.Time `json:"endTime"` // 结束时间
Remark *string `json:"remark"` // 备注
WalletAddr1 *string `json:"walletAddr1"` // 钱包地址1
WalletAddr2 *string `json:"walletAddr2"` // 钱包地址2
}
type SettlementCalcReq struct {
AppId int32 `json:"appId" binding:"required"` // 应用ID
Channel string `json:"channel" binding:"required"` // 渠道
BeginTime *time.Time `json:"beginTime"` // 开始时间
EndTime *time.Time `json:"endTime"` // 结束时间
RuleId primitive.ObjectID `json:"ruleId" binding:"required"` // 扣量RuleId
SettleIds []primitive.ObjectID `json:"settleIds" binding:"required"` // 要结算的天记录ID列表
}
type SettlementCalcResp struct {
TotalCount int64 `json:"totalCount"` // 总条数
TotalInfo channelmod.ChannelStat `json:"totalInfo"` // 按总条数合计的数据
TotalIncome int64 `json:"totalIncome"` // 总收益(列表的所有数据合计)
TotalDesc string `json:"totalDesc"` // 总收益描述
}
type SettlementInfoDelete struct {
ID primitive.ObjectID `json:"id" binding:"required"` // ID
}
type SettlementInfoDetail struct {
ID primitive.ObjectID `json:"id" binding:"required"` // ID
common.Page
}
type SettlementInfoDetailResp struct {
Count int64 `json:"count"` // 总条数
List channelmod.ChannelStatList `json:"list"` // 全部记录
}
type SearchChannelStatComparedReq struct {
Channel *string `json:"channel"` // 渠道
AppId *int32 `json:"appId"` // appId
Start *time.Time `json:"start"` // 开始时间
End *time.Time `json:"end"` // 结束时间
WithChild *bool `json:"withChild"` // 包含子渠道
Settlement *channelmod.SettlementWay `bson:"settlement"` // 结算方式 cps/cpa/cpt/cpc
common.Page
}
type SearchChannelStatComparedResp struct {
Total int64 `json:"total"`
List channelmod.ChannelStatYestodayList `json:"list"`
}
// ChannelOwnerChangeInfoSearch 渠道所有者变更信息查询
type ChannelOwnerChangeInfoSearch struct {
ID *primitive.ObjectID `json:"id"` // ID
Channel *string `json:"channel"` // 渠道
OldUser *string `json:"oldUser"` // 变更前的所有者
NewUser *string `json:"newUser"` // 变更后的所有者
common.Page
}
type ChannelOwnerChangeInfoSearchResp struct {
Total int64 `json:"total"`
List channelmod.ChannelOwnerChangeList `json:"list"`
}
+348
View File
@@ -0,0 +1,348 @@
package proto
import (
"stat/common"
"time"
)
// 日常统计列表请求
type ListDailyStatReq struct {
AppId *[]int32 `form:"appId" json:"appId"` // appId
StartTime *time.Time `form:"startTime" json:"startTime"` // 开始时间
EndTime *time.Time `form:"endTime" json:"endTime"` // 结束时间
common.Page
}
type ListDailyHourStatReq struct {
AppId *int32 `form:"appId" json:"appId"` // appId
SumHour *int `form:"sumHour" json:"sumHour"` // 小时数
StartTime *time.Time `form:"startTime" json:"startTime"` // 开始时间
EndTime *time.Time `form:"endTime" json:"endTime"` // 结束时间
common.Page
}
type BlocDailyStatReq struct {
StartTime *time.Time `form:"time" json:"time"` // 开始时间
}
type ListDailyStatRes struct {
Total int64 `json:"total"`
TotalInfo *DailyStatInfo `json:"totalInfo"`
List []*DailyStatInfo `json:"list"`
}
type HourStatText struct {
Title string `json:"title"` //标题
Desc string `json:"desc"` //描述
Content string `json:"content"` //正文
}
type AppHourDataStatInfoRes struct {
Data []HourStatText `json:"data"`
}
type DailyStatInfo struct {
SumDate time.Time `json:"sumDate"` // 记录时间 按天对齐
AppId int32 `json:"appId"` // appId
AppName string `json:"appName"` // app名称
// 注册统计
TotalNewCount int64 `json:"totalNewCount"` // 新增总数
NewDirectCount int64 `json:"newDirectCount"` // 新增直推
NewFissionCount int64 `json:"newFissionCount"` // 新增裂变
NewDeductionCount int64 `json:"newDeductionCount"` // 新增扣量
NewNaturalCount int64 `json:"newNaturalCount"` // 自然新增
NewWebCount int64 `json:"newWebCount"` // 官网注册
NewDistrictCount int64 `json:"newDistrictCount"` // 渠道注册
NewNormalCount int64 `json:"newNormalCount"` // 自来注册
AndroidAddCount int64 `json:"androidAddCount"` // android新增
IosAddCount int64 `json:"iosAddCount"` // ios新增
// 轻量注册
LightAddCount int64 `json:"lightAddCount"` // ##轻量注册
LightGuestAddCount int64 `json:"lightGuestAddCount"` // 轻量游客
LightFormalAddCount int64 `json:"lightFormalAddCount"` // 轻量注册
LightDirectCount int64 `json:"lightDirectCount"` // 轻量直推注册
LightFissionCount int64 `json:"lightFissionCount"` // 轻量裂变注册
LightDeductionCount int64 `json:"lightDeductionCount"` // 轻量扣量注册
LightNaturalCount int64 `json:"lightNaturalCount"` // 轻量自然注册
LightWebCount int64 `json:"lightWebCount"` // 轻量官网注册
LightDistrictCount int64 `json:"lightDistrictCount"` // 轻量渠道注册
LightNormalCount int64 `json:"lightNormalCount"` // 轻量自来注册
// H5注册
H5FormalCount int64 `json:"h5FormalCount"` // H5正式注册
H5AddCount int64 `json:"h5AddCount"` // H5新增
H5PcAddCount int64 `json:"h5PcAddCount"` // H5Pc新增
H5IosAddCount int64 `json:"h5IosAddCount"` // H5Ios新增
H5AndroidAddCount int64 `json:"h5AndroidAddCount"` // H5Android新增
// 访问统计
TotalVisitCount int64 `json:"totalVisitCount"` // 日活
DirectVisitCount int64 `json:"directVisitCount"` // 直推访问数
FissionVisitCount int64 `json:"fissionVisitCount"` // 裂变访问数
DeductionVisitCount int64 `json:"deductionVisitCount"` // 扣量访问数
NaturalVisitCount int64 `json:"naturalVisitCount"` // 自然访问数
TodayDistrictVisitCount int64 `json:"todayDistrictVisitCount"` // 当日渠道访问量
TodayWebVisitCount int64 `json:"todayWebVisitCount"` // 当日官网访问量
TodayNormalVisitCount int64 `json:"todayNormalVisitCount"` // 当日自来访问量
TodayIosVisitCount int64 `json:"todayIosVisitCount"` // 当日IOS访问量(日活)
TodayAndroidVisitCount int64 `json:"todayAndroidVisitCount"` // 当日安卓访问量(日活)
TodayH5VisitCount int64 `json:"todayH5VisitCount"` // 当日H5访问量(日活)
TodayH5PcVisitCount int64 `json:"todayH5PcVisitCount"` // 当日H5Pc访问量(日活)
TodayH5IosVisitCount int64 `json:"todayH5IosVisitCount"` // 当日H5Ios访问量(日活)
TodayH5AndroidVisitCount int64 `json:"todayH5AndroidVisitCount"` // 当日H5Android访问量(日活)
// 轻量访问
LightVisitCount int64 `json:"lightVisitCount"` // 当日Light访问量
LightDirectVisitCount int64 `json:"lightDirectVisitCount"` // 轻量直推访问
LightFissionVisitCount int64 `json:"lightFissionVisitCount"` // 轻量裂变访问
LightDeductionVisitCount int64 `json:"lightDeductionVisitCount"` // 轻量扣量访问
LightNaturalVisitCount int64 `json:"lightNaturalVisitCount"` // 轻量自然访问
LightWebVisitCount int64 `json:"lightWebVisitCount"` // 轻量官网访问
LightDistrictVisitCount int64 `json:"lightDistrictVisitCount"` // 轻量渠道访问
LightNormalVisitCount int64 `json:"lightNormalVisitCount"` // 轻量自来访问
// 充值统计
TotalAmount int64 `json:"totalAmount"` // 总充值
DirectAmount int64 `json:"directAmount"` // 直推充值金额
FissionAmount int64 `json:"fissionAmount"` // 裂变充值金额
DeductionAmount int64 `json:"deductionAmount"` // 扣量充值金额
NaturalAmount int64 `json:"naturalAmount"` // 自然充值
TodayDistrictRecharge int64 `json:"todayDistrictRecharge"` // 当日渠道充值新增
TodayWebRecharge int64 `json:"todayWebRecharge"` // 当日官网充值新增
TodayNormalRecharge int64 `json:"todayNormalRecharge"` // 当日自来量充值新增
TodayAndroidRecharge int64 `json:"todayAndroidRecharge"` // 当日android充值
TodayIosRecharge int64 `json:"todayIosRecharge"` // 当日Ios充值
TodayH5Recharge int64 `json:"todayH5Recharge"` // 当日H5充值
TodayH5FormalRecharge int64 `json:"todayH5FormalRecharge"` // 当日H5Formal充值
TodayH5PcRecharge int64 `json:"todayH5PcRecharge"` // 当日H5Pc充值
TodayH5IosRecharge int64 `json:"todayH5IosRecharge"` // 当日H5Ios充值
TodayH5AndroidRecharge int64 `json:"todayH5AndroidRecharge"` // 当日H5Android充值
// 轻量充值次数
LightRechargeCount int64 `json:"lightRechargeCount"` // 当日轻量充值次数
LightDirectRechargeCount int64 `json:"lightDirectRechargeCount"` // 轻量直推充值次数
LightFissionRechargeCount int64 `json:"lightFissionRechargeCount"` // 轻量裂变充值次数
LightDeductionRechargeCount int64 `json:"lightDeductionRechargeCount"` // 轻量扣量充值次数
LightNaturalRechargeCount int64 `json:"lightNaturalRechargeCount"` // 轻量自然充值次数
LightWebRechargeCount int64 `json:"lightWebRechargeCount"` // 轻量官网充值次数
LightDistrictRechargeCount int64 `json:"lightDistrictRechargeCount"` // 轻量渠道充值次数
LightNormalRechargeCount int64 `json:"lightNormalRechargeCount"` // 轻量自来充值次数
// 轻量充值钱数
LightRechargeAmount int64 `json:"lightRechargeAmount"` // 当日轻量充值钱数
LightDirectRechargeAmount int64 `json:"lightDirectRechargeAmount"` // 轻量直推充值钱数
LightFissionRechargeAmount int64 `json:"lightFissionRechargeAmount"` // 轻量裂变充值钱数
LightDeductionRechargeAmount int64 `json:"lightDeductionRechargeAmount"` // 轻量扣量充值钱数
LightNaturalRechargeAmount int64 `json:"lightNaturalRechargeAmount"` // 轻量自然充值钱数
LightWebRechargeAmount int64 `json:"lightWebRechargeAmount"` // 轻量官网充值钱数
LightDistrictRechargeAmount int64 `json:"lightDistrictRechargeAmount"` // 轻量渠道充值钱数
LightNormalRechargeAmount int64 `json:"lightNormalRechargeAmount"` // 轻量自来充值钱数
// 其他充值
ARPU int64 `json:"ARPU"` // 人均充值
ARPPU int64 `json:"ARPPU"` // 付费用户人均充值
VipPayByMoney int64 `json:"vipPayByMoney"` // 会员充值
PayForAthor int64 `json:"payForAthor"` // 金币充值
RepeatAmount int64 `json:"repeatAmount"` // 复冲金额
RepeatVipMoney int64 `json:"repeatVipMoney"` // 复冲VIP
GameRechageAmount int64 `json:"gameRechageAmount"` // 游戏充值
GameWithdrawAmount int64 `json:"gameWithdrawAmount"` // 游戏提现
// 新用户和老用户充值
OldRechargeAmount int64 `json:"oldRechargeAmount"` // 老用户充值金额
OldVipRecharge int64 `json:"oldVipRecharge"` // 老用户VIP充值
OldCoinRecharge int64 `json:"oldCoinRecharge"` // 老用户金币充值
// 新增充值
NewRechargeCount int64 `json:"newRechargeCount"` // 新增充值数
NewRechargeAmount int64 `json:"newRechargeAmount"` // 新增充值金额
NewVipRecharge int64 `json:"newVipRecharge"` // 新增VIP充值
NewCoinRecharge int64 `json:"newCoinRecharge"` // 新增金币充值
// 充值率
NewRechargeRate float64 `json:"newRechargeRate"` // 新增充值率
VisitRechargeRate float64 `json:"visitRechargeRate"` // 登陆充值率
// 订单统计
SuccessRechargeOrder int64 `json:"successRechargeOrder"` // 充值成功订单数
TotalRechargeOrder int64 `json:"totalRechargeOrder"` // 拉起订单数
RechargeSuccessRate string `json:"rechargeSuccessRate"` // 支付成功率
// 留存率
Day1RetainRate float64 `json:"day1RetainRate"` // 次日留存率
Day3RetainRate float64 `json:"day3RetainRate"` // 3日留存率
Day7RetainRate float64 `json:"day7RetainRate"` // 7日留存率
// 落地页点击
LandpageAndroidClick int64 `json:"landpageAndroidClick"` // 落地页android访问次数
LandpageIosAppstoreClick int64 `json:"landpageIosAppstoreClick"` // 落地页iOS商店包访问次数
LandpageIosAthorClick int64 `json:"landpageIosAthorClick"` // 落地页iOS其他包访问次数
LandpageIosH5Click int64 `json:"landpageIosH5Click"` // 落地页H5访问次数
// 更新时间
UpdatedAt time.Time `json:"updatedAt"` // 更新时间
}
type DailyStatInfoExport struct {
SumDate time.Time `json:"sumDate"` // 记录时间 按天对齐
TotalVisitCount int64 `json:"totalVisitCount"` // 总日活
TotalNewCount int64 `json:"totalNewCount"` // 总新增
TotalAmount int64 `json:"totalAmount"` // 总充值
// 新增详细
TotalNewCountAndroid int64 `json:"totalNewCountAndroid"` // android新增
TotalNewCountIos int64 `json:"totalNewCountIos"` // ios新增
TotalNewCountH5 int64 `json:"totalNewCountH5"` // H5新增
TotalNewCountChannel int64 `json:"totalNewCountChannel"` // 渠道新增
// 充值详细
TotalAmountChannel int64 `json:"totalAmountAndroid"` // 渠道充值
TotalAmountOldUser int64 `json:"totalAmountOldUser"` // 老用户充值
TotalAmountNewUser int64 `json:"totalAmountNewUser"` // 新用户充值
TotalRepeatAmount int64 `json:"totalRepeatAmount"` // 复冲金额
TotalRepeatVipMoney int64 `json:"totalRepeatVipMoney"` // 复冲VIP
// 订单统计
TotalLunchOrder int64 `json:"totalLunchOrder"` // 拉起订单数
TotalSuccessOrder int64 `json:"totalSuccessOrder"` // 成功订单数
}
type ListDailyHourStatRes struct {
Total int64 `json:"total"`
List []*DailyHourStatInfo `json:"list"`
}
type ListLandPageStatRes struct {
Total int64 `json:"total"`
Summary DownloadStatInfo `json:"summary"`
List []*DownloadStatInfo `json:"list"`
}
type DailyHourStatInfo struct {
SumDate time.Time `json:"sumDate"` // 记录时间 按天对齐
AppId int32 `json:"appId"` // appId
SumHour int `json:"sumHour"` // 小时数
AppName string `json:"appName"` // app名称
// 注册
NewTotalCount int64 `json:"newTotalCount"` // **新增总量
NewDirectCount int64 `json:"newDirectCount"` // 新增直推
NewFissionCount int64 `json:"newFissionCount"` // 新增裂变
NewDeductionCount int64 `json:"newDeductionCount"` // 新增扣量
NewNaturalCount int64 `json:"newNaturalCount"` // 自然新增
NewWebCount int64 `json:"newWebCount"` // **官网新增
NewNormalCount int64 `json:"newNormalCount"` // **自来新增
NewDistrictCount int64 `json:"newDistrictCount"` // **渠道新增
NewAndroidCount int64 `json:"newAndroidCount"` // android新增
NewIosCount int64 `json:"newIosCount"` // ios新增
// 轻量注册
NewLightCount int64 `json:"newLightCount"` // light新增
NewLightGuestCount int64 `json:"newLightGuestCount"` // light新增安装
NewLightFormalCount int64 `json:"newLightFormalCount"` // light新增注册
NewLightDirectCount int64 `json:"newLightDirectCount"` // light新增直推
NewLightFissionCount int64 `json:"newLightFissionCount"` // light新增裂变
NewLightDeductionCount int64 `json:"newLightDeductionCount"` // light新增扣量
NewLightNaturalCount int64 `json:"newLightNaturalCount"` // light自然新增
NewLightWebCount int64 `json:"newLightWebCount"` // light官网新增
NewLightNormalCount int64 `json:"newLightNormalCount"` // light自来新增
NewLightDistrictCount int64 `json:"newLightDistrictCount"` // light渠道新增
// H5注册
NewH5Count int64 `json:"newH5Count"` // H5新增
NewH5FormalCount int64 `json:"newH5FormalCount"` // H5注册新增
NewH5PcCount int64 `json:"newH5PcCount"` // +H5PC新增
NewH5IosCount int64 `json:"NewH5IosCount"` // +H5IOS新增
NewH5AndroidCount int64 `json:"newH5AndroidCount"` // +H5Android新增
// 访问
TotalVisitCount int64 `json:"totalVisitCount"` // 访问总量
DirectVisitCount int64 `json:"directVisitCount"` // 直推访问数
FissionVisitCount int64 `json:"fissionVisitCount"` // 裂变访问数
NaturalVisitCount int64 `json:"naturalVisitCount"` // 自然访问数
WebVisitCount int64 `json:"webVisitCount"` // 官网访问
NormalVisitCount int64 `json:"normalVisitCount"` // 自来访问
DistrictVisitCount int64 `json:"districtVisitCount"` // 渠道访问
IosVisitCount int64 `json:"iosVisitCount"` // Ios访问量
AndroidVisitCount int64 `json:"androidVisitCount"` // Android访问量
LightVisitCount int64 `json:"lightVisitCount"` // light访问量
LightVisitDirectCount int64 `json:"lightVisitDirectCount"` // light访问量直推
LightVisitFissionCount int64 `json:"lightVisitFissionCount"` // light访问量裂变
LightVisitDeductionCount int64 `json:"lightVisitDeductionCount"` // light访问量扣量
LightVisitNaturalCount int64 `json:"lightVisitNaturalCount"` // light访问量自然
LightVisitWebCount int64 `json:"lightVisitWebCount"` // light访问量官网
LightVisitNormalCount int64 `json:"lightVisitNormalCount"` // light访问量自来
LightVisitDistrictCount int64 `json:"lightVisitDistrictCount"` // light访问量渠道
H5VisitCount int64 `json:"h5VisitCount"` // +H5访问量
H5PcVisitCount int64 `json:"h5PcVisitCount"` // +H5Pc访问量
H5IosVisitCount int64 `json:"h5IosVisitCount"` // +H5Ios访问量
H5AndroidVisitCount int64 `json:"h5AndroidVisitCount"` // +H5Android访问量
// 充值
TotalAmount int64 `json:"totalAmount"` // 充值金额总量
SuccessRechargeOrder int64 `json:"successRechargeOrder"` // 充值成功订单数
DirectAmount int64 `json:"directAmount"` // 直推充值金额
DirectAmountCount int64 `json:"directAmountCount"` // +直推充值订单数
FissionAmount int64 `json:"fissionAmount"` // 裂变充值金额
FissionAmountCount int64 `json:"fissionAmountCount"` // +裂变充值订单数
NaturalAmount int64 `json:"naturalAmount"` // 自然充值
NaturalAmountCount int64 `json:"naturalAmountCount"` // +自然充值订单数
DeductionAmount int64 `json:"deductionAmount"` // 充值扣量
DeductionAmountCount int64 `json:"deductionAmountCount"` // 充值扣量次数
WebAmount int64 `json:"webAmount"` // 官网充值
WebAmountCount int64 `json:"webAmountCount"` // 官网充值次数
NormalAmount int64 `json:"normalAmount"` // 自来充值
NormalAmountCount int64 `json:"normalAmountCount"` // 自来充值次数
DistrictAmount int64 `json:"districtAmount"` // 渠道充值
DistrictAmountCount int64 `json:"districtAmountCount"` // 渠道充值次数
AndroidAmount int64 `json:"androidAmount"` // 安卓充值金额
AndroidAmountCount int64 `json:"androidAmountCount"` // 安卓充值次数
IosAmount int64 `json:"iosAmount"` // Ios充值金额
IosAmountCount int64 `json:"iosAmountCount"` // Ios充值次数
LightAmount int64 `json:"lightAmount"` // light充值金额
LightAmountCount int64 `json:"lightAmountCount"` // light充值次数
LightDirectAmount int64 `json:"lightDirectAmount"` // light充值金额直推
LightDirectAmountCount int64 `json:"lightDirectAmountCount"` // light充值次数直推
LightFissionAmount int64 `json:"lightFissionAmount"` // light充值金额裂变
LightFissionAmountCount int64 `json:"lightFissionAmountCount"` // light充值次数裂变
LightDeductionAmount int64 `json:"lightDeductionAmount"` // light充值金额扣量
LightDeductionAmountCount int64 `json:"lightDeductionAmountCount"` // light充值次数扣量
LightNaturalAmount int64 `json:"lightNaturalAmount"` // light充值金额自然
LightNaturalAmountCount int64 `json:"lightNaturalAmountCount"` // light充值次数自然
LightWebAmount int64 `json:"lightWebAmount"` // light充值金额官网
LightWebAmountCount int64 `json:"lightWebAmountCount"` // light充值次数官网
LightNormalAmount int64 `json:"lightNormalAmount"` // light充值金额自来
LightNormalAmountCount int64 `json:"lightNormalAmountCount"` // light充值次数自来
LightDistrictAmount int64 `json:"lightDistrictAmount"` // light充值金额渠道
LightDistrictAmountCount int64 `json:"lightDistrictAmountCount"` // light充值次数渠道
H5Amount int64 `json:"h5Amount"` // +H5充值金额
H5AmountCount int64 `json:"h5AmountCount"` // +H5充值次数
H5FormalAmount int64 `json:"h5FormalAmount"` // 当日H5Formal充值
H5FormalAmountCount int64 `json:"h5FormalAmountCount"` // 当日H5Formal充值次数
H5PcAmount int64 `json:"h5PcAmount"` // 当日H5Pc充值
H5PcAmountCount int64 `json:"h5PcAmountCount"` // 当日H5Pc充值次数
H5IosAmount int64 `json:"todayH5IosRecharge"` // 当日H5Ios充值
H5IosAmountCount int64 `json:"h5IosAmountCount"` // 当日H5Ios充值次数
H5AndroidAmount int64 `json:"h5AndroidAmount"` // 当日H5Android充值
H5AndroidAmountCount int64 `json:"h5AndroidAmountCount"` // 当日H5Android充值次数
RepeatAmount int64 `json:"repeatAmount"` // 复冲金额
RepeatAmountCount int64 `json:"repeatAmountCount"` // +复冲订单数
VipPayByMoney int64 `json:"vipPayByMoney"` // 会员购买
VipPayByAmount int64 `json:"vipPayByAmount"` // 金币购买
VipRepeatAmount int64 `json:"vipRepeatAmount"` // VIP复冲金额
TotalRechargeOrder int64 `json:"totalRechargeOrder"` // 拉起订单数
RechargeSuccessRate string `json:"rechargeSuccessRate"` // 支付成功率
GameRechageAmount int64 `json:"gameRechageAmount"` // 游戏充值
GameWithdrawAmount int64 `json:"gameWithdrawAmount"` // 游戏提现
// 新用户和老用户充值
OldRechargeAmount int64 `json:"oldRechargeAmount"` // ¥老用户充值金额
OldVipRecharge int64 `json:"oldVipRecharge"` // ¥老用户VIP充值
OldCoinRecharge int64 `json:"oldCoinRecharge"` // ¥老用户金币充值
// 新增充值
NewRechargeCount int64 `json:"newRechargeCount"` // 新增充值数
NewRechargeAmount int64 `json:"newRechargeAmount"` // 新增充值金额
NewVipRecharge int64 `json:"newVipRecharge"` // ¥新增VIP充值
NewCoinRecharge int64 `json:"newCoinRecharge"` // ¥新增金币充值
// 落地页点击
LandpageAndroidClick int64 `json:"landpageAndroidClick"` // 落地页android访问次数
LandpageIosAppstoreClick int64 `json:"landpageIosAppstoreClick"` // 落地页iOS商店包访问次数
LandpageIosAthorClick int64 `json:"landpageIosAthorClick"` // 落地页iOS其他包访问次数
LandpageIosH5Click int64 `json:"landpageIosH5Click"` // 落地页H5访问次数
UpdatedAt time.Time `json:"updatedAt"` // 更新时间
}
type ListDownloadSummaryRes struct {
List []DownloadSummaryInfo `json:"list"`
}
type DownloadSummaryInfo struct {
AppId int `json:"appId" bson:"_id"`
Total int `json:"total" bson:"total"`
}
// 日常统计列表请求
type ChannelStatExportReq struct {
AppId *[]int32 `form:"appId" json:"appId"` // appId
Channel *string `form:"channel" json:"channel"` // 渠道
StartTime *time.Time `form:"startTime" json:"startTime"` // 开始时间
EndTime *time.Time `form:"endTime" json:"endTime"` // 结束时间
}
+25
View File
@@ -0,0 +1,25 @@
package proto
import "time"
// 请求曲线图数据
type ListDistrictMinuteStatReq struct {
SumDate *time.Time `form:"sumDate" json:"sumDate" binding:"required"` // 请求日的零点时间
ChannelCode *string `form:"channelCode" json:"channelCode"` // 请求的渠道码
ChannelRemark *string `form:"channelRemark" json:"channelRemark"` // 渠道备注
AppId *int32 `form:"appId" json:"appId"` // 应用id
}
type ListDistrictMinuteStatRes struct {
AppInfo AppInfoRes `json:"appInfo"` // app信息
TodayGraphList []DistrictMinuteStatInfo `json:"todayGraphList"` // 今日曲线图数据
YesterdayGraphList []DistrictMinuteStatInfo `json:"yesterdayGraphList"` // 昨日曲线图数据
}
type DistrictMinuteStatInfo struct {
SumDate time.Time `json:"sumDate"` // 记录时间,当日零点时间
NewCount int64 `json:"newCount"` // 新增数
AndroidAddCount int64 `json:"androidAddCount"` // android新增
IosAddCount int64 `json:"iosAddCount"` // ios新增
FissionCount int64 `json:"fissionCount"` // 新增裂变
}
+41
View File
@@ -0,0 +1,41 @@
package proto
import (
"stat/common"
"stat/models/domainmod"
"go.mongodb.org/mongo-driver/bson/primitive"
)
// 请求域名列表
type ListDomainInfoReq struct {
Name *string `json:"name"`
AppId *int32 `json:"appId"`
Enable *bool `json:"enable"`
Category *domainmod.Category `json:"category" ` // 分类
Status *domainmod.CheckStatus `json:"status"` // 状态
Check *domainmod.CheckType `json:"check"` // 检测方式
common.Page
}
// 响应域名列表
type ListDomainInfoRes struct {
Total int64 `json:"total"`
List domainmod.DomainList `json:"list"`
}
// 添加域名
type AddDomainInfoReq struct {
domainmod.Domain
}
// 修改域名
type UpdateDomainInfoReq struct {
Id primitive.ObjectID `json:"id" binding:"required"`
Update domainmod.DomainDoc `json:"update"`
}
// 删除域名
type DelDomainInfoReq struct {
Id primitive.ObjectID `json:"id" binding:"required"`
}
+76
View File
@@ -0,0 +1,76 @@
package proto
import (
"time"
)
type TgMsgType int32
const (
TgMsgTypeNone TgMsgType = 0
TgMsgTypeBackendRechargeMonitor TgMsgType = 1 // 后台充值监控
)
type SendTgMessageReq struct {
AppId int32 `json:"appId"`
MsgType TgMsgType `json:"msgType"`
Message string `json:"message"`
}
type SendTgMessageRes struct {
}
// InnerRechargeReq
type InnerRechargeReq struct {
InnerId int32 `json:"innerId"`
Begin time.Time `json:"begin"`
End time.Time `json:"end"`
}
// InnerRechargeReq
type InnerRechargeBotcmdReq struct {
InnerId int32 `json:"innerId"`
BeginTime time.Time `json:"beginTime"`
EndTime time.Time `json:"endTime"`
}
type InnerDailyMap struct {
Id string `json:"id"`
List []*InnerDailyRecharge `json:"list"`
}
type InnerDailyRecharge struct {
AppId int32 `json:"appId"`
Name string `json:"name"`
Type string `json:"type"`
DateTime string `json:"dateTime"`
SumDate time.Time `json:"sumDate"`
DailyVistCount int64 `json:"dailyVistCount"`
DailyRegister int64 `json:"dailyRegister"`
DailyAppAmount int64 `json:"dailyAppAmount"`
DailyGameAmount int64 `json:"dailyGameAmount"`
RechargeOrder int64 `json:"rechargeOrder"`
CellType int64 `json:"cellType"`
IsOld bool `json:"isOld"`
BeginRow int `json:"beginRow"`
BeginCol int `json:"beginCol"`
}
type InnerDailyRechargeList struct {
List []*InnerDailyRecharge `json:"List"`
}
type InnerDailyRechargeResp struct {
Code int32 `json:"code"`
Msg string `json:"msg"`
Tip string `json:"tip"`
Data InnerDailyRechargeList `json:"data"`
Time time.Time `json:"time"`
}
/*
type InnerRechargeXlsl struct {
BeginRow int `json:"beginRow"`
BeginCol int `json:"beginCol"`
Recharge *InnerDailyRecharge `json:"recharge"`
}
*/
+71
View File
@@ -0,0 +1,71 @@
package proto
import (
"stat/common"
"stat/models/landPageConfig"
"time"
)
// LandingPageConfig
type LandingPageConfig struct {
Title string `json:"title" bson:"title"` //主题
Desc string `json:"desc" bson:"desc"` //描述
Actor string `json:"actor" bson:"actor"` //演员
Bango string `json:"bango" bson:"bango"` //番号,唯一
AddedTime time.Time `json:"addedTime" bson:"addedTime"` //上架时间(审核通过时间)
Picture string `json:"picture" bson:"picture"` //图片
Media string `json:"media" bson:"media"` //视频
Rank int64 `json:"rank" bson:"rank"` //排序
}
type LandingPageConfigList []*LandingPageConfig
// 响应落地页配置列表
type LandPageConfigListResp struct {
Total int64 `json:"total"`
List landPageConfig.LandPageConfigList `json:"list"`
}
// 新增落地页账号
type AddLandPageConfigReq struct {
AppId *int32 `json:"appId" binding:"required"` //appId
LandPageType *int8 `json:"landPageType" binding:"required"` //类型,1PC端,2移动端
Title *string `json:"title" binding:"required"` //主题
Desc *string `json:"desc" bson:"desc"` //描述
Actor *string `json:"actor" bson:"actor"` //演员
Bango *string `json:"bango" bson:"bango"` //番号,唯一
AddedTime *time.Time `json:"addedTime" bson:"addedTime"` //上架时间(审核通过时间)
Picture *string `json:"picture" bson:"picture"` //图片
Media *string `json:"media" bson:"media"` //视频
Rank *int64 `json:"rank" bson:"rank"` //排序
Status *bool `json:"status"` //状态
}
// 更新落地页信息
type UpdateLandPageConfigReq struct {
ID int64 `json:"id" binding:"required"` //Id
Title *string `json:"title" binding:"required"` //主题
Desc *string `json:"desc" bson:"desc"` //描述
Actor *string `json:"actor" bson:"actor"` //演员
Bango *string `json:"bango" bson:"bango"` //番号,唯一
AddedTime *time.Time `json:"addedTime" bson:"addedTime"` //上架时间(审核通过时间)
Picture *string `json:"picture" bson:"picture"` //图片
Media *string `json:"media" bson:"media"` //视频
Rank *int64 `json:"rank" bson:"rank"` //排序
Status *bool `json:"status"` //状态
}
type DelLandPageConfigReq struct {
ID int64 `form:"id" json:"id" binding:"required"` //Id
}
type FindLandPageConfigReq struct {
AppId *int32 `json:"appId"` //appId
Type *int8 `json:"type"`
Status *bool `json:"status"`
common.Page
}
type GetLandPageConfigByTypeReq struct {
AppId int32 `json:"appId" binding:"required"` //appId
Type int8 `json:"type"`
common.Page
}
+28
View File
@@ -0,0 +1,28 @@
package proto
import "stat/models/downloadstat"
type ConversionRate struct {
VisitToDownloadRate float64 `json:"visitToDownloadRate"` // 浏览下载转化率
VisitToInstallRate float64 `json:"visitToInstallRate"` // 浏览安装转化率
DownloadToInstallRate float64 `json:"downloadToInstallRate"` // 下载安装转化率
}
type DownloadStatInfo struct {
downloadstat.Stat
ConversionRate
}
func (s *DownloadStatInfo) CalcConversionRate() {
if s.VisitUnique != 0 {
s.VisitToDownloadRate = float64(s.DownUnique*100) / float64(s.VisitUnique)
s.VisitToInstallRate = float64(s.InstallUnique*100) / float64(s.VisitUnique)
}
if s.DownUnique != 0 {
s.DownloadToInstallRate = float64(s.InstallUnique*100) / float64(s.DownUnique)
}
}
func StatSummation(base, value *DownloadStatInfo) {
downloadstat.StatSummation(&base.Stat, &value.Stat)
}
+49
View File
@@ -0,0 +1,49 @@
package proto
import "stat/common"
// LandingPageInfo 落地页管理
type LandingPageInfo struct {
ID int64 `form:"id" json:"id"` //Id
AppId int32 `form:"appId" json:"appId"` //appId
Url string `form:"url" json:"url"` //Url
Status bool `form:"status" json:"status" binding:"required"` //状态 默认true
ChannelCode string `form:"channelCode" json:"channelCode"` //渠道码
Type int32 `form:"type" json:"type" binding:"required"` //类型 1:渠道 2:分享
Remark string `form:"remark" json:"remark"` //备注
}
// 响应落地页列表
type LandingPageListRes struct {
Total int64 `json:"total"`
List []LandingPageInfo `json:"list"`
}
// 新增落地页账号
type AddLandingPageReq struct {
AppId *int32 `form:"appId" json:"appId" binding:"required"` //appId
Url *string `form:"url" json:"url" binding:"required"` //Url
Status *bool `form:"status" json:"status" binding:"required"` //状态 默认true
ChannelCode *string `form:"channelCode" json:"channelCode"` //渠道码
Remark *string `form:"remark" json:"remark"` //备注
Type *int32 `form:"type" json:"type" binding:"required"` //类型 1:渠道 2:分享
}
// 更新落地页信息
type UpdateLandingPageReq struct {
ID int64 `form:"id" json:"id" binding:"required"` //Id
Status *bool `form:"status" json:"status" binding:"omitempty"` //状态 默认true
Url *string `form:"url" json:"url" binding:"omitempty"` //Url
ChannelCode *string `form:"channelCode" json:"channelCode"` //渠道码
Remark *string `form:"remark" json:"remark" binding:"omitempty"` //备注
Type *int32 `form:"type" json:"type" binding:"required"` //类型 1:渠道 2:分享
}
type DelLandingPageReq struct {
ID int64 `form:"id" json:"id" binding:"required"` //Id
}
type FindLandingPageReq struct {
AppId int32 `form:"appId" json:"appId" binding:"required"` //appId
common.Page
}
+43
View File
@@ -0,0 +1,43 @@
package proto
import (
"stat/models/landpageImg"
"time"
)
type LandpagePictureSearch struct {
Name *string `json:"name" bson:"name"` // 分类名称
Status *bool `json:"status" bson:"status"` // 是否启用
PageNum int64 `json:"pageNum"`
PageSize int64 `json:"pageSize"`
}
type LandpagePictureSearchResp struct {
Total int64 `json:"total"`
List landpageImg.LandpageImgList `json:"list"`
}
type LandpagePictureUpdate struct {
Name *string `bson:"name,omitempty" json:"name,omitempty"` // 名称
PcAvatar *string `json:"pcAvatar" bson:"pcAvatar,omitempty"` // PC端图片
MobileAvatar *string `json:"mobileAvatar" bson:"mobileAvatar,omitempty"` // 移动端图片
PcBackgroud *string `json:"pcBackgroud" bson:"pcBackgroud,omitempty"` // PC端背景图
MobileBackgroud *string `json:"mobileBackgroud" bson:"mobileBackgroud,omitempty"` // 移动端背景图
Music *string `json:"music" bson:"music,omitempty"` // 音频文件
Rank *int64 `json:"rank" bson:"rank,omitempty"` // 排序
Status *bool `json:"status,omitempty" bson:"status,omitempty"` // 是否启用
PcTitle *string `json:"pcTitle" bson:"pcTitle,omitempty"` // PC端标语
MobileTiltle *string `json:"mobileTiltle" bson:"mobileTiltle,omitempty"` // 移动端标语
UpdatedAt *time.Time `json:"updatedAt" bson:"updatedAt,omitempty"` // 更新时间
}
type LandpagePictureUpdateReq struct {
Id string `json:"id"`
Param *LandpagePictureUpdate `json:"param"` // 参数
}
type LandpagePictureAddReq struct {
landpageImg.LandpageImg
}
type LandpagePictureDelReq struct {
Id string `json:"id"`
}
+38
View File
@@ -0,0 +1,38 @@
package proto
import (
"stat/models/mediatag"
"time"
)
type MediaTagSearch struct {
Name *string `json:"name" bson:"name"` // 分类名称
Status *bool `json:"status" bson:"status"` // 是否启用
Type *mediatag.MediaTagType `json:"type" bson:"type"` // 类别
PageNum int64 `json:"pageNum"`
PageSize int64 `json:"pageSize"`
}
type MediaTagSearchResp struct {
Total int64 `json:"total"`
List mediatag.MediaTagList `json:"list"`
}
type MediaTagUpdate struct {
Name *string `bson:"name,omitempty" json:"name,omitempty"` // 名称
Rank *int64 `json:"rank" bson:"rank,omitempty"` // 排序
Status *bool `json:"status,omitempty" bson:"status,omitempty"` // 是否启用
Type *mediatag.MediaTagType `json:"type" bson:"type,omitempty"` // 类
UpdatedAt *time.Time `json:"updatedAt" bson:"updatedAt,omitempty"` // 更新时间
}
type MediaTagUpdateReq struct {
Id string `json:"id"`
Param *MediaTagUpdate `json:"param"` // 参数
}
type MediaTagAddReq struct {
mediatag.MediaTag
}
type MediaTagDelReq struct {
Id string `json:"id"`
}
+75
View File
@@ -0,0 +1,75 @@
package proto
import "time"
// 请求曲线图数据
type ListMinuteStatReq struct {
SumDate *time.Time `form:"sumDate" json:"sumDate" binding:"required"` // 请求日的零点时间
CompareTime *time.Time `form:"compareTime" json:"compareTime"` // 对比时间
AppId *int32 `form:"appId" json:"appId" binding:"required"` // 应用id
}
type ListMinuteStatRes struct {
AppInfo AppInfoRes `json:"appInfo"` // app信息
TodayGraphList []MinuteStatInfo `json:"todayGraphList"` // 今日曲线图数据
YesterdayGraphList []MinuteStatInfo `json:"yesterdayGraphList"` // 昨日曲线图数据
}
type MinuteStatInfo struct {
SumDate time.Time `json:"sumDate"` // 记录时间,当日零点时间
NewCount int64 `json:"newCount"` // 新增数
AndroidAddCount int64 `json:"androidAddCount"` // android新增
IosAddCount int64 `json:"iosAddCount"` // ios新增
H5AddCount int64 `json:"h5AddCount"` // H5新增
RechargetCount int64 `json:"rechageCount"` // 充值订单
RechargetMoney int64 `json:"rechageMoney"` // 充值金额
AccessCount int64 `json:"accessCount"` // 访问量
AndroidAccessCount int64 `json:"androidAccessCount"` // android访问量
IosAccessCount int64 `json:"iosAccessCount"` // ios访问量
LandpageAndroidClick int64 `json:"landpageAndroidClick"` // 落地页android访问次数
LandpageIosAppstoreClick int64 `json:"landpageIosAppstoreClick"` // 落地页iOS商店包访问次数
LandpageIosAthorClick int64 `json:"landpageIosAthorClick"` // 落地页iOS其他包访问次数
LandpageIosH5Click int64 `json:"landpageIosH5Click"` // 落地页H5访问次数
LightGuestAddCount int64 `json:"lightGuestAddCount"` // 轻量版新增
}
type ListHourStatLineReq struct {
SumDate *time.Time `form:"sumDate" json:"sumDate" binding:"required"` // 请求日的零点时间
CompareTime *time.Time `form:"compareTime" json:"compareTime"` // 对比时间
AppId *int32 `form:"appId" json:"appId" binding:"required"` // 应用id
}
type ListHourStatLineResp struct {
AppInfo AppInfoRes `json:"appInfo"` // app信息
TodayGraphList []ListHourStatLineInfo `json:"todayGraphList"` // 今日曲线图数据
YesterdayGraphList []ListHourStatLineInfo `json:"yesterdayGraphList"` // 昨日曲线图数据
}
type ListHourStatLineInfo struct {
SumDate time.Time `json:"sumDate"` // 记录时间,当日零点时间
HourNew int64 `json:"hourNew" bson:"hourNew"` // 新增
HourNewDistrict int64 `json:"hourNewDistrict" bson:"hourNewDistrict"` // 渠道新增
HourNewWeb int64 `json:"hourNewWeb" bson:"hourNewWeb"` // 官网新增
HourNewNormal int64 `json:"hourNewNormal" bson:"hourNewNormal"` // 自来量新增
HourAndroidNew int64 `json:"hourAndroidNew" bson:"hourAndroidNew"` // android新增
HourIosNew int64 `json:"hourIosNew" bson:"hourIosNew"` // Ios新增
HourH5New int64 `json:"hourH5New" bson:"hourH5New"` // H5新增
HourH5PcNew int64 `json:"hourH5PcNew" bson:"hourH5PcNew"` // H5Pc新增
HourH5IosNew int64 `json:"hourH5IosNew" bson:"hourH5IosNew"` // H5Ios新增
HourH5AndroidNew int64 `json:"hourH5AndroidNew" bson:"hourH5AndroidNew"` // H5Android新增
////////
HourDistrictRecharge int64 `json:"hourDistrictRecharge" bson:"hourDistrictRecharge"` // 渠道充值
HourWebRecharge int64 `json:"hourWebRecharge" bson:"hourWebRecharge"` // 官网充值
HourNormalRecharge int64 `json:"hourNormalRecharge" bson:"hourNormalRecharge"` // 自来量充值
HourVipRecharge int64 `json:"hourVipRecharge" bson:"hourVipRecharge"` // VIP充值
HourDistrictVip int64 `json:"hourDistrictVip" bson:"hourDistrictVip"` // 渠道VIP充值
HourWebVip int64 `json:"hourWebVip" bson:"hourWeVip"` // 官网VIP充值
HourNormalVip int64 `json:"hourNormalVip" bson:"hourNormalVip"` // 自来量VIP充值
HourAndroidRecharge int64 `json:"hourAndroidRecharge" bson:"hourAndroidRecharge"` // android充值
HourIosRecharge int64 `json:"hourIosRecharge" bson:"hourIosRecharge"` // Ios充值
HourH5Recharge int64 `json:"HourH5Recharge" bson:"HourH5Recharge"` // H5充值
HourH5PcRecharge int64 `json:"hourH5PcRecharge" bson:"hourH5PcRecharge"` // H5Pc充值
HourH5IosRecharge int64 `json:"hourH5IosRecharge" bson:"hourH5IosRecharge"` // H5Ios充值
HourH5AndroidRecharge int64 `json:"hourH5AndroidRecharge" bson:"hourH5AndroidRecharge"` // H5Android充值
}
+46
View File
@@ -0,0 +1,46 @@
package proto
import (
"stat/common/statutils"
"stat/models/monitormod"
"time"
)
type MonitorSearch struct {
Name *string `json:"name" bson:"name"` // 分类名称
AppId *int32 `json:"appId" bson:"appId"` // appId
Status *bool `json:"status" bson:"status"` // 是否启用
Device *statutils.DeviceName `json:"device" bson:"device"` // 设备类型
Category *monitormod.MonitorCategory `json:"category" bson:"category"` // 监控分类
PageNum int64 `json:"pageNum"`
PageSize int64 `json:"pageSize"`
}
type MonitorSearchResp struct {
Total int64 `json:"total"`
List monitormod.MonitorList `json:"list"`
}
type MonitorUpdate struct {
Name *string `json:"name" bson:"name,omitempty"` // 分类名称
AppId *int32 `bson:"appId" json:"appId,omitempty"` // appId
Status *bool `json:"status" bson:"status,omitempty"` // 是否启用
Category *monitormod.MonitorCategory `bson:"category" json:"category"` // 分类
Device *statutils.DeviceName `bson:"device" json:"device"` // 设备
Duration *int64 `bson:"duration" json:"duration"` // 时间段,单位分钟
Compare *monitormod.Compare `bson:"compare" json:"compare"` // 比较
Threshold *int64 `bson:"threshold" json:"threshold"` // 阀值
Comment *string `bson:"comment" json:"comment"` // 注释
UpdatedAt *time.Time `json:"updatedAt" bson:"updatedAt,omitempty"` // 更新时间
}
type MonitorUpdateReq struct {
Id string `json:"id" binding:"required"`
Param *MonitorUpdate `json:"param" binding:"required"` // 参数
}
type MonitorAddReq struct {
monitormod.Monitor
}
type MonitorDelReq struct {
Id string `json:"id"`
}
+26
View File
@@ -0,0 +1,26 @@
package proto
import (
"stat/common"
"time"
)
type ListOpLogReq struct {
Operator *string `form:"operator" json:"operator" binding:"omitempty"` // 操作人员
IsAdmin *bool `form:"isAdmin" json:"isAdmin" binding:"omitempty"` // 是否是管理员 true: 管理员 false: 代理商
Router *string `form:"router" json:"router" binding:"omitempty"` // 路由
common.Page
}
type ListOpLogRes struct {
Total int64 `json:"total"`
List []OpLogInfo `json:"list"`
}
type OpLogInfo struct {
Operator string `json:"operator"` // 操作人员
Router string `json:"router"` // 接口路由
Data string `json:"data"` // 操作数据
IsAdmin bool `json:"isAdmin"` // 是否是管理员
CreatedAt time.Time `json:"createdAt"` // 创建时间
}
+82
View File
@@ -0,0 +1,82 @@
package proto
import "time"
type ChannelAuthReq struct {
SharePassword string `json:"sharePassword" form:"sharePassword" binding:"required"`
AppId int32 `json:"appId" form:"appId" binding:"required"`
ChannelId string `json:"channelId" form:"channelId" binding:"required"`
}
type ChannelInfoReq struct {
AppId int32 `json:"appId" form:"appId" binding:"required"`
ChannelId string `json:"channelId" form:"channelId" binding:"required"`
}
type ChannelInfoResp struct {
Platform string `json:"platform" form:"platform"`
AppIcon string `json:"appIcon" form:"appIcon"`
AppName string `json:"appName" form:"appName"`
ChannelCode string `json:"channelCode" form:"channelCode"`
ChannelName string `json:"channelName" form:"channelName"`
}
type OpenInstallReq struct {
AppId int32 `json:"appId" form:"appId" binding:"required"`
ChannelId string `json:"channelId" form:"channelId" binding:"required"`
StartTime time.Time `json:"startTime" form:"startTime" time_format:"2006/01/02"`
EndTime time.Time `json:"endTime" form:"endTime" time_format:"2006/01/02"`
}
type GrowthData struct {
// Day1 []int64 `json:"1日后留存数"`
// Day7 []int64 `json:"7日后留存数"`
// Day30 []int64 `json:"30日后留存数"`
Installation []int64 `json:"安装量"`
Exposure []int64 `json:"曝光量"`
Register []int64 `json:"注册量"`
Click []int64 `json:"点击量"`
}
type GrowthResp struct {
Time []time.Time `json:"time" form:"time"`
Data GrowthData `json:"data" form:"data"`
}
type TotalData struct {
// Day1 int64 `json:"平均1日后留存率"`
// Day7 int64 `json:"平均7日后留存率"`
// Day30 int64 `json:"平均30日后留存率"`
Installation int64 `json:"安装量"`
Exposure int64 `json:"曝光量"`
Click int64 `json:"点击量"`
Register int64 `json:"注册量"`
}
type TotalResp struct {
Installation int64 `json:"安装量"`
Exposure int64 `json:"曝光量"`
Click int64 `json:"点击量"`
Register int64 `json:"注册量"`
Active int64 `json:"访问量"`
Recharge int64 `json:"充值"`
}
type ActiveData struct {
Active []int64 `json:"活跃用户数"`
}
type ActiveResp struct {
Time []time.Time `json:"time" form:"time"`
Data ActiveData `json:"data" form:"data"`
}
type AllStatsData struct {
Recharge []int64 `json:"充值金额"`
// .........
}
type AllStatsResp struct {
Time []time.Time `json:"time" form:"time"`
Data AllStatsData `json:"data" form:"data"`
}
+39
View File
@@ -0,0 +1,39 @@
package proto
import (
"go.mongodb.org/mongo-driver/bson/primitive"
"stat/common"
"stat/models/botdailyhourstat"
"time"
)
type BotDailyHourListReq struct {
common.Page
SumDateStart time.Time `json:"sumDateStart" binding:"required"`
SumDateStop time.Time `json:"sumDateStop" binding:"required"`
AppId *int32 `json:"appId"`
}
type BotDailyHourListResp struct {
Total int64 `json:"total"`
List botdailyhourstat.BotHourStatList `json:"list"`
}
type BotMonthStatReq struct {
Month time.Time `json:"month" binding:"required"` // 只关注这个日期的年月
AppId *int32 `json:"appId"` // 如果AppId为空,则计算所有APP
}
type BotMonthStatResp struct {
List botdailyhourstat.BotHourStatList `json:"list"`
}
type BotDailyHourOneReq struct {
Id primitive.ObjectID `json:"id" binding:"required"`
SumDate time.Time `json:"sumDate"`
AppId int32 `json:"appId"`
}
type BotDailyHourOneResp struct {
Stat *botdailyhourstat.BotHourStat `json:"stat"`
}
+55
View File
@@ -0,0 +1,55 @@
package proto
import (
"stat/models/tfpackagemod"
"time"
"go.mongodb.org/mongo-driver/bson/primitive"
)
type AddTFReq struct {
AppId int32 `json:"appId" binding:"required"` // appID
DownloadUrl string `json:"downloadUrl" binding:"required"` // 下载链接
DayMaxDownloadNum int64 `json:"dayMaxDownloadNum" binding:"required"` // 当天设置最大下载数量
HourMaxDownloadNum int64 `json:"hourMaxDownloadNum" binding:"required"` // 每小时设置最大下载数量
Status tfpackagemod.TFStatus `json:"status"` // 状态;0未使用,1下架,2上架
}
type DelTFReq struct {
Id primitive.ObjectID `json:"id"` //
}
type UpdateTFReq struct {
Id primitive.ObjectID `json:"id"` //
AppId *int32 `json:"appId"` // appID
DownloadUrl *string `json:"downloadUrl"` // 下载链接
DayMaxDownloadNum *int64 `json:"dayMaxDownloadNum"` // 当天设置最大下载数量
HourMaxDownloadNum *int64 `json:"hourMaxDownloadNum"` // 每小时设置最大下载数量
Status *tfpackagemod.TFStatus `json:"status"` // 状态;0未使用,1下架,2上架
}
type GetTFReq struct {
AppId *int32 `json:"appId"` // appID
Status *tfpackagemod.TFStatus `json:"status"`
PageNum int64 `json:"pageNum"`
PageSize int64 `json:"pageSize"`
}
type GetTFResp struct {
Total int64 `json:"total"`
tfpackagemod.TfPackageList
}
// 缓存
type TfCacheInfo struct {
Id primitive.ObjectID `json:"id"` //
AppId int32 `json:"appId"` // appID
DownloadUrl string `json:"downloadUrl"`
DayMaxDownloadNum int64 `json:"dayMaxDownloadNum"` // 当天设置最大下载数量
HourMaxDownloadNum int64 `json:"hourMaxDownloadNum"` // 每小时设置最大下载数量
DayDownloadedNum int64 `bson:"dayDownloadedNum" json:"dayDownloadedNum"` // 当天已经下载数量
HourDLNum int64 `bson:"hourDlNum" json:"hourDlNum"` // 每小时实际下载数量
LastDownloadTime time.Time `json:"lastDownload"` // 上一次下载时间
CountDownloadNum int64 `bson:"countDownloadNum" json:"countDownloadNum"` // 总已经下载数量
Status tfpackagemod.TFStatus `json:"status"` // 状态;0未使用,1下架,2上架
}
+159
View File
@@ -0,0 +1,159 @@
package proto
import (
"stat/common"
"time"
)
// 全民代理查询
type UserInviteUserListReq struct {
PageNumber int64 `form:"pageNumber" json:"pageNumber" binding:"required,min=1"` // 当前页
PageSize int64 `form:"pageSize" json:"pageSize" binding:"required,min=1,max=50"` // 每页条数
UserId uint64 `form:"userId" json:"userId" binding:"required"` // 用户ID
Appid int32 `form:"appId" json:"appId" binding:"required"` // APPID
}
type UserInviteUserListRes struct {
Total int64 `json:"total"`
BindUser int64 `json:"bindUser"`
List []UserInviteUserInfo `json:"list"`
}
type UserInviteUserInfo struct {
UserId uint64 `json:"userId"`
Name string `json:"name"`
BindPhone string `json:"bindPhone"` // true 绑定
CreateAt time.Time `json:"createAt"` // 注册时间
}
type UserInviteIncomeListReq struct {
PageNumber int64 `form:"pageNumber" json:"pageNumber" binding:"required,min=1"` // 当前页
PageSize int64 `form:"pageSize" json:"pageSize" binding:"required,min=1,max=50"` // 每页条数
UserId uint64 `form:"userId" json:"userId" binding:"required"` // 用户ID
Appid int32 `form:"appId" json:"appId" binding:"required"` // APPID
}
type UserInviteIncomeListRes struct {
TotalInvites int64 `json:"totalInvites"`
TodayInvites int64 `json:"todayInvites"`
// YesterdayInvites int64 `json:"yesterdayInvites"`
// MouthInvites int64 `json:"mouthInvites"`
TotalInviteAmount int64 `json:"totalInviteAmount"`
TodayInviteAmount int64 `json:"todayInviteAmount"`
Total int64 `json:"total"`
List []UserInviteIncomeInfo `json:"list"`
}
type UserInviteIncomeInfo struct {
UserId uint64 `json:"userId"` // 充值用户
UserName string `json:"userName"` // 用户名称
IncomeAmount int64 `json:"incomeAmount"` // 收入金币
IncomeRate float64 `json:"incomeRate"` // 分成比例
RechargeAt time.Time `json:"rechargeAt"` // 充值时间
}
type UserInviteInfoReq struct {
PageNumber int64 `form:"pageNumber" json:"pageNumber" binding:"required,min=1"` // 当前页
PageSize int64 `form:"pageSize" json:"pageSize" binding:"required,min=1,max=50"` // 每页条数
UserId uint64 `form:"userId" json:"userId" binding:"required"` // 用户ID
Appid int32 `form:"appId" json:"appId" binding:"required"` // APPID
}
type UserDistrictReq struct {
AppId int32 `form:"appId" json:"appId" binding:"required"` // APPID
DistrictCode string `json:"dc"` // 剪切板信息 dc(渠道)
PromSeqe string `json:"pc"` // 剪切板信息 pc(代理)
IP string `json:"ip"` // IP信息
SysType string `json:"sysType"` // 操作系统类型 安卓 IOS
}
type UserDistrictCodeReq struct {
AppId int32 `form:"appId" json:"appId" binding:"required"` // AppId
UserIds []uint64 `form:"userIds" json:"userIds" binding:"required"` // 用户ID
}
type UserDistrictCodeInfo struct {
UserId uint64 `form:"userId" json:"userId" binding:"required"` // 用户ID
DistrictCode string `json:"districtCode" bson:"districtCode"` // 渠道码(兼容天宇老业务,查询本地(log_register)失败使用)
RegisterTime time.Time `json:"registerTime,omitempty" bson:"registerTime"` // 注册时间
}
type UserDistrictCodeResp struct {
UserList []UserDistrictCodeInfo `form:"userList" json:"userList" binding:"required"` // 用户列表
}
type UserDistrictInfo struct {
IsDirect bool `json:"isDirect"` // 是否是直推
DistrictCode string `json:"districtCode"` // 渠道码
ParentPromCode string `json:"parentPromCode"` // 全民代理 上级用户推广码
ParentId uint64 `json:"parentId"` // 全名代理 上级用户
ParentInviteCount int64 `json:"parentInviteCount"` // 全名代理 上级用户下级用户
}
type ListUserInviteReq struct {
AppId *int32 `form:"appId" json:"appId" binding:"omitempty"` // appId
UserId *uint64 `form:"userId" json:"userId" binding:"omitempty"` // 渠道
UserName *string `form:"userName" json:"userName" binding:"omitempty"` // 用户名称
Remark *string `form:"remark" json:"remark" binding:"omitempty"` // 备注
common.Page
}
type ListUserInviteRes struct {
Total int64 `json:"total"`
TodayInviteUser int64 `json:"todayInviteUser"` // 今日新增人数
YesterdayInviteUser int64 `json:"yesterdayInviteUser"` // 昨日新增人数
TodayRechargeAmount int64 `json:"todayRechargeAmount"` // 今日充值金额
YesterdayRechargeAmount int64 `json:"yesterdayRechargeAmount"` // 昨日充值金额
List []ListUserInviteInfo `json:"list"`
}
type ListUserInviteInfo struct {
UserId uint64 `json:"userId" bson:"userId"` // 用户ID
AppId int32 `json:"appId" bson:"appId"` // appID
AppName string `json:"appName"` // app名称
UserName string `json:"userName"` // 用户名称
PromCode string `json:"promCode" bson:"promCode"` // 用户推广序列
BalanceCent int64 `json:"balance"` // 累计充值单位:分
BalanceIncome int64 `json:"balanceIncome"` // 累计收益:分
DeductionBalanceCent int64 `json:"deductionBalanceCent"` // 累计扣量单位:分
InviteUser int64 `json:"inviteUser"` // 推广总人数
TodayInviteUser int64 `json:"todayInviteUser"` // 今日推广人数 (定时器每天0)
DeductionRatio float64 `json:"deductionRatio"` // 扣量比例 0.0-1.00 默认:0.2
DeductionLowerOutset int64 `json:"deductionLowerOutset" ` // 扣量起点 默认:2000元开始扣
CreatedAt time.Time `json:"createdAt"` // 创建时间
}
type UpdateUserInviteInfo struct {
UserId uint64 `json:"userId" bson:"userId" binding:"required"` // 用户ID
AppId int32 `json:"appId" bson:"appId" binding:"required"` // appID
DeductionRatio float64 `json:"deductionRatio" binding:"required"` // 扣量比例 0.0-1.00 默认:0.2
DeductionLowerOutset int64 `json:"deductionLowerOutset" binding:"required"` // 扣量起点 默认:2000元开始扣
Remark string `json:"remark"` // 备注
}
type ListUserInviteOrderReq struct {
AppId *int32 `form:"appId" json:"appId" binding:"omitempty"` // appId
UserId *uint64 `form:"userId" json:"userId" binding:"omitempty"` // 渠道
IsDeduction *bool `json:"isDeduction" bson:"isDeduction" binding:"omitempty"` // 是否是扣量订单
OrderId *string `json:"orderId" bson:"orderId" binding:"omitempty"` // 流水id
StartTime *time.Time `form:"startTime" json:"startTime" binding:"omitempty"` // 开始时间
EndTime *time.Time `form:"endTime" json:"endTime" binding:"omitempty"` // 结束时间
common.Page
}
type ListUserInviteOrderRes struct {
Total int64 `json:"total"`
List []ListUserInviteOrder `json:"list"`
}
type ListUserInviteOrder struct {
UserId uint64 `json:"userId" bson:"userId"` // 用户ID
UserName string `json:"userName" bson:"userName"` // 用户名称
AppId int32 `json:"appId" bson:"appId"` // appID
AppName string `json:"appName"` // app名称
InvitedUserId uint64 `json:"invitedUserId" bson:"invitedUserId"` // 充值用户
PromCode string `json:"promCode" bson:"promCode"` // 用户推广序列
IsDeduction bool `json:"isDeduction" bson:"isDeduction"` // 是否是扣量订单
OrderId string `json:"orderId" bson:"orderId"` // 流水id
Money int64 `json:"money" bson:"money"` // 充值金额 订单金额
PayMoney int64 `json:"payMoney" bson:"payMoney"` // 实际到账金额 用户实际支付金额
IncomeAmount int64 `json:"incomeAmount" bson:"incomeAmount"` // 收入金币
IncomeRate float64 `json:"incomeRate" bson:"incomeRate"` // 分成比例
CallBack int `json:"callBack" bson:"callBack"` // 回调成功
}
+188
View File
@@ -0,0 +1,188 @@
package proto
import (
"stat/common"
"stat/models/versionMod"
)
// VersionInfo 版本信息
type VersionInfo struct {
Id int64 `from:"_id" json:"id"` // ID
AppId int32 `from:"appId" json:"appId"` //APPID
AppName string `from:"appname" json:"appname"` //APP名称
VersionNum string `from:"versionNum" json:"versionNum"` //版本号
Terminal string `from:"terminal" json:"terminal"` //终端ios android
Link []string `from:"link" json:"link"` //下载链接
Info string `from:"info" json:"info"` //版本描述
PackageType versionMod.PkgType `from:"packageType" json:"packageType"` //包类型:1-企业包、2-商店包、3-tf、4-超级签
IsForceUpdate bool `from:"isForceUpdate" json:"isForceUpdate"` //是否强更
MinVersion string `from:"minVersion" json:"minVersion"` //最小版本
Status bool `from:"status" json:"status"` //是否启用
Size string `from:"size" json:"size"` //更新版本大小M
BackLink string `from:"backLink" json:"backLink"` //企业签(备用连接)
Md5 string `from:"md5" json:"md5"` //MD5验证
}
type VersionListReq struct {
AppId *int32 `from:"appId" json:"appId"` //APPID
common.Page
}
type VersionListResp struct {
Count int64 `json:"count" ` //总条数
Data []*VersionInfo `json:"data" ` //数据
}
type VersionDelReq struct {
Id int64 `from:"id" json:"id" binding:"required"` //版本ID
}
type VersionAddReq struct {
AppId int32 `from:"appId" json:"appId" binding:"required"` //APPID
VersionNum string `from:"versionNum" json:"versionNum" binding:"required"` //版本号
Terminal string `from:"terminal" json:"terminal" binding:"required" ` //终端 ios android(安卓,苹果下拉框选择)
Link []string `from:"link" json:"link" binding:"required"` //下载链接
Info string `from:"info" json:"info" binding:"omitempty"` //版本描述
PackageType versionMod.PkgType `from:"packageType" json:"packageType" binding:"required"` //包类型:1-企业包、2-商店包、3-tf包(下拉框)
IsForceUpdate bool `from:"isForceUpdate" json:"isForceUpdate" binding:"omitempty"` //是否强更
MinVersion string `from:"minVersion" json:"minVersion" binding:"omitempty"` //最小版本
Status bool `from:"status" json:"status"` //是否启用
Size string `from:"size" json:"size" binding:"omitempty" ` //更新版本大小M
BackLink string `from:"backLink" json:"backLink" binding:"omitempty"` //企业签
Md5 string `from:"md5" json:"md5" binding:"omitempty"` //MD5验证
}
type VersionUpdateReq struct {
Id int64 `from:"_id" json:"id" binding:"required"` // ID
AppId *int32 `from:"appId" json:"appId" binding:"omitempty"` //APPID
VersionNum *string `from:"versionNum" json:"versionNum" binding:"omitempty"` //版本号
Terminal *string `from:"terminal" json:"terminal" binding:"omitempty"` //终端ios android
Link *[]string `from:"link" json:"link" binding:"omitempty"` //下载链接
Info *string `from:"info" json:"info" binding:"omitempty"` //版本描述
PackageType *versionMod.PkgType `from:"packageType" json:"packageType" binding:"omitempty"` //包类型:1-企业包、2-商店包、3-tf
IsForceUpdate *bool `from:"isForceUpdate" json:"isForceUpdate" binding:"omitempty"` //是否强更
MinVersion *string `from:"minVersion" json:"minVersion" binding:"omitempty"` //最小版本
Status *bool `from:"status" json:"status" binding:"omitempty"` //是否启用
BackLink *string `from:"backLink" json:"backLink" binding:"omitempty"` //企业签
Size *string `from:"size" json:"size" binding:"omitempty"` //更新版本大小M
Md5 *string `from:"md5" json:"md5" binding:"omitempty"` //MD5验证
}
// 点击按钮(上报客户端IP信息和渠道信息)
type PageButtonClickReq struct {
AppId int32 `json:"appId"` //AppID
Ip string `from:"ip" json:"ip"` //ip
Channel string `from:"channel" json:"channel"` //渠道(json字符串)
Domain string `from:"domain" json:"domain"` //落地页域名
PackageType versionMod.PkgType `from:"packageType" json:"packageType"` //包类型 1:企业包 2:商店包 3:TF包 4:超级签 5:轻量版
Terminal string `from:"terminal" json:"terminal" binding:"required"` //终端ios android
}
type TfInfo struct {
AppName string `bson:"appName" json:"appName"` //应用名称
AppIcon string `bson:"appIcon" json:"appIcon"` //应用图标
URL string `bson:"url" json:"url"` //URL
BackUrl string `bson:"backUrl" json:"BackUrl"` //企业签URL
}
// 返回下载链接
type PageButtonClickResp struct {
VersionNum string `from:"versionNum" json:"versionNum"` //版本号
Terminal string `from:"terminal" json:"terminal"` //终端ios android light
Link []string `from:"link" json:"link"` //下载链接
Tf []TfInfo `from:"tf" json:"tf"` //TFinfo
BackUrl string `bson:"backUrl" json:"BackUrl"` //企业签URL (不用)
PackageType versionMod.PkgType `from:"packageType" json:"packageType" binding:"required"` //包类型 1:企业包 2:商店包 3:TF包
Status bool `from:"status" json:"status"` //是否启用
LightData []byte `from:"lightData" json:"lightData"` //如果是轻量版,返回数据
}
// 落地页获取显示的按钮信息(appid标示具体应用)
type PageButtonListReq struct {
AppId int32 `from:"appId" json:"appId"` //AppID
Ip string `from:"ip" json:"ip"` //ip
Domain string `from:"domain" json:"domain"` //落地页域名
Channel string `from:"channel" json:"channel"` //渠道(json字符串)
}
// 落地页获取显示的按钮信息
type PageButtonListResp struct {
IosDown bool `json:"iosDown"` // 显示完整版,是企业包
IosStore bool `json:"iosStore"` // 显示商店包
IosTF bool `json:"iosTF"` // TF包
IosH5 bool `json:"iosH5"` // H5跳转链接
IosLink string `json:"iosLink"` // 商店包下载链接
AndroidButton int `json:"androidButton"` // android下载按钮
HasChannelApk bool `json:"hasChannelApk"` // 有安卓渠道包
PictureList []PageButtonPicture `json:"pictureList"` // 资源数据
Contact ContactInfo `json:"contact"` // 联系方式
}
type PageButtonPicture struct {
PcAvatar string `json:"pcAvatar" bson:"pcAvatar"` // PC端图片
MobileAvatar string `json:"mobileAvatar" bson:"mobileAvatar"` // 移动端图片
PcBackgroud string `json:"pcBackgroud" bson:"pcBackgroud"` // PC端背景图
MobileBackgroud string `json:"mobileBackgroud" bson:"mobileBackgroud"` // 移动端背景图
Music string `json:"music" bson:"music"` // 音频文件
PcTitle string `json:"pcTitle" bson:"pcTitle"` // PC端标语
MobileTiltle string `json:"mobileTiltle" bson:"mobileTiltle"` // 移动端标语
}
type ContactInfo struct {
Telegram string `json:"telegram" bson:"telegram"` // PC端图片
Paoto string `json:"paoto" bson:"paoto"` // 土豆
Madou string `json:"madou" bson:"madou"` // 官网
}
type PacketType int32
const (
PacketTypeEnterprise PacketType = 1 // 企业签
PacketTypeShop PacketType = 2 // 商店包
PacketTypeTestFlight PacketType = 3 // TF包
)
type AppVersionReq struct {
AppId int32 `json:"appId" binding:"required"` // AppID
SysType string `json:"sysType,omitempty"` // 终端类型
PktType PacketType `json:"pktType,omitempty"` // 包类型
CurVersion string `json:"curVersion,omitempty"` // 当前版本
CurPackageName string `json:"curPackageName,omitempty"` // 包名
}
type AppVersionResp struct {
HasNewVersion bool `json:"hasNewVersion,omitempty"` // 是否存在新版本
ServerVersion string `json:"serverVersion,omitempty"` // 服务器新版本
DownloadLink []string `json:"downloadLink,omitempty"` // 下载地址
Description string `json:"description,omitempty"` // 描述
IsForceUpdate bool `json:"isForceUpdate,omitempty"` // 是否强制升级
}
type ShareUrlReq struct {
AppId int32 `from:"appid" json:"appid"` // AppID
}
// 落地页获取显示的按钮信息
type ShareUrlResp struct {
Url []string `form:"url" json:"url"` // 分享地址
}
type ChannelDownLoadLinkReq struct {
AppId int32 `form:"appId" json:"appId"` // AppID
Channel string `form:"channel" json:"channel"` // 商区渠道号
}
type ChannelDownLoadLinkResp struct {
DownLoadLink string `json:"downLoadLink"` // 下载链接
CmdInfo string `json:"cmdInfo"` // 下载链接
}
type H5ConfigReq struct {
AppId int32 `form:"appId" json:"appId"` // AppID
DC string `form:"dc" json:"dc"` // 商区渠道号
PC string `form:"pc" json:"pc"` // 用户渠道号,即用户邀请码
Domain string `from:"domain" json:"domain"` // 落地页域名
}
type H5ConfigV2Resp struct {
URL string `form:"url" json:"url"` // 描述文件链接
}
+98
View File
@@ -0,0 +1,98 @@
package proto
import (
"stat/common"
"time"
)
// 请求转账订单
type ListWithdrawOrderReq struct {
Channel *string `form:"channel" json:"channel" binding:"omitempty"` // 筛选条件 过滤条件-渠道
Status *int `form:"status" json:"status" binding:"omitempty"` // 筛选条件 1未审核 2审核通过,转账中 3已拒绝 4未知错误 5提现成功 6提现失败
Act *string `form:"act" json:"act" binding:"omitempty"` // 筛选条件 交易账户
AppId *int32 `form:"appId" json:"appId" binding:"omitempty"` // 筛选条件 APP
OID *string `form:"oid" json:"oid" binding:"omitempty"` // 筛选条件 第三方支付平台id
PayType *string `form:"payType" json:"payType" binding:"omitempty"` // 筛选条件 提现方式,alipay,bankcard,usdt
TimeFilter *int64 `form:"timeFilter" json:"timeFilter" binding:"omitempty"` // 时间过滤类型 1:提现申请时间 2:第三方支付时间 3:第三方回调成功时间
StartTime *time.Time `form:"startTime" json:"startTime" binding:"omitempty"` // 筛选条件 过滤条件-开始时间
EndTime *time.Time `form:"endTime" json:"endTime" binding:"omitempty"` // 筛选条件 过滤条件-结束时间
DistrictRemark *string `form:"districtRemark" json:"districtRemark" binding:"omitempty"` // 备注过滤
common.Page
}
// 转账订单结果
type ListWithdrawOrderRes struct {
Total int64 `json:"total"`
List []WithdrawOrderInfo `json:"list"`
}
// 提现订单信息
type WithdrawOrderInfo struct {
ID string `json:"id"` //流水id
Channel string `json:"channel" ` //渠道
AppId int32 `json:"appId"` //应用名称
AppName string `json:"appName"` //应用名称
OID string `json:"oid" ` //第三方支付平台id
Money int64 `json:"money"` //提现金额
PayMoney int64 `json:"payMoney" ` //实际到账
PayType string `json:"payType"` //提现方式,alipay,bankcard
ActName string `json:"actName" ` //交易账户持有人
Act string `json:"act" ` //交易账户
Status int `json:"status" ` //1未审核 2审核通过,转账中 3已拒绝 4未知错误 5提现成功 6提现失败
StatusDesc string `json:"statusDesc" ` //状态说明
CheckedAt time.Time `json:"checkedAt" ` //审核时间
ProgressAt time.Time `json:"progressAt" ` //第三方下单成功时间
FailureAt *time.Time `json:"failureAt,omitempty" ` //回调失败时间
SuccessAt *time.Time `json:"successAt,omitempty" ` //回调成功时间
UpdatedAt time.Time `json:"updatedAt" ` //刷新时间
CreatedAt time.Time `json:"createdAt" ` //提现申请时间
ReceivedAt time.Time `json:"receivedAt" ` //到账时间
Operator string `json:"operator"` //操作人员
DistrictRemark string `json:"districtRemark" ` //备注
}
// 代理商请求转账订单
type ListWithdrawOrderAgentReq struct {
Status *int `form:"status" json:"status" binding:"omitempty"` // 筛选条件 1未审核 2审核通过,转账中 3已拒绝 4未知错误 5提现成功 6提现失败
Act *string `form:"act" json:"act" binding:"omitempty"` // 筛选条件 交易账户
OID *string `form:"oid" json:"oid" binding:"omitempty"` // 筛选条件 第三方支付平台id
PayType *string `form:"payType" json:"payType" binding:"omitempty"` // 筛选条件 提现方式,alipay,bankcard
StartTime *time.Time `form:"startTime" json:"startTime" binding:"omitempty"` // 筛选条件 过滤条件-开始时间
EndTime *time.Time `form:"endTime" json:"endTime" binding:"omitempty"` // 筛选条件 过滤条件-结束时间
common.Page
}
// 导出提现订单请求
type ExportWithdrawOrderReq struct {
Channel *string `form:"channel" json:"channel" binding:"omitempty"` // 筛选条件 过滤条件-渠道
Status *int `form:"status" json:"status" binding:"omitempty"` // 筛选条件 1未审核 2审核通过,转账中 3已拒绝 4未知错误 5提现成功 6提现失败
Act *string `form:"act" json:"act" binding:"omitempty"` // 筛选条件 交易账户
OID *string `form:"oid" json:"oid" binding:"omitempty"` // 筛选条件 第三方支付平台id
PayType *string `form:"payType" json:"payType" binding:"omitempty"` // 筛选条件 提现方式,alipay,bankcard
TimeFilter *int64 `form:"timeFilter" json:"timeFilter" binding:"omitempty"` // 时间过滤类型 1:提现申请时间 2:第三方支付时间 3:第三方回调成功时间
StartTime *time.Time `form:"startTime" json:"startTime" binding:"omitempty"` // 筛选条件 过滤条件-开始时间
EndTime *time.Time `form:"endTime" json:"endTime" binding:"omitempty"` // 筛选条件 过滤条件-结束时间
}
// 提现订单信息
type WithdrawOrderExportInfo struct {
ID string `json:"id"` //流水id
Channel string `json:"channel" ` //渠道
AppName string `json:"appName"` //应用列表
OID string `json:"oid" ` //第三方支付平台id
Money int64 `json:"money"` //提现金额
PayMoney int64 `json:"payMoney" ` //实际到账
PayType string `json:"payType"` //提现方式,alipay,bankcard
ActName string `json:"actName" ` //交易账户持有人
Act string `json:"act" ` //交易账户
Status string `json:"status" ` //1未审核 2审核通过,转账中 3已拒绝 4未知错误 5提现成功 6提现失败
StatusDesc string `json:"statusDesc" ` //状态说明
CheckedAt time.Time `json:"checkedAt" ` //审核时间
ProgressAt time.Time `json:"progressAt" ` //第三方下单成功时间
FailureAt *time.Time `json:"failureAt,omitempty" ` //回调失败时间
SuccessAt *time.Time `json:"successAt,omitempty" ` //回调成功时间
UpdatedAt time.Time `json:"updatedAt" ` //刷新时间
CreatedAt time.Time `json:"createdAt" ` //提现申请时间
ReceivedAt time.Time `json:"receivedAt" ` //到账时间
DistrictRemark string `json:"districtRemark" ` //备注
}