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