|
@@ -171,6 +171,20 @@ func DataCenterOriginalDataTotal(c *gin.Context, req md.DataCenterOriginalDataCo |
|
|
} |
|
|
} |
|
|
_, ecpm := ClacEcpm(ecpmReq) |
|
|
_, ecpm := ClacEcpm(ecpmReq) |
|
|
fmt.Println(utils.Float64ToStr(utils.StrToFloat64(ecpm) / 100)) |
|
|
fmt.Println(utils.Float64ToStr(utils.StrToFloat64(ecpm) / 100)) |
|
|
|
|
|
param := md.CalcApplicationDataReq{ |
|
|
|
|
|
OriginalDataId: data.Id, |
|
|
|
|
|
OriginalExposureCount: data.ExposureCount, |
|
|
|
|
|
OriginalEcpm: data.Ecpm, |
|
|
|
|
|
NowExposureCount: data.ExposureCount, |
|
|
|
|
|
NowEcpm: ecpm, |
|
|
|
|
|
} |
|
|
|
|
|
if utils.StrToFloat64(req.NowEcpm) > 0 { |
|
|
|
|
|
param.NowEcpm = utils.Float64ToStr(utils.StrToFloat64(req.NowEcpm) * 100) |
|
|
|
|
|
} |
|
|
|
|
|
if utils.StrToFloat64(req.NowExposureCount) > 0 { |
|
|
|
|
|
param.NowExposureCount = utils.StrToInt(req.NowExposureCount) |
|
|
|
|
|
} |
|
|
|
|
|
_, appData := CalcApplicationData(param) |
|
|
res := md.MediumDivisionStrategy{ |
|
|
res := md.MediumDivisionStrategy{ |
|
|
PlatformRetentionRate: utils.IntToStr(strategy.PlatformRetentionRate), |
|
|
PlatformRetentionRate: utils.IntToStr(strategy.PlatformRetentionRate), |
|
|
CommissionRetentionRate: utils.IntToStr(strategy.CommissionRetentionRate), |
|
|
CommissionRetentionRate: utils.IntToStr(strategy.CommissionRetentionRate), |
|
@@ -181,6 +195,12 @@ func DataCenterOriginalDataTotal(c *gin.Context, req md.DataCenterOriginalDataCo |
|
|
ExposureCount: utils.IntToStr(data.ExposureCount), |
|
|
ExposureCount: utils.IntToStr(data.ExposureCount), |
|
|
Ecpm: utils.Float64ToStr(utils.StrToFloat64(ecpm) / 100), |
|
|
Ecpm: utils.Float64ToStr(utils.StrToFloat64(ecpm) / 100), |
|
|
OldEcpm: utils.Float64ToStr(utils.StrToFloat64(data.Ecpm) / 100), |
|
|
OldEcpm: utils.Float64ToStr(utils.StrToFloat64(data.Ecpm) / 100), |
|
|
|
|
|
PlatformRetention: utils.Float64ToStr(appData.PlatformRetention / 100), |
|
|
|
|
|
CommissionRetention: utils.Float64ToStr(appData.CommissionRetention / 100), |
|
|
|
|
|
MediaRevenue: utils.Float64ToStr(appData.MediaRevenue / 100), |
|
|
|
|
|
AgentRevenue: utils.Float64ToStr(appData.AgentRevenue / 100), |
|
|
|
|
|
ExtraRevenue: utils.Float64ToStr(appData.ExtraRevenue / 100), |
|
|
|
|
|
AgreementSharing: utils.Float64ToStr(appData.AgreementSharing / 100), |
|
|
} |
|
|
} |
|
|
e.OutSuc(c, res, nil) |
|
|
e.OutSuc(c, res, nil) |
|
|
return |
|
|
return |
|
|