| | |
| | | package com.highdatas.mdm.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | |
| | | import com.highdatas.mdm.mapper.TableInfoMapper; |
| | | import com.highdatas.mdm.pojo.ActivitiStatus; |
| | | import com.highdatas.mdm.pojo.Operate; |
| | | import com.highdatas.mdm.pojo.Page; |
| | | import com.highdatas.mdm.pojo.Result; |
| | | import com.highdatas.mdm.service.IFlowsService; |
| | | import com.highdatas.mdm.service.IMaintainFieldService; |
| | |
| | | return Result.success(result); |
| | | } |
| | | |
| | | @Override |
| | | public Result getTotalFields(String tableName, Integer pageNo, Integer pageSize) { |
| | | Result totalFields = getTotalFields(tableName); |
| | | JSONObject result = (JSONObject) totalFields.getData(); |
| | | JSONArray list = result.getJSONArray("list"); |
| | | int total = list.size(); |
| | | Page page = new Page(total); |
| | | page.setPageSize(pageSize); |
| | | page.setPageNo(pageNo); |
| | | List<Object> subList = list.stream().skip(page.getBeginRecordNo_1()).limit(page.getPageSize()).collect(Collectors.toList()); |
| | | result.fluentPut("pages", page.getPageCount()); |
| | | result.fluentPut("current", pageNo); |
| | | result.fluentPut("size", pageSize); |
| | | result.fluentPut("total", page.getRecordCount()); |
| | | result.fluentPut("list", subList); |
| | | |
| | | return Result.success(result); |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | private List<SysField> packageFieldList(List<SysField> nowFields, List<SysField> maxFields) { |
| | | //原始的清除operate用于前端显示 |
| | | nowFields = nowFields.stream().map(sysField -> sysField.setOperate(null)).collect(Collectors.toList()); |