search

Home  >  Q&A  >  body text

java - 救急!!!Error setting non null for parameter #1 with JdbcType null

SpringBoot mybatis gradle 项目,使用分页pageHelper时,报了这么个错误。

分析了很久,试了很多方法,都没弄好。

@Bean
    public PageHelper pageHelper(){
        PageHelper pageHelper = new PageHelper();
        Properties p = new Properties();
        p.setProperty("dialect","postgresql");
        p.setProperty("offsetAsPageNum", "true");
        p.setProperty("rowBoundsWithCount", "true");
        p.setProperty("reasonable", "true");
        p.setProperty("params","pageNum=start;pageSize=limit;pageSizeZero=zero");
        pageHelper.setProperties(p);
        return pageHelper;
    }
    
/**
 * 分页获取所有定单
 * @return
 */
@ResponseBody
@GetMapping(value = "list.json",produces = {"application/json;charset=UTF-8"})
public PageInfo<Map> orderList(Integer pageNum,Integer size){
    PageHelper.startPage(pageNum == null ? 1 : pageNum,size == null ? 10 : size);
    PageInfo<Map> list = amzOderService.getOrderList(baseQueryMap);
    return list;
}


大家讲道理大家讲道理2804 days ago2409

reply all(0)I'll reply

No reply
  • Cancelreply