管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2022-10-25 4ddfd502023662f6d25c4be416d88751e206d91a
src/main/java/com/lf/server/controller/sys/MenuController.java
@@ -7,6 +7,7 @@
import com.lf.server.entity.sys.MenuEntity;
import com.lf.server.entity.sys.UserEntity;
import com.lf.server.helper.StringHelper;
import com.lf.server.service.all.PermsService;
import com.lf.server.service.sys.MenuService;
import com.lf.server.service.sys.TokenService;
import io.swagger.annotations.Api;
@@ -34,6 +35,9 @@
    @Autowired
    TokenService tokenService;
    @Autowired
    PermsService permsService;
    @SysLog()
    @ApiOperation(value = "插入一条")
    @ApiImplicitParams({
@@ -48,6 +52,9 @@
            }
            int count = menuService.insertMenu(entity);
            if (count > 0) {
                permsService.clearPermsCache();
            }
            return success(count);
        } catch (Exception ex) {
@@ -71,6 +78,9 @@
            }
            int count = menuService.insertMenus(list);
            if (count > 0) {
                permsService.clearPermsCache();
            }
            return success(count);
        } catch (Exception ex) {
@@ -87,6 +97,9 @@
    public ResponseMsg<Integer> deleteMenu(int id) {
        try {
            int count = menuService.deleteMenu(id);
            if (count > 0) {
                permsService.clearPermsCache();
            }
            return success(count);
        } catch (Exception ex) {
@@ -107,6 +120,9 @@
            }
            int count = menuService.deleteMenus(ids);
            if (count > 0) {
                permsService.clearPermsCache();
            }
            return success(count);
        } catch (Exception ex) {
@@ -129,6 +145,9 @@
            }
            int count = menuService.updateMenu(entity);
            if (count > 0) {
                permsService.clearPermsCache();
            }
            return success(count);
        } catch (Exception ex) {
@@ -153,6 +172,9 @@
            }
            int count = menuService.updateMenus(list);
            if (count > 0) {
                permsService.clearPermsCache();
            }
            return success(count);
        } catch (Exception ex) {