今天遇到这个错误,发现在controller中将 pageSize多加了一个分号,导致错误。
错误:map.put("pageSize","pageSize");多加了一个分号,而导致出现错误。
@RequestMapping("/workbench/clue/queryCountOfClueByCondition.do")
public @ResponseBody Object queryCountOfClueByCondition(int pageNo, int pageSize,Clue clue,HttpSession session){
User user =(User) session.getAttribute(Contants.SESSION_USER);
//封装参数
clue.setId(UUIDUtils.getUUID());
clue.setCreateBy(user.getId());
clue.setCreateTime(DateUtils.formatDateTime(new Date()));
Map<String, Object> map = new HashMap<>();
map.put("beginNo",(pageNo-1)*pageSize);
map.put("pageSize",pageSize);
map.put("clue",clue);
//调用service
List<Clue> clueList = clueService.queryClueByConditionForPage(map);
int totalRows = clueService.queryCountOfClueByCondition(map);
//根据查询结果,生成响应信息
Map<String, Object> retMap = new HashMap<>();
retMap.put("clueList",clueList);
retMap.put("totalRows",totalRows);
return retMap;