@Test public void testSelectPaging() throws Exception { List<Map<String, Object>> list = service.selectPaging(1, "123", null); for (Map<String,Object> map : list){ System.out.println(map.get("commodityName")); } }
@Override public List<Map<String, Object>> selectPaging(Integer categoryId, String commName, Long lastCommId) { if (null != categoryId && null != commName) { return type1(categoryId, commName, lastCommId); } else if (null == categoryId && null == commName) { return byType(1, lastCommId); } else if (null != categoryId && null == commName) { return byType(categoryId, lastCommId); } else if (null == categoryId && null != commName) { return type4(commName, lastCommId); } return null; }
CommodityServiceImpl implements ICommodityService { @Override public List<Map<String, Object>> selectPaging(Integer categoryId, String commName, Long lastCommId) { if (null != categoryId && null != commName) { return type1(categoryId, commName, lastCommId); } else if (null == categoryId && null == commName) { return byType(1, lastCommId); } else if (null != categoryId && null == commName) { return byType(categoryId, lastCommId); } else if (null == categoryId && null != commName) { return type4(commName, lastCommId); } return null; } }
CommodityServiceImpl implements ICommodityService { @Override public List<Map<String, Object>> selectPaging(Integer categoryId, String commName, Long lastCommId) { if (null != categoryId && null != commName) { return type1(categoryId, commName, lastCommId); } else if (null == categoryId && null == commName) { return byType(1, lastCommId); } else if (null != categoryId && null == commName) { return byType(categoryId, lastCommId); } else if (null == categoryId && null != commName) { return type4(commName, lastCommId); } return null; }  }
CommodityServiceImpl implements ICommodityService { @Override public List<Map<String, Object>> selectPaging(Integer categoryId, String commName, Long lastCommId) { if (null != categoryId && null != commName) { return type1(categoryId, commName, lastCommId); } else if (null == categoryId && null == commName) { return byType(1, lastCommId); } else if (null != categoryId && null == commName) { return byType(categoryId, lastCommId); } else if (null == categoryId && null != commName) { return type4(commName, lastCommId); } return null; }  @Override boolean addCommodity(Commoditys commod); @Override boolean delete(Long id); @Override Commoditys selectByid(Long id); @Override List<Commoditys> selectTypeAll(String commodType); @Override int selectCount(Integer commodityTypeId); @Override List<Commoditys> selectAll(); @Override List<Map<String, Object>> selectByStyle(Integer type, Long lastCommId); @Override List<Map<String, Object>> selectOnLottery(Integer page); @Override List<Map<String, Object>> selectOneOnLottery(Long commId); @Override Map<String, Object> selectCommodity(User user, Long commodId); List<Map<String, Object>> listMap3(); List<String> listUrl(Long commodId); Map<String, Object> mapBefore(Commoditys comh); List<Map<String, Object>> listPartake(Long commodId); Map<String, Object> map1(Long userAccountId); Map<String, Object> map2(Long commodId, Long userAccountId); @Override List<Map<String, Object>> selectPaging(Integer categoryId, String commName, Long lastCommId); List<Map<String, Object>> type1(Integer categoryId, String commName, Long lastCommId); List<Map<String, Object>> byType(Integer categoryId, Long lastCommId); List<Map<String, Object>> type4(String commName, Long lastCommId); List<Map<String, Object>> forPut(List<Commoditys> list); @Override List<Map<String, Object>> selectHeight(Long lastCommId); @Override Long generateNewRoundTime(); @Override List<Map<String, Object>> selectNewestAnnounceComm(Long lastCommId); @Override List<Map> selectThePastAnnouncedCommList(Long commId); @Override String getContent(Long commodityId); @Override long getMaxRoundTime(); @Override List<CommodityTemplate> getNotKeepRoundTemplate(long roundNum); @Override Commodity getNextCommodity(Long id); @Override Commodity groundNext(Long id); @Override Commoditys getDetails(Long id); @Override Commoditys selectOnSellCommodities(Long id); @Override List<CommodityAmount> selectAmounts(Long orderId); }
CommodityServiceImpl implements ICommodityService { @Override public List<Map<String, Object>> selectPaging(Integer categoryId, String commName, Long lastCommId) { if (null != categoryId && null != commName) { return type1(categoryId, commName, lastCommId); } else if (null == categoryId && null == commName) { return byType(1, lastCommId); } else if (null != categoryId && null == commName) { return byType(categoryId, lastCommId); } else if (null == categoryId && null != commName) { return type4(commName, lastCommId); } return null; }  @Override boolean addCommodity(Commoditys commod); @Override boolean delete(Long id); @Override Commoditys selectByid(Long id); @Override List<Commoditys> selectTypeAll(String commodType); @Override int selectCount(Integer commodityTypeId); @Override List<Commoditys> selectAll(); @Override List<Map<String, Object>> selectByStyle(Integer type, Long lastCommId); @Override List<Map<String, Object>> selectOnLottery(Integer page); @Override List<Map<String, Object>> selectOneOnLottery(Long commId); @Override Map<String, Object> selectCommodity(User user, Long commodId); List<Map<String, Object>> listMap3(); List<String> listUrl(Long commodId); Map<String, Object> mapBefore(Commoditys comh); List<Map<String, Object>> listPartake(Long commodId); Map<String, Object> map1(Long userAccountId); Map<String, Object> map2(Long commodId, Long userAccountId); @Override List<Map<String, Object>> selectPaging(Integer categoryId, String commName, Long lastCommId); List<Map<String, Object>> type1(Integer categoryId, String commName, Long lastCommId); List<Map<String, Object>> byType(Integer categoryId, Long lastCommId); List<Map<String, Object>> type4(String commName, Long lastCommId); List<Map<String, Object>> forPut(List<Commoditys> list); @Override List<Map<String, Object>> selectHeight(Long lastCommId); @Override Long generateNewRoundTime(); @Override List<Map<String, Object>> selectNewestAnnounceComm(Long lastCommId); @Override List<Map> selectThePastAnnouncedCommList(Long commId); @Override String getContent(Long commodityId); @Override long getMaxRoundTime(); @Override List<CommodityTemplate> getNotKeepRoundTemplate(long roundNum); @Override Commodity getNextCommodity(Long id); @Override Commodity groundNext(Long id); @Override Commoditys getDetails(Long id); @Override Commoditys selectOnSellCommodities(Long id); @Override List<CommodityAmount> selectAmounts(Long orderId);  }