Open gcg888 opened 4 years ago
生成的controller,返回对象都是空,是什么原因。
{ "STATUS": "1", -"ITEMS": { -"records": [ { }, { }, { }, { }, { }, { }, { }, { }, { }, { } ], "total": 36, "size": 10, "current": 1, "pages": 4 }, "BUSINESSSTATUS": "", "MESSAGE": "查询成功" } 其实service是取到值的
@GetMapping @ApiOperation(value = "获取全部",notes = "返回分页过后的数据",httpMethod = "GET") @ApiImplicitParams({ @ApiImplicitParam(name = "page",value = "查询页码", paramType = "query",dataType = "Integer",defaultValue = "1"), @ApiImplicitParam(name = "pageSize",value = "每页数据量", paramType = "query",dataType = "Integer",defaultValue = "10") }) public Map<CodeMsgEnum, Object> list(@ApiIgnore @RequestParam Map<String, Object> params) { Page coursePage = new Query<>(params); QueryWrapper wrapper = new QueryWrapper<>(); IPage courseIPage = courseMapper.selectPage(coursePage,wrapper); return MessageResultUtils.getResults(courseIPage, CodeMsgEnum.SEARCH_SUCCESS); }
IPage courseIPage = courseMapper.selectPage(coursePage,wrapper); //获取到了值 return MessageResultUtils.getResults(courseIPage, CodeMsgEnum.SEARCH_SUCCESS); //返回到浏览器就是空值
去debug吧 感觉这个问题 debug不了几个栈. 别虚!
生成的controller,返回对象都是空,是什么原因。
{ "STATUS": "1", -"ITEMS": { -"records": [ { }, { }, { }, { }, { }, { }, { }, { }, { }, { } ], "total": 36, "size": 10, "current": 1, "pages": 4 }, "BUSINESSSTATUS": "", "MESSAGE": "查询成功" } 其实service是取到值的
@GetMapping @ApiOperation(value = "获取全部",notes = "返回分页过后的数据",httpMethod = "GET") @ApiImplicitParams({ @ApiImplicitParam(name = "page",value = "查询页码", paramType = "query",dataType = "Integer",defaultValue = "1"), @ApiImplicitParam(name = "pageSize",value = "每页数据量", paramType = "query",dataType = "Integer",defaultValue = "10") }) public Map<CodeMsgEnum, Object> list(@ApiIgnore @RequestParam Map<String, Object> params) { Page coursePage = new Query<>(params); QueryWrapper wrapper = new QueryWrapper<>();
IPage courseIPage = courseMapper.selectPage(coursePage,wrapper);
return MessageResultUtils.getResults(courseIPage, CodeMsgEnum.SEARCH_SUCCESS);
}