/** 获取周边游频道的map数据 */ public Map<String, Object> getAroundChannelData(Long fromPlaceId, String toPlaceId) { Map<String, Object> map = new HashMap<String, Object>(); List<ProductSearchInfo> productListAroundOnSale = productSearchInfoDAO.getContainerProductList( "ON_SALE", fromPlaceId, null, "ROUTE", StringUtil.arrToStr(new String[] {"GROUP", "SELFHELP_BUS"}), 1, 10); List<ProductSearchInfo> productListAroundNewArrival = productSearchInfoDAO.getContainerProductList( "NEW_ARRIVAL", fromPlaceId, null, "ROUTE", StringUtil.arrToStr(new String[] {"GROUP", "SELFHELP_BUS"}), 1, 10); List<ProductSearchInfo> aroundSalesList = selectTopSalesList(fromPlaceId, new String[] {"GROUP", "SELFHELP_BUS"}, 10); List<ProdContainer> kxlxPlaceList = prodContainerDAO.selectToPlaces("KXLX", fromPlaceId, "3548", true); String kxlxDefaultToPlace = null; if (!kxlxPlaceList.isEmpty()) { kxlxDefaultToPlace = kxlxPlaceList.get(0).getToPlaceId(); } map.put("productListAroundOnSale", productListAroundOnSale); map.put("productListAroundNewArrival", productListAroundNewArrival); map.put("aroundSalesList", aroundSalesList); map.put("kxlxPlaceList", kxlxPlaceList); map.put("kxlxDefaultToPlace", kxlxDefaultToPlace); return map; }
/** 获取门票频道页中数据 */ @Override public Map<String, Object> getTicketChannelData() { Map<String, Object> result = new HashMap<String, Object>(); result.put( "ticketPlaceListShanghai", getPlacesOrderByCmt(null, 79L, "1", "2", 10, 10, "FRONTEND")); result.put( "ticketPlaceListZhejiang", getPlacesOrderByCmt(96L, null, "1", "2", 10, 10, "FRONTEND")); result.put( "ticketPlaceListJiangsu", getPlacesOrderByCmt(80L, null, "1", "2", 10, 10, "FRONTEND")); result.put( "ticketPlaceListGuangdong", getPlacesOrderByCmt(228L, null, "1", "2", 10, 10, "FRONTEND")); result.put( "ticketPlaceListSichuan", getPlacesOrderByCmt(278L, null, "1", "2", 10, 10, "FRONTEND")); result.put( "ticketPlaceListBeijing", getPlacesOrderByCmt(null, 1L, "1", "2", 10, 10, "FRONTEND")); result.put( "ticketPlaceListAnhui", getPlacesOrderByCmt(118L, null, "1", "2", 10, 10, "FRONTEND")); result.put("productSearchInfoList", productSearchInfoDAO.selectTicketProductTopData()); return result; }
private List<PlaceSearchInfoDTO> getPlacesOrderByCmt( Long provinceId, Long cityId, String isTicket, String stage, int plSize, int pdSize, String channel) { List<PlaceSearchInfoDTO> dtoList = new ArrayList<PlaceSearchInfoDTO>(); List<PlaceSearchInfo> placeSearchInfoList = placeSearchInfoDAO.queryPlaceSearchInfoListByCmt(provinceId, cityId, stage, 100); if (placeSearchInfoList != null && placeSearchInfoList.size() > 0) { for (PlaceSearchInfo placeSearchInfo : placeSearchInfoList) { // 初始化标签信息 initTags(placeSearchInfo); long shortId = placeSearchInfo.getPlaceId(); processAvgScore(placeSearchInfo); Map<String, Object> param = new HashMap<String, Object>(); param.put("placeId", shortId); param.put("isTicket", isTicket); param.put("channel", channel); param.put("startRows", 0); param.put("endRows", pdSize); List<ProductSearchInfo> productSearchInfoList = productSearchInfoDAO.queryProductSearchInfoByParam(param); PlaceSearchInfoDTO placeSearchInfoDTO = new PlaceSearchInfoDTO(); placeSearchInfoDTO.setPlaceSearchInfo(placeSearchInfo); placeSearchInfoDTO.setProductSearchInfoList(productSearchInfoList); dtoList.add(placeSearchInfoDTO); if (dtoList.size() == plSize) { break; } } } return dtoList; }