Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

返回的对象是空,是什么原因 #222

Open
gcg888 opened this issue May 26, 2020 · 2 comments
Open

返回的对象是空,是什么原因 #222

gcg888 opened this issue May 26, 2020 · 2 comments

Comments

@gcg888
Copy link

gcg888 commented May 26, 2020

生成的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);
}

@gcg888
Copy link
Author

gcg888 commented May 26, 2020

IPage courseIPage = courseMapper.selectPage(coursePage,wrapper); //获取到了值
return MessageResultUtils.getResults(courseIPage, CodeMsgEnum.SEARCH_SUCCESS); //返回到浏览器就是空值

@zhyusgethup
Copy link

去debug吧 感觉这个问题 debug不了几个栈. 别虚!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants