|
@@ -509,6 +509,8 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
|
|
} else {
|
|
} else {
|
|
sql = Sqls.create(pitcherDataTotalSqlForParent(criA, criB, criAmount, criNewUser, criRoleNum) + orderByCri);
|
|
sql = Sqls.create(pitcherDataTotalSqlForParent(criA, criB, criAmount, criNewUser, criRoleNum) + orderByCri);
|
|
}
|
|
}
|
|
|
|
+ // 打印SQL
|
|
|
|
+ System.out.println("Executing SQL: " + sql.getSourceSql());
|
|
//设置自定义回显对象
|
|
//设置自定义回显对象
|
|
sql.setCallback(Sqls.callback.entities());
|
|
sql.setCallback(Sqls.callback.entities());
|
|
sql.setEntity(dao.getEntity(PitcherDataTotalVO.class));
|
|
sql.setEntity(dao.getEntity(PitcherDataTotalVO.class));
|
|
@@ -2385,7 +2387,8 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
|
|
first_role_rate,
|
|
first_role_rate,
|
|
new_user_total_role_rate,
|
|
new_user_total_role_rate,
|
|
role_num_rate,
|
|
role_num_rate,
|
|
- new_user_amount_ratio
|
|
|
|
|
|
+ new_user_amount_ratio,
|
|
|
|
+ total_five_hundred_user_count
|
|
FROM
|
|
FROM
|
|
""" + tableName;
|
|
""" + tableName;
|
|
}
|
|
}
|
|
@@ -2876,6 +2879,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
|
|
ROUND(IF(SUM(new_user_total_amount_num) > 0 , SUM(new_user_total_amount) / SUM(new_user_total_amount_num), 0), 2) as today_arpu,
|
|
ROUND(IF(SUM(new_user_total_amount_num) > 0 , SUM(new_user_total_amount) / SUM(new_user_total_amount_num), 0), 2) as today_arpu,
|
|
ROUND(IF(SUM(amount_num) > 0 , SUM(amount) / SUM(amount_num), 0), 2) as paper_arpu,
|
|
ROUND(IF(SUM(amount_num) > 0 , SUM(amount) / SUM(amount_num), 0), 2) as paper_arpu,
|
|
SUM(hundred_user_num) as hundred_user_num,
|
|
SUM(hundred_user_num) as hundred_user_num,
|
|
|
|
+ SUM(total_five_hundred_user_count) AS total_five_hundred_user_count,
|
|
ROUND(IF(SUM(hundred_user_num) > 0 , SUM(cost) / SUM(hundred_user_num), 0), 2) as hundred_user_num_cost,
|
|
ROUND(IF(SUM(hundred_user_num) > 0 , SUM(cost) / SUM(hundred_user_num), 0), 2) as hundred_user_num_cost,
|
|
ROUND(IF(SUM(cost) > 0 , SUM(da1) / SUM(cost), 0), 4) as roi1,
|
|
ROUND(IF(SUM(cost) > 0 , SUM(da1) / SUM(cost), 0), 4) as roi1,
|
|
ROUND(IF(SUM(cost) > 0 , SUM(da2) / SUM(cost), 0), 4) as roi2,
|
|
ROUND(IF(SUM(cost) > 0 , SUM(da2) / SUM(cost), 0), 4) as roi2,
|
|
@@ -3090,7 +3094,10 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
|
|
ROUND(IF(new_user_total_amount_num > 0, IFNULL(new_user_order_again, 0) / new_user_total_amount_num, 0), 4) as new_user_again_rate,
|
|
ROUND(IF(new_user_total_amount_num > 0, IFNULL(new_user_order_again, 0) / new_user_total_amount_num, 0), 4) as new_user_again_rate,
|
|
IFNULL(role_num, 0) as role_num,
|
|
IFNULL(role_num, 0) as role_num,
|
|
ROUND(IF(register_num > 0, IFNULL(role_num, 0) / register_num, 0), 4) as role_num_rate,
|
|
ROUND(IF(register_num > 0, IFNULL(role_num, 0) / register_num, 0), 4) as role_num_rate,
|
|
- ROUND(IF(role_num > 0, IFNULL(cost, 0) / role_num, 0), 2) as role_num_cost
|
|
|
|
|
|
+ ROUND(IF(role_num > 0, IFNULL(cost, 0) / role_num, 0), 2) as role_num_cost,
|
|
|
|
+ new_user_total_zfb_amount,
|
|
|
|
+ new_user_total_wx_amount,
|
|
|
|
+ new_user_total_mds_amount
|
|
FROM (
|
|
FROM (
|
|
SELECT
|
|
SELECT
|
|
pitcher_id,
|
|
pitcher_id,
|
|
@@ -3145,7 +3152,10 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
|
|
SUM(m6) / SUM(IF(DATE_ADD(dt, INTERVAL 179 day) <= LocalDate.now(), cost, 0)), 0), 4) as roi180,
|
|
SUM(m6) / SUM(IF(DATE_ADD(dt, INTERVAL 179 day) <= LocalDate.now(), cost, 0)), 0), 4) as roi180,
|
|
ROUND(IF(SUM(IF(DATE_ADD(dt, INTERVAL 1 year) <= LocalDate.now(), cost, 0)) > 0 ,
|
|
ROUND(IF(SUM(IF(DATE_ADD(dt, INTERVAL 1 year) <= LocalDate.now(), cost, 0)) > 0 ,
|
|
SUM(m12) / SUM(IF(DATE_ADD(dt, INTERVAL 1 year) <= LocalDate.now(), cost, 0)), 0), 4) as roi1yaer,
|
|
SUM(m12) / SUM(IF(DATE_ADD(dt, INTERVAL 1 year) <= LocalDate.now(), cost, 0)), 0), 4) as roi1yaer,
|
|
- ROUND(IF(SUM(cost) > 0 , SUM(total) / SUM(cost), 0), 4) as roi_total
|
|
|
|
|
|
+ ROUND(IF(SUM(cost) > 0 , SUM(total) / SUM(cost), 0), 4) as roi_total,
|
|
|
|
+ SUM(new_user_total_zfb_amount) AS new_user_total_zfb_amount,
|
|
|
|
+ SUM(new_user_total_wx_amount) AS new_user_total_wx_amount,
|
|
|
|
+ SUM(new_user_total_mds_amount) AS new_user_total_mds_amount
|
|
FROM
|
|
FROM
|
|
game_ads.ads_pitcher_day
|
|
game_ads.ads_pitcher_day
|
|
""" + criA +
|
|
""" + criA +
|
|
@@ -3211,7 +3221,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
|
|
user_zx_pitcher_id as f_pitcher_id,
|
|
user_zx_pitcher_id as f_pitcher_id,
|
|
COUNT(DISTINCT role_user_id) as role_num
|
|
COUNT(DISTINCT role_user_id) as role_num
|
|
FROM
|
|
FROM
|
|
- dw_create_role_detail
|
|
|
|
|
|
+ game_ads.dw_create_role_detail
|
|
""" + criRoleNum +
|
|
""" + criRoleNum +
|
|
"""
|
|
"""
|
|
AND NOT user_agent_id = 0
|
|
AND NOT user_agent_id = 0
|
|
@@ -3781,6 +3791,9 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
|
|
ROUND(IF(SUM(new_user_total_amount_num) > 0 , SUM(new_user_total_amount) / SUM(new_user_total_amount_num), 0), 2) as today_arpu,
|
|
ROUND(IF(SUM(new_user_total_amount_num) > 0 , SUM(new_user_total_amount) / SUM(new_user_total_amount_num), 0), 2) as today_arpu,
|
|
IFNULL(SUM(hundred_user_num), 0) as hundred_user_num,
|
|
IFNULL(SUM(hundred_user_num), 0) as hundred_user_num,
|
|
ROUND(IF(SUM(hundred_user_num) > 0 , SUM(cost) / SUM(hundred_user_num), 0), 2) as hundred_user_num_cost,
|
|
ROUND(IF(SUM(hundred_user_num) > 0 , SUM(cost) / SUM(hundred_user_num), 0), 2) as hundred_user_num_cost,
|
|
|
|
+ SUM(new_user_total_zfb_amount) AS new_user_total_zfb_amount,
|
|
|
|
+ SUM(new_user_total_wx_amount) AS new_user_total_wx_amount,
|
|
|
|
+ SUM(new_user_total_mds_amount) AS new_user_total_mds_amount,
|
|
""" + pitcherDataTotalRoiSql() +
|
|
""" + pitcherDataTotalRoiSql() +
|
|
"""
|
|
"""
|
|
ROUND(IF(SUM(IF(DATE_ADD(dt, INTERVAL 59 day) <= LocalDate.now(), cost, 0)) > 0 ,
|
|
ROUND(IF(SUM(IF(DATE_ADD(dt, INTERVAL 59 day) <= LocalDate.now(), cost, 0)) > 0 ,
|