From 2f2115a19277620bb7d9ac4af1e3bfd7830d2e6c Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Fri, 12 Jul 2024 11:20:51 +0800
Subject: [PATCH] limit 是空时候,全表查询了,会导致内存溢出 默认设置20

---
 src/main/java/org/springblade/common/cache/SysCache.java |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/main/java/org/springblade/common/cache/SysCache.java b/src/main/java/org/springblade/common/cache/SysCache.java
index 6b0c53b..792babf 100644
--- a/src/main/java/org/springblade/common/cache/SysCache.java
+++ b/src/main/java/org/springblade/common/cache/SysCache.java
@@ -401,12 +401,8 @@
 				// 查询对应的区域编号code
 				Dept dept = deptService.getById(id);
 				if (null != dept) {
-					if (
-						(roleName.equals("mj") && dept.getDeptNature()==1) ||
-						(
-							(roleName.equals("wgy") || roleName.equals("wzcj")) && dept.getDeptNature()==2
-						)
-					){
+					if ((roleName.equals("mj") && dept.getDeptNature() == 1) ||
+						((roleName.equals("wgy") || roleName.equals("wzcj")) && dept.getDeptNature() == 2)) {
 						if (!AuthUtil.isAdministrator()) {
 							if (dept.getRegionCode() == null) {
 								return;

--
Gitblit v1.9.3