From fee67ca8a0760315047a52fc4101a8f4f80b7a7f Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期一, 11 十一月 2024 15:02:54 +0800 Subject: [PATCH] 1 --- src/main/java/com/moon/server/controller/sys/MenuAuthController.java | 29 +++++++---------------------- 1 files changed, 7 insertions(+), 22 deletions(-) diff --git a/src/main/java/com/moon/server/controller/sys/MenuAuthController.java b/src/main/java/com/moon/server/controller/sys/MenuAuthController.java index d7a9b25..166e98f 100644 --- a/src/main/java/com/moon/server/controller/sys/MenuAuthController.java +++ b/src/main/java/com/moon/server/controller/sys/MenuAuthController.java @@ -18,12 +18,9 @@ import javax.servlet.http.HttpServletRequest; import java.util.List; -/** - * 鑿滃崟-鏉冮檺 - * @author WWW - */ @Api(tags = "杩愮淮绠$悊\\鑿滃崟鏉冮檺") @RestController +@SuppressWarnings("ALL") @RequestMapping("/menuAuth") public class MenuAuthController extends BaseController { @Autowired @@ -168,10 +165,8 @@ entity.setCreateUser(ue.getId()); } + permsService.clearPermsCache(); int count = menuAuthService.insert(entity); - if (count > 0) { - permsService.clearPermsCache(); - } return success(count); } catch (Exception ex) { @@ -194,10 +189,8 @@ } } + permsService.clearPermsCache(); int count = menuAuthService.inserts(list); - if (count > 0) { - permsService.clearPermsCache(); - } return success(count); } catch (Exception ex) { @@ -213,10 +206,8 @@ @GetMapping(value = "/delete") public ResponseMsg<Integer> delete(int id) { try { + permsService.clearPermsCache(); int count = menuAuthService.delete(id); - if (count > 0) { - permsService.clearPermsCache(); - } return success(count); } catch (Exception ex) { @@ -236,10 +227,8 @@ return fail("id鏁扮粍涓嶈兘涓虹┖", -1); } + permsService.clearPermsCache(); int count = menuAuthService.deletes(ids); - if (count > 0) { - permsService.clearPermsCache(); - } return success(count); } catch (Exception ex) { @@ -261,10 +250,8 @@ entity.setUpdateUser(ue.getId()); } + permsService.clearPermsCache(); int count = menuAuthService.update(entity); - if (count > 0) { - permsService.clearPermsCache(); - } return success(count); } catch (Exception ex) { @@ -288,10 +275,8 @@ } } + permsService.clearPermsCache(); int count = menuAuthService.updates(list); - if (count > 0) { - permsService.clearPermsCache(); - } return success(count); } catch (Exception ex) { -- Gitblit v1.9.3