public class UserVO {
// 当前页码
private Integer currentPage;
// 每页显示条数
private Integer pageSize;
// 用户名
private String userName;
// 开始时间
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date startCreateTime;
// 结束时间
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date endCreateTime;
getter setter.....
解决方案
找到出错的位置(我的方法比较笨)
在web 层打印UserVO实体类
/** * 多条件查询 * @param userVO * @return */
@RequestMapping("/findUserCondition")
private ResponseResult findUserCondition(@RequestBody UserVO userVO) {
System.out.println(userVO);
PageInfo userCondition = userService.findUserCondition(userVO);
System.out.println(userVO);
return new ResponseResult(true,200,"多条件查询成功",userCondition);
}
在service层打印UserVO实体类
/** * 多条件查询 * @param userVO * @return */
@Override
public PageInfo findUserCondition(UserVO userVO) {
System.out.println(userVO);
PageHelper.startPage(userVO.getCurrentPage(),userVO.getPageSize());
System.out.println(userVO);
List<User> userList = userMapper.findUserCondition(userVO);
PageInfo<User> userPageInfo = new PageInfo<>(userList);
return userPageInfo;
}
运行Tomcat重新发送数据控制台显示如下
再查寻Mabatis对应的配置文件
版权说明 : 本文为转载文章, 版权归原作者所有 版权申明
原文链接 : https://blog.csdn.net/Junsunnyl/article/details/121779398
内容来源于网络,如有侵权,请联系作者删除!