日本免费高清视频-国产福利视频导航-黄色在线播放国产-天天操天天操天天操天天操|www.shdianci.com

學無先后,達者為師

網站首頁 編程語言 正文

springframework.jdbc.BadSqlGrammarException:

作者:步行cgn 更新時間: 2023-12-09 編程語言

今天遇到這個錯誤,發現在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;

原文鏈接:https://blog.csdn.net/weixin_51288065/article/details/132050840

  • 上一篇:沒有了
  • 下一篇:沒有了
欄目分類
最近更新