|
@@ -65,7 +65,7 @@ public class IActiveDataServiceImpl implements IActiveDataService {
|
|
|
continue;
|
|
|
}
|
|
|
fieldMap.put(field.getName(), field);
|
|
|
- if (field.getType() == MediaActiveDataDayVO.class) {
|
|
|
+ if (field.getType() == ActiveDataTrendVO.class) {
|
|
|
//存储所有类型为ActiveDataTrendVO属性的映射 以Trend为结尾的
|
|
|
dayNFieldList.add(field);
|
|
|
}
|
|
@@ -411,9 +411,9 @@ public class IActiveDataServiceImpl implements IActiveDataService {
|
|
|
|
|
|
@Override
|
|
|
public Page<MediaActiveDataDayVO> getMediaActiveDataDay(MediaActiveDataDayDTO dto) {
|
|
|
-// com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
|
|
|
-// List<Long> userGameIds = dto.getGameId() == null ? poerInfo.second : dto.getGameId();
|
|
|
- List<Long> userGameIds = null;
|
|
|
+ com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
|
|
|
+ List<Long> userGameIds = dto.getGameId() == null ? poerInfo.second : dto.getGameId();
|
|
|
+// List<Long> userGameIds = null;
|
|
|
//默认查询的字段及表名
|
|
|
String gameColumn = "game_id";
|
|
|
String classifyColumn = "game_classify";
|
|
@@ -537,13 +537,13 @@ public class IActiveDataServiceImpl implements IActiveDataService {
|
|
|
account_type,
|
|
|
source_system,
|
|
|
cost,
|
|
|
- register_num,
|
|
|
+ register_num as reg_num,
|
|
|
first_new_user_amount_count,
|
|
|
first_new_user_amount_num,
|
|
|
first_new_user_amount,
|
|
|
- old_amount_count,
|
|
|
- old_amount_num,
|
|
|
- old_amount,
|
|
|
+ old_amount_count as old_user_count,
|
|
|
+ old_amount_num as old_user_num,
|
|
|
+ old_amount as old_user_amount,
|
|
|
amount_count,
|
|
|
amount_num,
|
|
|
amount,
|
|
@@ -554,7 +554,7 @@ public class IActiveDataServiceImpl implements IActiveDataService {
|
|
|
first_roi,
|
|
|
first_amount_rate,
|
|
|
today_amount_rate,
|
|
|
- new_user_amount_rate,
|
|
|
+ new_user_amount_rate as new_user_rate
|
|
|
first_avg_amount,
|
|
|
today_avg_amount,
|
|
|
paper_avg,
|
|
@@ -564,13 +564,18 @@ public class IActiveDataServiceImpl implements IActiveDataService {
|
|
|
today_arpu,
|
|
|
paper_arpu,
|
|
|
first_amount_cost as first_new_user_recharge_cost,
|
|
|
- register_cost,
|
|
|
+ register_cost as reg_cost,
|
|
|
hundred_user_num,
|
|
|
hundred_user_num_cost,
|
|
|
today_amount_cost,
|
|
|
first_role_num,
|
|
|
role_num,
|
|
|
new_user_total_role_num,
|
|
|
+ round(if(amount_count > 0, amount / amount_count, 0), 2) avg_amount,
|
|
|
+ round(if(first_new_user_amount_num > 0, first_new_user_amount / first_new_user_amount_num, 0),2) first_amount_arpu,
|
|
|
+ round(if(amount_num > 0, amount / amount_num, 0), 2) amount_arpu,
|
|
|
+ round(if(register_num > 0, new_user_total_amount / register_num, 0), 2) reg_user_arpu,
|
|
|
+ round(if(cost > 0, new_user_total_amount / cost, 0), 4) total_roi,
|
|
|
round(IF(first_role_num > 0, cost / first_role_num, 0), 2) first_role_num_cost,
|
|
|
round(IF(role_num > 0, cost / role_num, 0), 2) role_num_cost,
|
|
|
round(IF(new_user_total_role_num >0, cost / new_user_total_role_num, 0), 2) new_user_total_role_num_cost,
|
|
@@ -708,13 +713,13 @@ public class IActiveDataServiceImpl implements IActiveDataService {
|
|
|
game_classify,
|
|
|
source_system,
|
|
|
cost,
|
|
|
- register_num,
|
|
|
+ register_num as reg_num,
|
|
|
first_new_user_amount_count,
|
|
|
first_new_user_amount_num,
|
|
|
first_new_user_amount,
|
|
|
- old_amount_count,
|
|
|
- old_amount_num,
|
|
|
- old_amount,
|
|
|
+ old_amount_count as old_user_count,
|
|
|
+ old_amount_num as old_user_num,
|
|
|
+ old_amount as old_user_amount,
|
|
|
amount_count,
|
|
|
amount_num,
|
|
|
amount,
|
|
@@ -725,7 +730,7 @@ public class IActiveDataServiceImpl implements IActiveDataService {
|
|
|
first_roi,
|
|
|
first_amount_rate,
|
|
|
today_amount_rate,
|
|
|
- new_user_amount_rate,
|
|
|
+ new_user_amount_rate as new_user_rate,
|
|
|
first_avg_amount,
|
|
|
today_avg_amount,
|
|
|
paper_avg,
|
|
@@ -735,13 +740,19 @@ public class IActiveDataServiceImpl implements IActiveDataService {
|
|
|
today_arpu,
|
|
|
paper_arpu,
|
|
|
first_amount_cost as first_new_user_recharge_cost,
|
|
|
- register_cost,
|
|
|
+ register_cost as reg_cost,
|
|
|
hundred_user_num,
|
|
|
hundred_user_num_cost,
|
|
|
today_amount_cost,
|
|
|
first_role_num,
|
|
|
role_num,
|
|
|
new_user_total_role_num,
|
|
|
+ round(if(amount_count > 0, amount / amount_count, 0), 2) avg_amount,
|
|
|
+ round(if(first_new_user_amount_num > 0, first_new_user_amount / first_new_user_amount_num, 0),2) first_amount_arpu,
|
|
|
+ round(if(amount_num > 0, amount / amount_num, 0), 2) amount_arpu,
|
|
|
+ round(if(new_user_total_amount_num > 0, new_user_total_amount /new_user_total_amount_num, 0),2) today_amount_arpu,
|
|
|
+ round(if(register_num > 0, new_user_total_amount / register_num, 0), 2) reg_user_arpu,
|
|
|
+ round(if(cost > 0, new_user_total_amount / cost, 0), 4) total_roi,
|
|
|
round(IF(first_role_num > 0, cost / first_role_num, 0), 2) first_role_num_cost,
|
|
|
round(IF(role_num > 0, cost / role_num, 0), 2) role_num_cost,
|
|
|
round(IF(new_user_total_role_num >0, cost / new_user_total_role_num, 0), 2) new_user_total_role_num_cost,
|
|
@@ -867,9 +878,9 @@ public class IActiveDataServiceImpl implements IActiveDataService {
|
|
|
|
|
|
@Override
|
|
|
public MediaActiveDataTotalVO getMediaActiveDataTotal(MediaActiveDataDayDTO dto) {
|
|
|
-// com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
|
|
|
-// List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : dto.getGameId();
|
|
|
- List<Long> gameIds = null;
|
|
|
+ com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
|
|
|
+ List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : dto.getGameId();
|
|
|
+// List<Long> gameIds = null;
|
|
|
|
|
|
//默认查询字段
|
|
|
String gameColumn = "game_id";
|