From 3b574875cb5f4e1eab24bfedbeff4cd3c2b19ea5 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期三, 10 十一月 2021 10:07:28 +0800
Subject: [PATCH] update hutool 5.7.15 => 5.7.16 update okhttp 4.9.1 => 4.9.2 update spring-boot-admin 2.5.2 => 2.5.3 update redisson 3.16.3 => 3.16.4 update tlog 1.3.3 => 1.3.4

---
 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java
index 98236e9..c8f193a 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java
@@ -262,11 +262,11 @@
     @Override
     public String checkMenuNameUnique(SysMenu menu) {
         Long menuId = StringUtils.isNull(menu.getMenuId()) ? -1L : menu.getMenuId();
-        SysMenu info = getOne(new LambdaQueryWrapper<SysMenu>()
+        long count = count(new LambdaQueryWrapper<SysMenu>()
             .eq(SysMenu::getMenuName, menu.getMenuName())
             .eq(SysMenu::getParentId, menu.getParentId())
-            .last("limit 1"));
-        if (StringUtils.isNotNull(info) && info.getMenuId().longValue() != menuId.longValue()) {
+            .ne(SysMenu::getMenuId, menuId));
+        if (count > 0) {
             return UserConstants.NOT_UNIQUE;
         }
         return UserConstants.UNIQUE;

--
Gitblit v1.9.3