| | |
| | | public R query(String condition) { |
| | | EntityWrapper<DocType> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("doc_name", condition); |
| | | Page<DocType> page = docTypeService.selectPage(new Page<>(0, 10), wrapper); |
| | | wrapper.eq("status", 1); |
| | | Page<DocType> page = docTypeService.selectPage(new Page<>(0, 30), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (DocType docType : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", docType.getDocId()); |
| | | map.put("value", docType.getDocName()); |
| | | map.put("type","docType"); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |