|
@@ -77,30 +77,13 @@ public class ResponseUtil {
|
|
|
JSONObject dataJson = new JSONObject();
|
|
JSONObject dataJson = new JSONObject();
|
|
|
dataJson.put(B.code, ResultStatusCode.OK.getStatus());
|
|
dataJson.put(B.code, ResultStatusCode.OK.getStatus());
|
|
|
dataJson.put(B.message, "查询成功");
|
|
dataJson.put(B.message, "查询成功");
|
|
|
- if (iPage.getPageList() == null || iPage.getPageList().size() == 0) {
|
|
|
|
|
-// dataJson.put("rows", "");
|
|
|
|
|
-// dataJson.put("total", 0);
|
|
|
|
|
- dataJson.put(B.data, "");
|
|
|
|
|
- } else {
|
|
|
|
|
- dataJson.put(B.data,iPage); // 分页数据
|
|
|
|
|
-// dataJson.put(B.data,iPage.getPageList()); // 分页数据
|
|
|
|
|
-// Map pageMap = new HashMap();
|
|
|
|
|
-//
|
|
|
|
|
-// pageMap.put("rows", iPage.getRows());
|
|
|
|
|
-// // int total = listAll.size();
|
|
|
|
|
-// pageMap.put("total", iPage.getTotal());// 总记录数
|
|
|
|
|
-// int totalPage = iPage.getTotal() % iPage.getRows() == 0 ? (iPage.getTotal() / iPage.getRows()) : (iPage.getTotal() / iPage.getRows()) + 1;// 总页数
|
|
|
|
|
-// pageMap.put("totalPage", totalPage);
|
|
|
|
|
-// pageMap.put("currentPage", iPage.getPage());// 当前页
|
|
|
|
|
-// pageMap.put("numPerPage", iPage.getRows());// 每页数
|
|
|
|
|
-// pageMap.put("nextPage", totalPage - iPage.getPage() == 0 ? iPage.getPage() : iPage.getPage() + 1);// 下一页
|
|
|
|
|
-// pageMap.put("previousPage", iPage.getPage() - 0 == 1 ? iPage.getPage() : iPage.getPage() - 1);// 上一页
|
|
|
|
|
-// pageMap.put("hasPreviousPage", true);// 有上一页
|
|
|
|
|
-// pageMap.put("hasNextPage", true);// 有下一页
|
|
|
|
|
-// pageMap.put("firstPage", true);// 首页
|
|
|
|
|
-// pageMap.put("lastPage", true);// 尾页
|
|
|
|
|
-// dataJson.put("pageData",pageMap);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ dataJson.put(B.data,iPage); // 分页数据
|
|
|
|
|
+
|
|
|
|
|
+// if (iPage.getPageList() == null || iPage.getPageList().size() == 0) {
|
|
|
|
|
+// dataJson.put(B.data, "");
|
|
|
|
|
+// } else {
|
|
|
|
|
+// dataJson.put(B.data,iPage); // 分页数据
|
|
|
|
|
+// }
|
|
|
|
|
|
|
|
PrintWriter out;
|
|
PrintWriter out;
|
|
|
try {
|
|
try {
|