| | |
| | | @Autowired |
| | | private TreeUtils treeUtils; |
| | | |
| | | @RequestMapping(value = "/tag/list/pda/auth") |
| | | @ManagerAuth |
| | | public R pdaList(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)Long parentId){ |
| | | EntityWrapper<Tag> wrapper = new EntityWrapper<>(); |
| | | wrapper.eq("parent_id", parentId==null?getOriginTag().getId():parentId); |
| | | wrapper.orderBy("sort"); |
| | | List<Tag> tags = tagService.selectList(wrapper); |
| | | return R.ok().add(tags); |
| | | } |
| | | |
| | | @RequestMapping(value = "/tag/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | |
| | | for (Tag tag : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", tag.getId()); |
| | | map.put("value", tag.getUuid() + "(" + tag.getName() + ")"); |
| | | map.put("value", tag.getName()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |