|  | @@ -487,6 +487,10 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
 | 
	
		
			
				|  |  |       */
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  |      public Page<PitcherGameDataDayVO> getPitcherGameDataDay(PitcherGameDataDayDTO dto) {
 | 
	
		
			
				|  |  | +        //不选游戏,默认按照直接的投手游戏每日数据去查数据
 | 
	
		
			
				|  |  | +        if (CollectionUtils.isEmpty(dto.getGameId())) {
 | 
	
		
			
				|  |  | +            return getPitcherGameDataDayForOld(dto);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |          com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo(dto.getSourceSystem());
 | 
	
		
			
				|  |  |          List<Long> userIds = CollectionUtils.isEmpty(dto.getPitcherId()) ? poerInfo.first : dto.getPitcherId();
 | 
	
		
			
				|  |  |          List<Long> gameIds = CollectionUtils.isEmpty(dto.getGameId()) ? poerInfo.second : dto.getGameId();
 | 
	
	
		
			
				|  | @@ -566,6 +570,76 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
 | 
	
		
			
				|  |  |          return new Page<>(list, pager);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    /**
 | 
	
		
			
				|  |  | +     * 投手游戏每日数据
 | 
	
		
			
				|  |  | +     *
 | 
	
		
			
				|  |  | +     * @param dto PitcherGameDataDayDTO
 | 
	
		
			
				|  |  | +     * @return Page<PitcherGameDataDayVO>
 | 
	
		
			
				|  |  | +     */
 | 
	
		
			
				|  |  | +    public Page<PitcherGameDataDayVO> getPitcherGameDataDayForOld(PitcherGameDataDayDTO dto) {
 | 
	
		
			
				|  |  | +        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo(dto.getSourceSystem());
 | 
	
		
			
				|  |  | +        List<Long> userIds = CollectionUtils.isEmpty(dto.getPitcherId()) ? poerInfo.first : dto.getPitcherId();
 | 
	
		
			
				|  |  | +        List<Long> gameIds = CollectionUtils.isEmpty(dto.getGameId()) ? poerInfo.second : dto.getGameId();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        //不传递时间,默认查询当天
 | 
	
		
			
				|  |  | +        if (dto.getBeginDate() == null || dto.getEndDate() == null) {
 | 
	
		
			
				|  |  | +            dto.setBeginDate(LocalDate.now());
 | 
	
		
			
				|  |  | +            dto.setEndDate(LocalDate.now());
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        //创建查询条件
 | 
	
		
			
				|  |  | +        Criteria cri = Cnd.cri();
 | 
	
		
			
				|  |  | +        if (CollectionUtils.isNotEmpty(userIds)) {
 | 
	
		
			
				|  |  | +            cri.where().andInList("pitcher_id", userIds);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if (CollectionUtils.isNotEmpty(gameIds)) {
 | 
	
		
			
				|  |  | +            cri.where().andInList("game_id", gameIds);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if (StringUtils.isNotBlank(dto.getSourceSystem())) {
 | 
	
		
			
				|  |  | +            cri.where().andEquals("source_system", dto.getSourceSystem());
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if (dto.getBeginDate() != null && dto.getEndDate() != null) {
 | 
	
		
			
				|  |  | +            cri.where().andBetween("dt", dto.getBeginDate(), dto.getEndDate());
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if (StringUtils.isNotBlank(dto.getGameCp())) {
 | 
	
		
			
				|  |  | +            cri.where().andEquals("game_cp", dto.getGameCp());
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if (dto.getGameType() != null) {
 | 
	
		
			
				|  |  | +            cri.where().andEquals("game_type", dto.getGameType());
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        //排序条件
 | 
	
		
			
				|  |  | +        //拼接排序条件,如果没有排序条件给默认值
 | 
	
		
			
				|  |  | +        if (StringUtils.isBlank(dto.getSortType())) {
 | 
	
		
			
				|  |  | +            dto.setSortType(OrderByEnum.DESC.getOrderType());
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if (StringUtils.isBlank(dto.getSortFiled())) {
 | 
	
		
			
				|  |  | +            cri.getOrderBy().orderBy("dt", dto.getSortType());
 | 
	
		
			
				|  |  | +            cri.getOrderBy().orderBy("cost", dto.getSortType());
 | 
	
		
			
				|  |  | +        } else {
 | 
	
		
			
				|  |  | +            cri.getOrderBy().orderBy(CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, dto.getSortFiled()), dto.getSortType());
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        //Pager对象
 | 
	
		
			
				|  |  | +        Pager pager = dao.createPager(dto.getPageNum(), dto.getPageSize());
 | 
	
		
			
				|  |  | +        //sql语句
 | 
	
		
			
				|  |  | +        Sql sql = Sqls.create(pitcherGameDataDaySql() + cri);
 | 
	
		
			
				|  |  | +        //设置回传对象
 | 
	
		
			
				|  |  | +        sql.setCallback(Sqls.callback.entities());
 | 
	
		
			
				|  |  | +        sql.setEntity(dao.getEntity(PitcherGameDataDayVO.class));
 | 
	
		
			
				|  |  | +        //设置pager
 | 
	
		
			
				|  |  | +        sql.setPager(pager);
 | 
	
		
			
				|  |  | +        //执行sql
 | 
	
		
			
				|  |  | +        dao.execute(sql);
 | 
	
		
			
				|  |  | +        //设置总记录数
 | 
	
		
			
				|  |  | +        pager.setRecordCount(dao.count(AdsGamePitcherDay.class, cri));
 | 
	
		
			
				|  |  | +        //处理dayN数据
 | 
	
		
			
				|  |  | +        List<PitcherGameDataDayVO> tempList = sql.getList(PitcherGameDataDayVO.class);
 | 
	
		
			
				|  |  | +        List<PitcherGameDataDayVO> list = tempList.stream().map(vo -> {
 | 
	
		
			
				|  |  | +            formatPitcherGameDataDayDayN(vo);
 | 
	
		
			
				|  |  | +            return vo;
 | 
	
		
			
				|  |  | +        }).collect(Collectors.toList());
 | 
	
		
			
				|  |  | +        //返回结果
 | 
	
		
			
				|  |  | +        return new Page<>(list, pager);
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      /**
 | 
	
		
			
				|  |  |       * 投手游戏每日数据总计
 | 
	
		
			
				|  |  |       *
 |