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/AuthController.java | 26 ++++++-------------------- 1 files changed, 6 insertions(+), 20 deletions(-) diff --git a/src/main/java/com/moon/server/controller/sys/AuthController.java b/src/main/java/com/moon/server/controller/sys/AuthController.java index 89a3160..e5fab74 100644 --- a/src/main/java/com/moon/server/controller/sys/AuthController.java +++ b/src/main/java/com/moon/server/controller/sys/AuthController.java @@ -18,13 +18,9 @@ import javax.servlet.http.HttpServletRequest; import java.util.List; -/** - * 鏉冮檺琛� - * @author SWS - * @date 2022-09.28 - */ @Api(tags = "杩愮淮绠$悊\\鏉冮檺绠$悊") @RestController +@SuppressWarnings("ALL") @RequestMapping("/auth") public class AuthController extends BaseController { @Autowired @@ -139,10 +135,8 @@ entity.setCreateUser(ue.getId()); } + permsService.clearPermsCache(); int count = authService.insertAuth(entity); - if (count > 0) { - permsService.clearPermsCache(); - } return success(count); } catch (Exception ex) { @@ -165,10 +159,8 @@ } } + permsService.clearPermsCache(); int count = authService.insertAuths(list); - if (count > 0) { - permsService.clearPermsCache(); - } return success(count); } catch (Exception ex) { @@ -184,10 +176,8 @@ @GetMapping(value = "/deleteAuth") public ResponseMsg<Integer> deleteAuth(int id) { try { + permsService.clearPermsCache(); int count = authService.deleteAuth(id); - if (count > 0) { - permsService.clearPermsCache(); - } return success(count); } catch (Exception ex) { @@ -207,10 +197,8 @@ return fail("id鏁扮粍涓嶈兘涓虹┖", -1); } + permsService.clearPermsCache(); int count = authService.deleteAuths(ids); - if (count > 0) { - permsService.clearPermsCache(); - } return success(count); } catch (Exception ex) { @@ -232,10 +220,8 @@ entity.setUpdateUser(ue.getId()); } + permsService.clearPermsCache(); int count = authService.updateAuth(entity); - if (count > 0) { - permsService.clearPermsCache(); - } return success(count); } catch (Exception ex) { -- Gitblit v1.9.3