2021与蓝度共同重构项目,服务端
liuhaonan
2022-10-26 c7be2ef037c5aebb0cd8f1f33e5fa934389e6083
ximon-admin/src/main/java/com/sandu/ximon/admin/controller/InterphoneHostSubController.java
@@ -17,17 +17,26 @@
    private PermissionConfig permissionConfig;
    private final InterphoneHostSubService interphoneHostSubService;
    /**
     * 主机绑定子机
     * @param map
     * @return
     */
    @PostMapping("/bind")
    public ResponseVO<Object> bind(@RequestBody Map map) {
        if (!permissionConfig.check(MenuEnum.INTER_PHONE_HOST_SUB_BINDING.getCode())) {
            return ResponseUtil.fail("缺少对应用户权限");
        }
        Integer hostId = (Integer) map.get("hostId");
        Integer subId = (Integer) map.get("subId");
        int hostId = Integer.parseInt(map.get("hostId").toString());
        int subId = Integer.parseInt(map.get("subId").toString());
        return ResponseUtil.success(interphoneHostSubService.bindHostSub(hostId, subId));
    }
    /**
     * 主机解绑子机
     * @param subId
     * @return
     */
    @PostMapping("/unbind/{subId}")
    public ResponseVO<Object> unbind(@PathVariable Integer subId) {
        if (!permissionConfig.check(MenuEnum.INTER_PHONE_HOST_SUB_UNBIND.getCode())) {