forked from all_user/stat_center
204 lines
12 KiB
Go
204 lines
12 KiB
Go
package topicmessage
|
||
|
||
import (
|
||
"time"
|
||
)
|
||
|
||
/* 通信协议,第三版*/
|
||
|
||
// StatcenterSyncReq
|
||
type StatcenterSyncReq struct {
|
||
Job string `json:"job" bson:"job"` // 同步
|
||
UserId uint64 `json:"userId" bson:"userId"` // 用户(注册)
|
||
PlatformId string `json:"platformId" bson:"platformId"` // 原始平台Id(访问)
|
||
SuccessTime time.Time `json:"successTime"` // 成功时间(购买会员、提现、充值)
|
||
MaxSize int64 `json:"maxSize" bson:"maxSize"` // 最大条数
|
||
}
|
||
|
||
type StatcenterSyncResp struct {
|
||
Code int `json:"code"` // 200正常 其他异常
|
||
Msg string `json:"msg"` // 错误消息
|
||
Job string `json:"job" bson:"job"` // 类型
|
||
VisitList []*UserVisitMsg `json:"visitList"` // 日活记录
|
||
RegisterList []*UserRegisterMsg `json:"registerList"` // 注册记录
|
||
WithdrawList []*UserWithdrawMsg `json:"withdrawList"` // 提现记录
|
||
RechargeList []*UserRechargeMsg `json:"rechargeList"` // 充值记录
|
||
VipList []*UserBuyVIPMsg `json:"buyVipList"` // VIP购买记录
|
||
GameRecharge []*UserRechargeMsg `json:"gameRecharge"` // 游戏充值订单
|
||
GameWithdraw []*UserWithdrawMsg `json:"gameWithdraw"` // 游戏提现订单
|
||
GameWater []*UserGameWaterMsg `json:"gameWater"` // 游戏流水
|
||
}
|
||
|
||
// 用户访问消息
|
||
type UserVisitMsg struct {
|
||
UserId uint64 `json:"userId" bson:"userId"` // 用户ID
|
||
PlatformId string `json:"platformId" bson:"platformId"` // 原始平台流水Id
|
||
AppId int32 `json:"appId" bson:"appId"` // appID
|
||
SysType string `json:"sysType" bson:"sysType"` // 操作系统类型 安卓 IOS
|
||
DevType string `json:"devType,omitempty" bson:"devType"` // 设备型号
|
||
IP string `json:"ip,omitempty" bson:"ip"` // IP
|
||
Version string `json:"version,omitempty" bson:"version"` // APP版本号
|
||
DevID string `json:"devID,omitempty" bson:"devID"` // 设备ID
|
||
VisitAt time.Time `json:"visitAt,omitempty" bson:"visitAt"` // 访问时间
|
||
}
|
||
|
||
// 用户用户注册消息
|
||
type UserRegisterMsg struct {
|
||
UserId uint64 `json:"userId" bson:"userId"` // 用户ID
|
||
AppId int32 `json:"appId" bson:"appId"` // appID
|
||
SysType string `json:"sysType" bson:"sysType"` // 操作系统类型 安卓 IOS
|
||
PlatformId string `json:"platformId" bson:"platformId"` // 原始平台流水Id
|
||
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:是直推用户
|
||
DistrictCode string `json:"districtCode" bson:"districtCode" ` // 渠道码
|
||
PromSeqe string `json:"promSeqe" bson:"promSeqe"` // 全名代理
|
||
PromCode string `json:"promCode" bson:"promCode"` // 推广序列
|
||
UserAgent string `json:"userAgent" bson:"userAgent"` // User-Agent识别
|
||
RegisterTime time.Time `json:"registerTime" bson:"registerTime"` // 注册时间时间
|
||
}
|
||
|
||
// 用户充值消息
|
||
type UserRechargeMsg struct {
|
||
UserId uint64 `json:"userId" bson:"userId"` // 用户ID
|
||
AppId int32 `json:"appId" bson:"appId"` // appID
|
||
PlatformId string `json:"platformId" bson:"platformId"` // 原始平台流水Id
|
||
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"` // 充值方式
|
||
Repeat bool `bson:"repeat" json:"repeat"` // 复冲: true 重复充值 false 第一次
|
||
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"` // 2付款失败 3付款成功(目前只有成功才发送)
|
||
Rate string `json:"rate"` // 渠道费率
|
||
SyncStatus int64 `json:"syncStatus" bson:"syncStatus"` // 同步大白鲨:0 需要同步 1:不需要同步
|
||
SuccessAt time.Time `json:"successAt" bson:"successAt"` // 成功时间
|
||
CreatedAt time.Time `json:"createdAt" bson:"createdAt"` // 创建时间
|
||
}
|
||
|
||
// 用户提现接口
|
||
type UserWithdrawMsg struct {
|
||
AppId int32 `json:"appId" bson:"appId"` //appID
|
||
UID uint64 `json:"uid" bson:"uid"` //用户id
|
||
PlatformId string `json:"platformId" bson:"platformId"` //原始平台流水Id
|
||
Name string `json:"name" bson:"name"` //用户名
|
||
OID string `json:"oid" bson:"oid"` //第三方支付平台id
|
||
Money int64 `json:"money" bson:"money"` //提现金额
|
||
PayMoney int64 `json:"payMoney" bson:"payMoney"` //实际到账
|
||
PayType string `json:"payType" bson:"payType"` //提现方式,alipay,bankcard
|
||
ActName string `json:"actName" bson:"actName"` //交易账户持有人
|
||
Act string `json:"act" bson:"act"` //交易账户
|
||
DeviceType string `json:"deviceType" bson:"deviceType"` //设备类型
|
||
DevID string `json:"devID" bson:"devID"` //设备id
|
||
Status int `json:"status" bson:"status"` //5提现成功
|
||
SuccessAt time.Time `json:"successAt" bson:"successAt"` //回调成功时间
|
||
UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` //刷新时间
|
||
CreatedAt time.Time `json:"createdAt" bson:"createdAt"` //提现申请时间
|
||
IsDirect bool `json:"isDirect" bson:"isDirect"` //true:是直推用户
|
||
DistrictCode string `json:"districtCode" bson:"districtCode"` //渠道码
|
||
SyncStatus int64 `json:"syncStatus" bson:"syncStatus"` // 同步大白鲨:0 需要同步 1:不需要同步
|
||
PayChannel string `json:"payChannel" bson:"payChannel"` //提现渠道
|
||
PromCode string `json:"promCode" bson:"promCode"` //用户推广序列
|
||
}
|
||
|
||
/* 通信协议,第三版*/
|
||
type BuyVIPType int64
|
||
|
||
const (
|
||
BuyVIPTypeMoney BuyVIPType = 0 + iota // 访问
|
||
BuyVIPTypeGold // 金币
|
||
)
|
||
|
||
// 用户购买VIP
|
||
type UserBuyVIPMsg struct {
|
||
AppId int32 `json:"appId" bson:"appId"` //appID
|
||
UID uint64 `json:"uid" bson:"uid"` //用户id
|
||
PlatformId string `json:"platformId" bson:"platformId"` //原始平台流水Id
|
||
Name string `json:"name" bson:"name"` //用户名
|
||
Money int64 `json:"money" bson:"money"` //提现金额
|
||
Amount int64 `json:"amount" bson:"amount"` //金币
|
||
BuyVIPType BuyVIPType `json:"buyVIPType" bson:"buyVIPType"` //支付方式
|
||
OID string `json:"oid" bson:"oid"` //第三方支付平台id
|
||
DeviceType string `json:"deviceType" bson:"deviceType"` //设备类型
|
||
Status int `json:"status" bson:"status"` //1未审核 5提现成功
|
||
SuccessAt time.Time `json:"successTime"` //成功时间(购买会员、提现、充值)
|
||
IsDirect bool `json:"isDirect" bson:"isDirect"` //true:是直推用户
|
||
DistrictCode string `json:"districtCode" bson:"districtCode"` //渠道码
|
||
PromCode string `json:"promCode" bson:"promCode"` //用户推广序列
|
||
}
|
||
|
||
type StatcenterGameReq struct {
|
||
Date time.Time `json:"date" bson:"date"`
|
||
}
|
||
type GetReportStatResp struct {
|
||
Code int `json:"code"` // 200正常 其他异常
|
||
Msg string `json:"msg"` // 错误消息
|
||
Date string `json:"date" bson:"date"`
|
||
GameRchgAmount int64 `json:"gameRchgAmount" bson:"gameRchgAmount"` //充值总金额
|
||
GameDCRchgAmount int64 `json:"gameDCRchgAmount" bson:"gameDCRchgAmount"` //代充总金额
|
||
GameWtdrAmount int64 `json:"gameWtdrAmount" bson:"gameWtdrAmount"` //游戏提现总金额
|
||
GameWtdrRealAmount int64 `json:"gameWtdrRealAmount" bson:"gameWtdrRealAmount"` //游戏实际提现总金额
|
||
GameIncAmount int64 `json:"gameIncAmount" bson:"gameIncAmount"` //游戏上分总金额
|
||
GameDecAmount int64 `json:"gameDecAmount" bson:"gameDecAmount"` //游戏下分总金额
|
||
ValidBet int64 `json:"validBet" bson:"validBet"` //有效投注金额
|
||
Profit int64 `json:"profit" bson:"profit"` //系统盈利
|
||
//游戏成功充值次数
|
||
GameRchgCount int64 `json:"gameRchgCount" bson:"gameRchgCount"`
|
||
//活跃人数
|
||
GamePlayCount int64 `json:"gamePlayCount" bson:"gamePlayCount"`
|
||
//游戏成功充值人数
|
||
GameRchgUsers int64 `json:"gameRchgUsers" bson:"gameRchgUsers"`
|
||
//游戏首次充值总金额
|
||
GameFirstRchgAmount int64 `json:"gameFirstRchgAmount" bson:"gameFirstRchgAmount"`
|
||
//游戏首次成功充值次数
|
||
GameFirstRchgCount int64 `json:"gameFirstRchgCount" bson:"gameFirstRchgCount"`
|
||
//游戏首次成功充值人数
|
||
GameFirstRchgUsers int64 `json:"gameFirstRchgUsers" bson:"gameFirstRchgUsers"`
|
||
//游戏成功代充次数
|
||
GameDCRchgCount int64 `json:"gameDCRchgCount" bson:"gameDCRchgCount"`
|
||
//游戏成功提现次数
|
||
GameWtdrCount int64 `json:"gameWtdrCount" bson:"gameWtdrCount"`
|
||
|
||
//游戏上分次数
|
||
GameInchCount int64 `json:"gameInchCount" bson:"gameInchCount"`
|
||
|
||
//游戏下分次数
|
||
GameDecCount int64 `json:"gameDecCount" bson:"gameDecCount"`
|
||
//游戏6元赠送总金额
|
||
GameGiftIncAmount int64 `json:"gameGiftIncAmount" bson:"gameGiftIncAmount"`
|
||
//游戏6元赠送次数
|
||
GameGiftIncCount int64 `json:"gameGiftIncCount" bson:"gameGiftIncCount"`
|
||
//游戏充值赠送总金额
|
||
GameRchGiftIncAmount int64 `json:"gameRchGiftIncAmount" bson:"gameRchGiftIncAmount"`
|
||
//游戏充值赠送次数
|
||
GameRchGiftIncCount int64 `json:"gameRchGiftIncCount" bson:"gameRchGiftIncCount"`
|
||
//游戏VIP赠送总金额
|
||
GameVipGiftIncAmount int64 `json:"gameVipGiftIncAmount" bson:"gameVipGiftIncAmount"`
|
||
//游戏VIP赠送次数
|
||
GameVipGiftIncCount int64 `json:"gameVipGiftIncCount" bson:"gameVipGiftIncCount"`
|
||
// 游戏抽水
|
||
Revenue int64 `json:"revenue" bson:"revenue"`
|
||
//更新时间
|
||
UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"`
|
||
CreatedAt time.Time `json:"createdAt" bson:"createdAt"` //创建时间
|
||
}
|
||
|
||
// 用户棋牌流水
|
||
type UserGameWaterMsg struct {
|
||
AppId int32 `json:"appId" bson:"appId"` // appID
|
||
UID uint64 `json:"uid" bson:"uid"` // 用户id
|
||
PlatformId string `json:"platformId" bson:"platformId"` // 原始平台流水Id
|
||
Date time.Time `json:"date" bson:"date"` // 日期(2021-04-14)
|
||
ValidBet int64 `bson:"validBet" json:"validBet"` // 有效投注金额vs
|
||
Profit int64 `bson:"profit" json:"profit"` // 系统盈利
|
||
Revenue int64 `bson:"revenue" json:"revenue"` // 游戏抽水
|
||
SuccessAt time.Time `json:"successTime"` // 成功时间(购买会员、提现、充值)
|
||
UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` // 更新时间
|
||
CreatedAt time.Time `json:"createdAt" bson:"createdAt"` // 创建时间
|
||
}
|