瀏覽代碼

更新

master
huangjiajun 1 月之前
父節點
當前提交
5f0fcdc7d2
共有 2 個文件被更改,包括 5 次插入4 次删除
  1. +4
    -4
      app/svc/svc_data_center_original_data.go
  2. +1
    -0
      app/utils/convert.go

+ 4
- 4
app/svc/svc_data_center_original_data.go 查看文件

@@ -36,7 +36,7 @@ func DataCenterOriginalDataList(c *gin.Context, req md.DataCenterOriginalDataReq
ClickRate: v.ClickRate,
Date: v.Date,
PublisherIncome: utils.Float64ToStr(float64(v.PublisherIncome) / 100),
Ecpm: utils.Float64ToStr(float64(int(utils.StrToFloat64(v.Ecpm))) / 100),
Ecpm: utils.Float64ToStr(utils.StrToFloat64(v.Ecpm) / 100),
IsApply: utils.IntToStr(v.IsApply),
}
tmpApplet := GetAppletInfo(c, v.AppId)
@@ -193,8 +193,8 @@ func DataCenterOriginalDataTotal(c *gin.Context, req md.DataCenterOriginalDataCo
ExtraRevenueRate: utils.IntToStr(strategy.ExtraRevenueRate),
AgreementSharingRate: utils.IntToStr(strategy.AgreementSharingRate),
ExposureCount: utils.IntToStr(data.ExposureCount),
Ecpm: utils.Float64ToStr(float64(int(utils.StrToFloat64(ecpm))) / 100),
OldEcpm: utils.Float64ToStr(float64(int(utils.StrToFloat64(data.Ecpm))) / 100),
Ecpm: utils.Float64ToStr(utils.StrToFloat64(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),
@@ -346,7 +346,7 @@ func OriginalDataOneApplicationTotal(c *gin.Context, req md.DataCenterOriginalDa
ReqSuccCount: utils.Int64ToStr(v.StatItem.ReqSuccCount),
PublisherIncome: utils.Float64ToStr(float64(v.StatItem.PublisherIncome) / 100),
ClickCount: utils.Int64ToStr(v.StatItem.ClickCount),
Ecpm: utils.Float64ToStr(float64(int(v.StatItem.Ecpm)) / 100),
Ecpm: utils.Float64ToStr(v.StatItem.Ecpm / 100),
ExposureRate: utils.Float64ToStr(v.StatItem.ExposureRate),
ClickRate: utils.Float64ToStr(v.StatItem.ClickRate),
}


+ 1
- 0
app/utils/convert.go 查看文件

@@ -271,6 +271,7 @@ func ByteToFloat64(bytes []byte) float64 {
}

func Float64ToStr(f float64) string {
f = float64(int(f*100)) / 100
return strconv.FormatFloat(f, 'f', 2, 64)
}
func Float64ToStrPrec1(f float64) string {


Loading…
取消
儲存