|
@@ -115,7 +115,7 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
//得到结果集list
|
|
|
List<GameDataDayVO> list = sql.getList(GameDataDayVO.class);
|
|
|
//设置查询总数
|
|
|
- pager.setRecordCount(dao.count(AdsGameDay.class,cri));
|
|
|
+ pager.setRecordCount(dao.count(AdsGameDay.class, cri));
|
|
|
|
|
|
List<GameDataDayVO> gameDataDayVOList = list.stream().map(vo -> {
|
|
|
//买量数据
|
|
@@ -409,12 +409,12 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
|
|
|
//如果注册时间参数为空,默认设置查询当天数据
|
|
|
if (dto.getRegisteredBeginDate() == null || dto.getRegisteredEndDate() == null) {
|
|
|
- dto.setRegisteredBeginDate(LocalDate.now().minusDays(30));
|
|
|
+ dto.setRegisteredBeginDate(LocalDate.now());
|
|
|
dto.setRegisteredEndDate(LocalDate.now());
|
|
|
}
|
|
|
//如果充值时间参数为空,默认设置查询当天数据
|
|
|
if (dto.getRechargeBeginDate() == null || dto.getRechargeEndDate() == null) {
|
|
|
- dto.setRechargeBeginDate(LocalDate.now().minusDays(30));
|
|
|
+ dto.setRechargeBeginDate(LocalDate.now());
|
|
|
dto.setRechargeEndDate(LocalDate.now());
|
|
|
}
|
|
|
//如果没有排序条件给默认值
|
|
@@ -766,7 +766,7 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
//记录查询出的记录条数
|
|
|
int count = list.size();
|
|
|
//如果总复充list长度为0返回空结果
|
|
|
- if (count == 0){
|
|
|
+ if (count == 0) {
|
|
|
return map;
|
|
|
}
|
|
|
//初始化tempList
|
|
@@ -1103,19 +1103,20 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
|
|
|
/**
|
|
|
* 补全缺少的日期数据
|
|
|
- * @param list 查询到的复充趋势总量原始数据
|
|
|
- * @param listBuy 查询到的复充趋势买量量原始数据
|
|
|
+ *
|
|
|
+ * @param list 查询到的复充趋势总量原始数据
|
|
|
+ * @param listBuy 查询到的复充趋势买量量原始数据
|
|
|
* @param listNature 查询到的复充趋势自然量原始数据
|
|
|
* @return 返回处理好的结果list
|
|
|
*/
|
|
|
- private List findMissDateAgainData(List<AdsGameDayAgain> list,List<AdsGameDayAgainBuy> listBuy, List<AdsGameDayAgainNature> listNature){
|
|
|
+ private List findMissDateAgainData(List<AdsGameDayAgain> list, List<AdsGameDayAgainBuy> listBuy, List<AdsGameDayAgainNature> listNature) {
|
|
|
//初始化买量和自然量复充数据list
|
|
|
int count = list.size();
|
|
|
List<AdsGameDayAgainBuy> listBuyFinal = new ArrayList<>();
|
|
|
List<AdsGameDayAgainNature> listNatureFinal = new ArrayList<>();
|
|
|
|
|
|
//先判断三个list的数据量是否相同
|
|
|
- if (count == listBuy.size() && count == listNature.size()){
|
|
|
+ if (count == listBuy.size() && count == listNature.size()) {
|
|
|
//不少数据
|
|
|
List resList = new ArrayList();
|
|
|
resList.add(listBuy);
|
|
@@ -1124,7 +1125,7 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
}
|
|
|
|
|
|
//循环赋初值
|
|
|
- for (int i = 0; i< count ; i++){
|
|
|
+ for (int i = 0; i < count; i++) {
|
|
|
listBuyFinal.add(i, AdsGameDayAgainBuy.builder()
|
|
|
.dt(list.get(i).getDt())
|
|
|
.ddf(list.get(i).getDdf())
|
|
@@ -1163,11 +1164,11 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
int tempBuy = 0;
|
|
|
int tempNature = 0;
|
|
|
for (int i = 0; i < count; i++) {
|
|
|
- if (tempBuy < listBuy.size() && listBuyFinal.get(i).getDdf().equals(listBuy.get(tempBuy).getDdf())){
|
|
|
+ if (tempBuy < listBuy.size() && listBuyFinal.get(i).getDdf().equals(listBuy.get(tempBuy).getDdf())) {
|
|
|
listBuyFinal.set(i, listBuy.get(tempBuy));
|
|
|
tempBuy++;
|
|
|
}
|
|
|
- if (tempNature < listNature.size() && listNatureFinal.get(i).getDdf().equals(listNature.get(tempNature).getDdf())){
|
|
|
+ if (tempNature < listNature.size() && listNatureFinal.get(i).getDdf().equals(listNature.get(tempNature).getDdf())) {
|
|
|
listNatureFinal.set(i, listNature.get(tempNature));
|
|
|
tempNature++;
|
|
|
}
|
|
@@ -1237,6 +1238,7 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
game_id,
|
|
|
game_classify,
|
|
|
source_system,
|
|
|
+ cost,
|
|
|
|
|
|
buy_reg_num,
|
|
|
nature_reg_num,
|
|
@@ -1364,6 +1366,7 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
sum(a.buy_reg_num) buy_reg_num,
|
|
|
sum(a.nature_reg_num) nature_reg_num,
|
|
|
sum(a.reg_num) reg_num,
|
|
|
+ sum(a.cost) cost,
|
|
|
|
|
|
sum(a.buy_first_new_user_amount_count) buy_first_new_user_amount_count,
|
|
|
sum(a.buy_first_new_user_amount_num) buy_first_new_user_amount_num,
|