What I'm curious about is whether the paging processing logic should be written in the service layer or the controller layer.
Here, the paging process logic is the task of getting the totalCount from the database and getting the total number of pages through pageSize(offset).
I think the paging process is related to the view, I thought it could be handled in the controller.