From 56c25bcb0dc03aae78aba23f32ebbf548b866332 Mon Sep 17 00:00:00 2001
From: xing <xingjs@qq.com>
Date: 星期三, 22 二月 2023 14:11:09 +0800
Subject: [PATCH] 20230221@xingjs@提交官网一张图相关内容接口

---
 src/main/java/com/lf/server/controller/sys/RoleMenuAuthController.java |   24 +++++++++++++++++++++++-
 1 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/lf/server/controller/sys/RoleMenuAuthController.java b/src/main/java/com/lf/server/controller/sys/RoleMenuAuthController.java
index b81321f..622e7d9 100644
--- a/src/main/java/com/lf/server/controller/sys/RoleMenuAuthController.java
+++ b/src/main/java/com/lf/server/controller/sys/RoleMenuAuthController.java
@@ -1,10 +1,11 @@
 package com.lf.server.controller.sys;
 
-import com.lf.server.aspect.SysLog;
+import com.lf.server.annotation.SysLog;
 import com.lf.server.controller.all.BaseController;
 import com.lf.server.entity.all.ResponseMsg;
 import com.lf.server.entity.sys.RoleMenuAuthEntity;
 import com.lf.server.entity.sys.UserEntity;
+import com.lf.server.service.all.PermsService;
 import com.lf.server.service.sys.RoleMenuAuthService;
 import com.lf.server.service.sys.TokenService;
 import io.swagger.annotations.Api;
@@ -30,6 +31,9 @@
 
     @Autowired
     TokenService tokenService;
+
+    @Autowired
+    PermsService permsService;
 
     @SysLog()
     @ApiOperation(value = "鏌ヨ璁板綍鏁�")
@@ -165,6 +169,9 @@
             }
 
             int count = roleMenuAuthService.insert(entity);
+            if (count > 0) {
+                permsService.clearPermsCache();
+            }
 
             return success(count);
         } catch (Exception ex) {
@@ -188,6 +195,9 @@
             }
 
             int count = roleMenuAuthService.inserts(list);
+            if (count > 0) {
+                permsService.clearPermsCache();
+            }
 
             return success(count);
         } catch (Exception ex) {
@@ -204,6 +214,9 @@
     public ResponseMsg<Integer> delete(int id) {
         try {
             int count = roleMenuAuthService.delete(id);
+            if (count > 0) {
+                permsService.clearPermsCache();
+            }
 
             return success(count);
         } catch (Exception ex) {
@@ -224,6 +237,9 @@
             }
 
             int count = roleMenuAuthService.deletes(ids);
+            if (count > 0) {
+                permsService.clearPermsCache();
+            }
 
             return success(count);
         } catch (Exception ex) {
@@ -246,6 +262,9 @@
             }
 
             int count = roleMenuAuthService.update(entity);
+            if (count > 0) {
+                permsService.clearPermsCache();
+            }
 
             return success(count);
         } catch (Exception ex) {
@@ -270,6 +289,9 @@
             }
 
             int count = roleMenuAuthService.updates(list);
+            if (count > 0) {
+                permsService.clearPermsCache();
+            }
 
             return success(count);
         } catch (Exception ex) {

--
Gitblit v1.9.3