| File was renamed from zy-asrs-wms/src/main/java/com/zy/asrs/wms/controller/ManTagController.java |
| | |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class ManTagController extends BaseController { |
| | | public class TagController extends BaseController { |
| | | |
| | | @Autowired |
| | | private TagService tagService; |
| | |
| | | @Autowired |
| | | private TreeUtils treeUtils; |
| | | |
| | | @RequestMapping(value = "/manTag/{id}/auth") |
| | | @RequestMapping(value = "/tag/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(tagService.getById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/manTag/page/auth") |
| | | @RequestMapping(value = "/tag/page/auth") |
| | | @ManagerAuth |
| | | public R page(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/manTag/add/auth") |
| | | @RequestMapping(value = "/tag/add/auth") |
| | | @ManagerAuth |
| | | public R add(Tag tag) { |
| | | tagService.save(tag); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/manTag/update/auth") |
| | | @RequestMapping(value = "/tag/update/auth") |
| | | @ManagerAuth |
| | | public R update(Tag tag){ |
| | | if (Cools.isEmpty(tag) || null== tag.getId()){ |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/manTag/delete/auth") |
| | | @RequestMapping(value = "/tag/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/manTagQuery/auth") |
| | | @RequestMapping(value = "/tagQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | LambdaQueryWrapper<Tag> wrapper = new LambdaQueryWrapper<>(); |
| | |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping("/manTag/all/get/kv") |
| | | @RequestMapping("/tag/all/get/kv") |
| | | @ManagerAuth |
| | | public R getDataKV(@RequestParam(required = false) String condition) { |
| | | List<KeyValueVo> vos = new ArrayList<>(); |
| | |
| | | return R.ok().add(vos); |
| | | } |
| | | |
| | | @PostMapping(value = "/manTag/tree/auth") |
| | | @PostMapping(value = "/tag/tree/auth") |
| | | @ManagerAuth |
| | | public R tree(@RequestParam(required = false, defaultValue = "") String condition) throws IOException, ClassNotFoundException { |
| | | ArrayList<Map> tree = treeUtils.getTree(String.valueOf(getOriginTag().getId())); |