Bladeren bron

删除菜单接口开发

WangChanghua 1 jaar geleden
bovenliggende
commit
3eb21b041d
1 gewijzigde bestanden met toevoegingen van 11 en 6 verwijderingen
  1. 11 6
      src/main/java/com/chelvc/cloud/admin/controller/MenuController.java

+ 11 - 6
src/main/java/com/chelvc/cloud/admin/controller/MenuController.java

@@ -13,12 +13,7 @@ import com.chelvc.framework.base.util.ErrorUtils;
 import org.apache.dubbo.config.annotation.DubboReference;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 /**
  * 菜单接口
@@ -80,4 +75,14 @@ public class MenuController {
     public List<MenuDTO> listMenuTrees(@Valid MenuQueryParam param) {
         return this.menuService.listMenuTrees(param);
     }
+
+    /**
+     * 批量删除菜单
+     *
+     * @param ids    菜单主键集合
+     */
+    @DeleteMapping("/menu")
+    public void deleteMenus(@RequestBody List<Long> ids) {
+        this.menuService.deleteMenus(ids);
+    }
 }