public static ListCollStringToIntegerLst(List inList){ List iList =new ArrayList (inList.size()); CollectionUtils.collect(inList, new Transformer(){ public java.lang.Object transform(java.lang.Object input){ return new Integer((String)input); } } ,iList ); return iList; } /** * 分页按条件查询权限列表 * * @param keywords * @return */ @RequestMapping(value = "/getByCondition2", method = { RequestMethod.GET, RequestMethod.POST }) public @ResponseBody String getByCondition2(String beginTime, String endTime,String privilegePersonsList,int startRow,int pageSize) { List privilegePersonLongs= new ArrayList (); String[] split = privilegePersonsList.split(","); List privilegePersons= Arrays.asList(split); if (privilegePersonLongs!=null) { List list =service.selectByCondition(beginTime,endTime, ListUtil.fromStringToLongList(privilegePersons),startRow,pageSize); Page page = new Page (service.countByConditions()); if (list.size() != 0) { ResultVO result = new ResultVO (); result.setLists(list); result.setPage(page); return result.toString(); } } return ""; }
public static ListCollStringToIntegerLst(List inList){ List iList =new ArrayList (inList.size()); CollectionUtils.collect(inList, new Transformer(){ public java.lang.Object transform(java.lang.Object input){ return new Integer((String)input); } } ,iList ); return iList; }