huangjiajun vor 1 Monat
Ursprung
Commit
2626606d8d
1 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen
  1. +2
    -1
      app/svc/svc_index.go

+ 2
- 1
app/svc/svc_index.go Datei anzeigen

@@ -82,7 +82,7 @@ func IndexAppList(c *gin.Context, req md.IndexAppListReq) md.IndexAppListRes {
}
dataList := []md.IndexAppListDataList{
{Name: "广告预估收益", Type: "media_revenue", Bili: commBili(c, dataLastMap[v["app_id"]], tmpList, "media_revenue"), Value: utils.Float64ToStr(utils.StrToFloat64(v["media_revenue"]) / 100)},
{Name: "ECPM", Type: "ecpm", Bili: commBili(c, dataLastMap[v["app_id"]], tmpList, "ecpm"), Value: utils.Float64ToStr(utils.StrToFloat64(v["ecpm"]) / float64(day))},
{Name: "ECPM", Type: "ecpm", Bili: commBili(c, dataLastMap[v["app_id"]], tmpList, "ecpm"), Value: utils.Float64ToStr(utils.StrToFloat64(v["ecpm"]) / 100 / utils.StrToFloat64(v["count"]))},
{Name: "曝光量", Type: "exposure_count", Bili: commBili(c, dataLastMap[v["app_id"]], tmpList, "exposure_count"), Value: v["exposure_count"]},
{Name: "点击量", Type: "click_count", Bili: commBili(c, dataLastMap[v["app_id"]], tmpList, "click_count"), Value: v["click_count"]},
{Name: "点击率", Type: "click_rate", Bili: commBili(c, dataLastMap[v["app_id"]], tmpList, "click_rate"), Value: utils.GetPrec(v["click_rate"], "2") + "%"},
@@ -139,6 +139,7 @@ func commTotal(c *gin.Context, startDate, endDate string) []map[string]string {
func commTotalByApp(c *gin.Context, req md.IndexAppListReq, appId []string) []map[string]string {
sql := `
SELECT
COUNT(*) as count,
app_id as app_id,
SUM(exposure_count) as exposure_count,
SUM(click_count) as click_count,


Laden…
Abbrechen
Speichern