healchow commented on code in PR #5558:
URL: https://github.com/apache/inlong/pull/5558#discussion_r950838491
##########
inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/ConsumptionController.java:
##########
@@ -64,9 +65,9 @@ public Response<ConsumptionSummary>
getSummary(ConsumptionQuery query) {
@GetMapping("/consumption/list")
@ApiOperation(value = "List data consumptions")
- public Response<PageInfo<ConsumptionListVo>> list(ConsumptionQuery query) {
+ public Response<PageResult<ConsumptionListVo>> list(ConsumptionQuery
query) {
query.setUsername(LoginUserUtils.getLoginUser().getName());
- return Response.success(consumptionService.list(query));
+ return Response.success(PageUtils.of(consumptionService.list(query)));
Review Comment:
Why not encapsulate it directly into PageResult when querying in the Service
layer?
There is one more conversion operation of PageUtils, which is not very
efficient.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]