Commit 89d75236 authored by zhangyi's avatar zhangyi

update

parent 5e6579b6
...@@ -152,13 +152,16 @@ public class EnterpriseService { ...@@ -152,13 +152,16 @@ public class EnterpriseService {
public TableDataInfo dynamicPage(EnterpriseDynamicPageBody body) throws Exception { public TableDataInfo dynamicPage(EnterpriseDynamicPageBody body) throws Exception {
if (body.isVaildCid()) return new TableDataInfo(new ArrayList<>(), 0); if (body.isVaildCid()) return new TableDataInfo(new ArrayList<>(), 0);
Map<String, Object> map = dskOpenApiUtil.requestBody("/api/jsk/enterprise/dynamic", BeanUtil.beanToMap(body, false, false)); Map<String, Object> map = dskOpenApiUtil.requestBody("/api/jsk/enterprise/dynamic", BeanUtil.beanToMap(body, false, false));
//底层接口写死了pageSize为10,这里前端只要5条
// return dskOpenApiUtil.responsePage(map);
Integer code = MapUtils.getInteger(map, "code", 300); Integer code = MapUtils.getInteger(map, "code", 300);
Map data = MapUtils.getMap(map, "data", null); Map data = MapUtils.getMap(map, "data", null);
if (200 != code) throw new RuntimeException(); if (200 != code) throw new RuntimeException();
Integer count = MapUtils.getInteger(data, "totalCount", 0); Integer count = MapUtils.getInteger(data, "totalCount", 0);
List<Object> list = CommonUtils.assertAsArray(MapUtils.getObject(data, "list", "")); List<Object> list = CommonUtils.assertAsArray(MapUtils.getObject(data, "list", ""));
return new TableDataInfo(5 >= list.size() ? list.subList(0, 5) : list, count); return new TableDataInfo(body.getPageSize() <= list.size() ? list.subList(0, body.getPageSize()) : list, count);
} }
public R icInfo(EnterpriseIcInfoBody body) throws Exception { public R icInfo(EnterpriseIcInfoBody body) throws Exception {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment