public Map<String,Object> selectPage(Integer pageNum, Integer pageSize,String username,String email,String address) { // 拼接sql username = "%"+username+"%"; email = "%"+email+"%"; address = "%"+address+"%"; // 计算当前页 pageNum = (pageNum - 1) * pageSize; List<User> data = userMapper.selectPage(pageNum, pageSize,username,email,address); Integer total = userMapper.selectTotal(); /* data 存放json数据 total 记录整个表的总条数 */ Map<String,Object> map = new HashMap<>(); map.put("data",data); map.put("total",total); return map; }
标签:username,map,pageNum,分页,菜鸟,手动,total,data,email From: https://www.cnblogs.com/qijiangforever/p/17418880.html