| | |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<Mat> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("matnr", condition); |
| | | wrapper.like("maktx", condition); |
| | | Page<Mat> page = matService.selectPage(new Page<>(0, 50), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (Mat mat : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", mat.getId()); |
| | | map.put("value", mat.getMaktx()); |
| | | map.put("value", mat.getMatnr()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |