@Override public List<Series> getRecommendAllProducts(Map<String, Object> map) { List<Series> list = seriesMapper.getAllSeries(); int length = list.size(); for (int i = 0; i < length; i++) { map.put("seriesId", list.get(i).getSeriesId()); list.get(i).setProducts(productMapper.getSeriesIdProducts(map)); } return list; }
@Override public List<Series> getRecommendProducts(Map<String, Object> map) { List<Series> list = new ArrayList<Series>(); String[] ids = map.get("SubjectIds").toString().split(","); for (int i = 0; i < ids.length; i++) { Series series = seriesMapper.selectByPrimaryKey(ids[i]); map.put("seriesId", series.getSeriesId()); series.setProducts(productMapper.getSeriesIdProducts(map)); list.add(series); } return list; }