提交 abbef5bc 编写于 作者: O o2sword

内容管理脚本增加分页查询接口

上级 4d2a10cc
......@@ -257,7 +257,7 @@ public class ScriptAction extends StandardJaxrsAction {
ActionResult<List<ActionListPaging.Wo>> result = new ActionResult<>();
EffectivePerson effectivePerson = this.effectivePerson(request);
try {
result = new ActionListPaging().execute(effectivePerson, page, size);
result = ((ActionListPaging)proxy.getProxy(ActionListPaging.class)).execute(effectivePerson, page, size);
} catch (Exception e) {
logger.error(e, effectivePerson, request, null);
result.error(e);
......
......@@ -119,4 +119,23 @@ public class ScriptAnonymousAction extends StandardJaxrsAction {
}
asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
}
@JaxrsMethodDescribe(value = "分页列示Script对象.", action = ActionListPaging.class)
@POST
@Path("list/paging/{page}/size/{size}")
@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
@Consumes(MediaType.APPLICATION_JSON)
public void listPaging(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
@JaxrsParameterDescribe("分页") @PathParam("page") Integer page,
@JaxrsParameterDescribe("每页数量") @PathParam("size") Integer size) {
ActionResult<List<ActionListPaging.Wo>> result = new ActionResult<>();
EffectivePerson effectivePerson = this.effectivePerson(request);
try {
result = ((ActionListPaging)proxy.getProxy(ActionListPaging.class)).execute(effectivePerson, page, size);
} catch (Throwable th) {
th.printStackTrace();
result.error(th);
}
asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
}
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册