plus 分页========================================================================================================================================================================= public PageUtils finAllExpressSupplyList(Map<String,Object> params) throws Exception { QueryWrapper<WyExpressSupply> queryWrapper=new QueryWrapper<WyExpressSupply>(); String bsp_order_no = (String)params.get("bsp_order_no"); if(StringUtils.isNotEmpty(bsp_order_no)){ queryWrapper.eq("BSP_ORDER_NO",bsp_order_no); } IPage<WyExpressSupply> page = this.page(new Query<WyExpressSupply>().getPage(params),queryWrapper); PageUtils pageUtils = new PageUtils(page); return pageUtils; }
plus 控制器
PageUtils page = null; AjaxResult configVo= sysConfigService.getConfigKey("wy_action_type"); String v= configVo.get("msg").toString(); if(!v.equals("-1")) { try { page = wyExpressSupplyService.finAllExpressSupplyList(params); } catch (Exception e) { return AjaxResult.error("查询异常"); } }else{ return AjaxResult.error(Constant.MSG); } return AjaxResult.success(page);
mybaties 分页
@Override public IPage<WySupplyPrice> queryWySupplyPrice(Map params) { IPage<WySupplyPrice> page = new Page<WySupplyPrice>(Integer.valueOf(params.get("pageNum").toString()), Integer.valueOf(params.get("pageSize").toString())); IPage<WySupplyPrice> iPage=wySupplyPriceDao.queryWySupplyPrice(page,params); return iPage; }
mybaties控制器
public AjaxResult findWYSupplyPriceList(@RequestParam Map<String, Object> params) throws Exception { IPage<WySupplyPrice> iPage=wySupplyPriceService.queryWySupplyPrice(params); return AjaxResult.success(iPage); }