|
|
@@ -150,14 +150,14 @@ func DataCenterOriginalDataTotal(c *gin.Context, req md.DataCenterOriginalDataCo |
|
|
|
e.OutErr(c, 400, e.NewErr(400, "记录不存在")) |
|
|
|
return |
|
|
|
} |
|
|
|
//应用 |
|
|
|
// 应用 |
|
|
|
NewAppletApplicationDb := implement2.NewAppletApplicationDb(MasterDb(c)) |
|
|
|
appid, _ := NewAppletApplicationDb.GetAppletApplicationListByAppid(data.AppId) |
|
|
|
if appid == nil { |
|
|
|
e.OutErr(c, 400, e.NewErr(400, "应用不存在")) |
|
|
|
return |
|
|
|
} |
|
|
|
//分成策略 |
|
|
|
// 分成策略 |
|
|
|
NewMediumDivisionStrategyDb := implement.NewMediumDivisionStrategyDb(db.Db) |
|
|
|
strategy, _ := NewMediumDivisionStrategyDb.GetOriginalWxAdDataByMediumId(appid.MediumId) |
|
|
|
if strategy == nil { |
|
|
@@ -170,7 +170,7 @@ func DataCenterOriginalDataTotal(c *gin.Context, req md.DataCenterOriginalDataCo |
|
|
|
GenerateDataId: data.Id, |
|
|
|
} |
|
|
|
_, ecpm := ClacEcpm(ecpmReq) |
|
|
|
|
|
|
|
fmt.Println(utils.Float64ToStr(utils.StrToFloat64(ecpm) / 100)) |
|
|
|
res := md.MediumDivisionStrategy{ |
|
|
|
PlatformRetentionRate: utils.IntToStr(strategy.PlatformRetentionRate), |
|
|
|
CommissionRetentionRate: utils.IntToStr(strategy.CommissionRetentionRate), |
|
|
@@ -208,7 +208,7 @@ func DataCenterOriginalDataDoing(c *gin.Context, req md.DataCenterDataCenterOrig |
|
|
|
OriginalExposureCount: data.ExposureCount, |
|
|
|
OriginalEcpm: data.Ecpm, |
|
|
|
NowExposureCount: utils.StrToInt(req.NowExposureCount), |
|
|
|
NowEcpm: utils.Float64ToStr(utils.StrToFloat64(req.NowEcpm) * 100), |
|
|
|
NowEcpm: req.NowEcpm, |
|
|
|
} |
|
|
|
err, _ = GenerateWxAdData(args) |
|
|
|
if err != nil { |
|
|
@@ -285,7 +285,7 @@ func OriginalDataMoreApplicationDoing(c *gin.Context, req md.DataCenterOriginalD |
|
|
|
return nil |
|
|
|
} |
|
|
|
func OriginalDataOneApplicationTotal(c *gin.Context, req md.DataCenterOriginalDataOneApplicationDoingReq) { |
|
|
|
//1、查找对应 user_wx_applet_list 记录 |
|
|
|
// 1、查找对应 user_wx_applet_list 记录 |
|
|
|
userWxAppletListDb := implement.NewUserWxAppletListDb(db.Db) |
|
|
|
masterId := c.GetString("mid") |
|
|
|
UserWxAppletList, err := userWxAppletListDb.GetUserWxAppletList(masterId) |
|
|
|