瀏覽代碼

fix:还原帮助手册接口

liujunchi 3 年之前
父節點
當前提交
7ca6f1d646

+ 8 - 12
cooleshow-user/user-admin/src/main/java/com/yonge/cooleshow/admin/controller/SysManualController.java

@@ -37,7 +37,11 @@ public class SysManualController extends BaseController {
     @Autowired
     private SysUserFeignService sysUserFeignService;
 
-
+    @ApiOperation(value = "查询操作手册")
+    @RequestMapping("/listMenuIds")
+    public Object listMenuIds() {
+        return succeed(sysManualService.listMenuIds());
+    }
 
     @ApiOperation(value = "查询操作手册")
     @RequestMapping("/list")
@@ -96,17 +100,9 @@ public class SysManualController extends BaseController {
     }
 
     @ApiOperation(value = "删除帮助手册")
-    @PostMapping("/remove/{id}")
-    public  HttpResponseResult<Boolean>  remove(@PathVariable("id") Long id) throws Exception {
-
-        if (id == null) {
-            return failed("参数错误");
-        }
-        SysManual manual = sysManualService.getById(id);
-        if (YesOrNoEnum.YES.getCode().equals(manual.getStatus().getCode())) {
-            throw  new BizException("启用状态下,不能删除");
-        }
-        sysManualService.removeById(id);
+    @PostMapping("/remove")
+    public Object remove(@RequestBody SysManual sysManual) throws Exception {
+        sysManualService.removeById(sysManual.getId());
         return succeed();
     }