|
@@ -231,7 +231,9 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
dao.execute(gameDataDayTotalsql);
|
|
|
//得到每日总计对象
|
|
|
GameDataDayTotalVO vo = gameDataDayTotalsql.getObject(GameDataDayTotalVO.class);
|
|
|
- formatDayNTotal(vo);
|
|
|
+ if (vo.getAmountD1() != null) {
|
|
|
+ formatDayNTotal(vo);
|
|
|
+ }
|
|
|
return vo;
|
|
|
}
|
|
|
|
|
@@ -469,6 +471,10 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
* @return 返回给前端额数据
|
|
|
*/
|
|
|
public GameDataTotalTotalVO getGameDataTotalTotal(GameDataTotalTotalDTO dto) {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
return null;
|
|
|
}
|
|
|
|
|
@@ -983,7 +989,7 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
.back(d1ToDNTotalAmount.divide(vo.getCost(), 4, RoundingMode.HALF_UP))
|
|
|
.multiples(d1ToDNTotalAmount.divide(buyAmountD1, 4, RoundingMode.HALF_UP))
|
|
|
.build());
|
|
|
- } else if (temps.equals("nature")) {
|
|
|
+ } else if (temps[3].equals("nature")) {
|
|
|
dayNTotalFieldMap.getT2().set(vo, RechargeTrendVO.builder()
|
|
|
.rechargeMoney(dNAmount)
|
|
|
.rechargeUserCount(Long.valueOf(temps[2]))
|
|
@@ -1390,11 +1396,11 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
private String gameDataDayTotalSql() {
|
|
|
return """
|
|
|
SELECT
|
|
|
- SUM(cost) cost,
|
|
|
+ IFNULL(SUM(cost), 0) cost,
|
|
|
|
|
|
- SUM(buy_reg_num) buy_reg_num,
|
|
|
- SUM(nature_reg_num) nature_reg_num,
|
|
|
- SUM(reg_num) reg_num,
|
|
|
+ IFNULL(SUM(buy_reg_num), 0) buy_reg_num,
|
|
|
+ IFNULL(SUM(nature_reg_num), 0) nature_reg_num,
|
|
|
+ IFNULL(SUM(reg_num), 0) reg_num,
|
|
|
|
|
|
"""
|
|
|
+ amountDay("buy_") +
|
|
@@ -1405,18 +1411,18 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
CONCAT(SUM(CAST(SPLIT_PART(buy_amount_m6 , '/', 1) AS DECIMAL(10, 2))),'/',SUM(CAST(SPLIT_PART(buy_amount_m6, '/', 6) AS DECIMAL(10, 2))),'/',SUM(CAST(SPLIT_PART(buy_amount_m6, '/', 2) AS BIGINT)),'/buy') AS buy_amount_m6,
|
|
|
CONCAT(SUM(CAST(SPLIT_PART(buy_amount_y1 , '/', 1) AS DECIMAL(10, 2))),'/',SUM(CAST(SPLIT_PART(buy_amount_m6, '/', 6) AS DECIMAL(10, 2))),'/',SUM(CAST(SPLIT_PART(buy_amount_y1, '/', 2) AS BIGINT)),'/buy') AS buy_amount_y1,
|
|
|
CONCAT(SUM(CAST(SPLIT_PART(buy_amount_sum , '/', 1) AS DECIMAL(10, 2))),'/',SUM(CAST(SPLIT_PART(buy_amount_sum, '/', 6) AS DECIMAL(10, 2))),'/',SUM(CAST(SPLIT_PART(buy_amount_sum, '/', 2) AS BIGINT)),'/buy') AS buy_amount_sum,
|
|
|
- SUM(buy_first_new_user_amount_count) buy_first_new_user_amount_count,
|
|
|
- SUM(buy_first_new_user_amount_num) buy_first_new_user_amount_num,
|
|
|
- SUM(buy_first_new_user_amount) buy_first_new_user_amount,
|
|
|
- SUM(buy_old_user_count) buy_old_user_count,
|
|
|
- SUM(buy_old_user_num) buy_old_user_num,
|
|
|
- SUM(buy_old_user_amount) buy_old_user_amount,
|
|
|
- SUM(buy_amount_count) buy_amount_count,
|
|
|
- SUM(buy_amount_num) buy_amount_num,
|
|
|
- SUM(buy_amount) buy_amount,
|
|
|
- SUM(buy_new_user_total_amount_count) buy_new_user_total_amount_count,
|
|
|
- SUM(buy_new_user_total_amount_num) buy_new_user_total_amount_num,
|
|
|
- SUM(buy_new_user_total_amount) buy_new_user_total_amount,
|
|
|
+ IFNULL(SUM(buy_first_new_user_amount_count), 0) buy_first_new_user_amount_count,
|
|
|
+ IFNULL(SUM(buy_first_new_user_amount_num), 0) buy_first_new_user_amount_num,
|
|
|
+ IFNULL(SUM(buy_first_new_user_amount), 0) buy_first_new_user_amount,
|
|
|
+ IFNULL(SUM(buy_old_user_count), 0) buy_old_user_count,
|
|
|
+ IFNULL(SUM(buy_old_user_num), 0) buy_old_user_num,
|
|
|
+ IFNULL(SUM(buy_old_user_amount), 0) buy_old_user_amount,
|
|
|
+ IFNULL(SUM(buy_amount_count), 0) buy_amount_count,
|
|
|
+ IFNULL(SUM(buy_amount_num), 0) buy_amount_num,
|
|
|
+ IFNULL(SUM(buy_amount), 0) buy_amount,
|
|
|
+ IFNULL(SUM(buy_new_user_total_amount_count), 0) buy_new_user_total_amount_count,
|
|
|
+ IFNULL(SUM(buy_new_user_total_amount_num), 0) buy_new_user_total_amount_num,
|
|
|
+ IFNULL(SUM(buy_new_user_total_amount), 0) buy_new_user_total_amount,
|
|
|
round(if(SUM(cost) > 0 , SUM(buy_first_new_user_amount) / SUM(cost) ,0), 4) buy_first_roi,
|
|
|
round(if(SUM(buy_reg_num) > 0 , SUM(buy_first_new_user_amount_num) / SUM(buy_reg_num) ,0), 4) buy_first_amount_rate,
|
|
|
round(if(SUM(buy_reg_num) > 0, SUM(buy_new_user_total_amount_num) / SUM(buy_reg_num), 0) ,4) buy_today_amount_rate,
|
|
@@ -1443,18 +1449,18 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
CONCAT(SUM(CAST(SPLIT_PART(nature_amount_m6 , '/', 1) AS DECIMAL(10, 2))),'/',SUM(CAST(SPLIT_PART(nature_amount_m6, '/', 6) AS DECIMAL(10, 2))),'/',SUM(CAST(SPLIT_PART(nature_amount_m6, '/', 2) AS BIGINT)),'/nature') AS nature_amount_m6,
|
|
|
CONCAT(SUM(CAST(SPLIT_PART(nature_amount_y1 , '/', 1) AS DECIMAL(10, 2))),'/',SUM(CAST(SPLIT_PART(nature_amount_m6, '/', 6) AS DECIMAL(10, 2))),'/',SUM(CAST(SPLIT_PART(nature_amount_y1, '/', 2) AS BIGINT)),'/nature') AS nature_amount_y1,
|
|
|
CONCAT(SUM(CAST(SPLIT_PART(nature_amount_sum , '/', 1) AS DECIMAL(10, 2))),'/',SUM(CAST(SPLIT_PART(nature_amount_sum, '/', 6) AS DECIMAL(10, 2))),'/',SUM(CAST(SPLIT_PART(nature_amount_sum, '/', 2) AS BIGINT)),'/nature') AS nature_amount_sum,
|
|
|
- SUM(nature_first_new_user_amount_count) nature_first_new_user_amount_count,
|
|
|
- SUM(nature_first_new_user_amount_num) nature_first_new_user_amount_num,
|
|
|
- SUM(nature_first_new_user_amount) nature_first_new_user_amount,
|
|
|
- SUM(nature_old_user_count) nature_old_user_count,
|
|
|
- SUM(nature_old_user_num) nature_old_user_num,
|
|
|
- SUM(nature_old_user_amount) nature_old_user_amount,
|
|
|
- SUM(nature_amount_count) nature_amount_count,
|
|
|
- SUM(nature_amount_num) nature_amount_num,
|
|
|
- SUM(nature_amount) nature_amount,
|
|
|
- SUM(nature_new_user_total_amount_count) nature_new_user_total_amount_count,
|
|
|
- SUM(nature_new_user_total_amount_num) nature_new_user_total_amount_num,
|
|
|
- SUM(nature_new_user_total_amount) nature_new_user_total_amount,
|
|
|
+ IFNULL(SUM(nature_first_new_user_amount_count), 0) nature_first_new_user_amount_count,
|
|
|
+ IFNULL(SUM(nature_first_new_user_amount_num), 0) nature_first_new_user_amount_num,
|
|
|
+ IFNULL(SUM(nature_first_new_user_amount), 0) nature_first_new_user_amount,
|
|
|
+ IFNULL(SUM(nature_old_user_count), 0) nature_old_user_count,
|
|
|
+ IFNULL(SUM(nature_old_user_num), 0) nature_old_user_num,
|
|
|
+ IFNULL(SUM(nature_old_user_amount), 0) nature_old_user_amount,
|
|
|
+ IFNULL(SUM(nature_amount_count), 0) nature_amount_count,
|
|
|
+ IFNULL(SUM(nature_amount_num), 0) nature_amount_num,
|
|
|
+ IFNULL(SUM(nature_amount), 0) nature_amount,
|
|
|
+ IFNULL(SUM(nature_new_user_total_amount_count), 0) nature_new_user_total_amount_count,
|
|
|
+ IFNULL(SUM(nature_new_user_total_amount_num), 0) nature_new_user_total_amount_num,
|
|
|
+ IFNULL(SUM(nature_new_user_total_amount), 0) nature_new_user_total_amount,
|
|
|
round(if(SUM(cost) > 0 , SUM(nature_first_new_user_amount) / SUM(cost) ,0), 4) nature_first_roi,
|
|
|
round(if(SUM(nature_reg_num) > 0 , SUM(nature_first_new_user_amount_num) / SUM(nature_reg_num) ,0), 4) nature_first_amount_rate,
|
|
|
round(if(SUM(nature_reg_num) > 0, SUM(nature_new_user_total_amount_num) / SUM(nature_reg_num), 0) ,4) nature_today_amount_rate,
|
|
@@ -1481,18 +1487,18 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
CONCAT(SUM(CAST(SPLIT_PART(amount_m6 , '/', 1) AS DECIMAL(10, 2))),'/',SUM(CAST(SPLIT_PART(amount_m6, '/', 6) AS DECIMAL(10, 2))),'/',SUM(CAST(SPLIT_PART(amount_m6, '/', 2) AS BIGINT)),'/total') AS amount_m6,
|
|
|
CONCAT(SUM(CAST(SPLIT_PART(amount_y1 , '/', 1) AS DECIMAL(10, 2))),'/',SUM(CAST(SPLIT_PART(amount_m6, '/', 6) AS DECIMAL(10, 2))),'/',SUM(CAST(SPLIT_PART(amount_y1, '/', 2) AS BIGINT)),'/total') AS amount_y1,
|
|
|
CONCAT(SUM(CAST(SPLIT_PART(amount_sum , '/', 1) AS DECIMAL(10, 2))),'/',SUM(CAST(SPLIT_PART(amount_sum, '/', 6) AS DECIMAL(10, 2))),'/',SUM(CAST(SPLIT_PART(amount_sum, '/', 2) AS BIGINT)),'/total') AS amount_sum,
|
|
|
- SUM(first_new_user_amount_count) first_new_user_amount_count,
|
|
|
- SUM(first_new_user_amount_num) first_new_user_amount_num,
|
|
|
- SUM(first_new_user_amount) first_new_user_amount,
|
|
|
- SUM(old_user_count) old_user_count,
|
|
|
- SUM(old_user_num) old_user_num,
|
|
|
- SUM(old_user_amount) old_user_amount,
|
|
|
- SUM(amount_count) amount_count,
|
|
|
- SUM(amount_num) amount_num,
|
|
|
- SUM(amount) amount,
|
|
|
- SUM(new_user_total_amount_count) new_user_total_amount_count,
|
|
|
- SUM(new_user_total_amount_num) new_user_total_amount_num,
|
|
|
- SUM(new_user_total_amount) new_user_total_amount,
|
|
|
+ IFNULL(SUM(first_new_user_amount_count), 0) first_new_user_amount_count,
|
|
|
+ IFNULL(SUM(first_new_user_amount_num), 0) first_new_user_amount_num,
|
|
|
+ IFNULL(SUM(first_new_user_amount), 0) first_new_user_amount,
|
|
|
+ IFNULL(SUM(old_user_count), 0) old_user_count,
|
|
|
+ IFNULL(SUM(old_user_num), 0) old_user_num,
|
|
|
+ IFNULL(SUM(old_user_amount), 0) old_user_amount,
|
|
|
+ IFNULL(SUM(amount_count), 0) amount_count,
|
|
|
+ IFNULL(SUM(amount_num), 0) amount_num,
|
|
|
+ IFNULL(SUM(amount), 0) amount,
|
|
|
+ IFNULL(SUM(new_user_total_amount_count), 0) new_user_total_amount_count,
|
|
|
+ IFNULL(SUM(new_user_total_amount_num), 0) new_user_total_amount_num,
|
|
|
+ IFNULL(SUM(new_user_total_amount), 0) new_user_total_amount,
|
|
|
round(if(SUM(cost) > 0 , SUM(first_new_user_amount) / SUM(cost) ,0), 4) first_roi,
|
|
|
round(if(SUM(reg_num) > 0 , SUM(first_new_user_amount_num) / SUM(reg_num) ,0), 4) first_amount_rate,
|
|
|
round(if(SUM(reg_num) > 0, SUM(new_user_total_amount_num) / SUM(reg_num), 0) ,4) today_amount_rate,
|