删除多余字段

dev_aagame
zhora 1 week ago
parent b5b213f113
commit 0047680a91
  1. 5
      modules/backend/handler/advertisement/advertisement.go
  2. 2
      modules/backend/values/tables.go

@ -287,11 +287,8 @@ func GetOneAD(start, end int64, cids []*int) *values.ADStats {
// 总退出
one.TotalWithdraw = models.GetWithdrawAmountTotalBySQLs(start, end, common.CurrencyINR, cids...)
one.NewRegister = int(models.GetNewPlayerCountBySqls(start, end, cids...))
one.ActiveDevice = int(models.GetDownloadCounts(&start, &end, cids...))
one.NewWithdraw = models.GetNewWithdrawAmount(start, end, cids...)
oldActiveUser := models.GetOldPlayerCountBySqls(start, end, cids...)
one.ActiveUser = one.NewRegister + int(oldActiveUser)
newPayCount := models.GetNewPayCountBySqls(start, end, cids...)
oldPayCount := models.GetOldPayCountBySqls(start, end, cids...)
one.RechargeUser = int(newPayCount + oldPayCount)
@ -374,10 +371,8 @@ func CalTotal(total, one *values.ADStats) {
total.Profit += one.Profit
total.TotalProfit += one.TotalProfit
total.TotalCost += one.TotalCost
total.NewRegister += one.NewRegister
total.ActiveDevice += one.ActiveDevice
total.NewWithdraw += one.NewWithdraw
total.ActiveUser += one.ActiveUser
total.RechargeUser += one.RechargeUser
}

@ -198,10 +198,8 @@ type ADStats struct {
TotalROI string `gorm:"column:total_roi;type:varchar(64);default:'';comment:总roi"`
NewPayROI string `gorm:"column:new_pay_roi;type:varchar(64);default:'';comment:新增roi"`
NewRegister int `gorm:"column:new_register;default:0;type:int(11);comment:注册用户数"`
ActiveDevice int `gorm:"column:active_device;default:0;type:int(11);comment:设备数"`
NewWithdraw int64 `gorm:"column:new_withdraw;type:bigint(20);default:0;comment:新增退出"`
ActiveUser int `gorm:"column:active_user;default:0;type:int(11);comment:活跃用户数"`
RechargeUser int `gorm:"column:recharge_user;default:0;type:int(11);comment:付费人数"`
}

Loading…
Cancel
Save