From b5b1b94a9d21712a8dc5710bb2ac1c389d79cca1 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期五, 21 一月 2022 14:55:44 +0800
Subject: [PATCH] update springboot 2.6.2 => 2.6.3
---
ruoyi-common/src/main/java/com/ruoyi/common/enums/DataScopeType.java | 24 +++++++++++++++---------
1 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/enums/DataScopeType.java b/ruoyi-common/src/main/java/com/ruoyi/common/enums/DataScopeType.java
index f99413b..58bc761 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/enums/DataScopeType.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/enums/DataScopeType.java
@@ -6,15 +6,16 @@
/**
* 鏁版嵁鏉冮檺绫诲瀷
- *
+ * <p>
* 璇硶鏀寔 spel 妯℃澘琛ㄨ揪寮�
- *
+ * <p>
* 鍐呯疆鏁版嵁 user 褰撳墠鐢ㄦ埛 鍐呭鍙傝�� SysUser
- * 濡傞渶鎵╁睍鏁版嵁 闇�寰� SysUser 鍐呮敞鍏�
+ * 濡傞渶鎵╁睍鏁版嵁 鍙娇鐢� {@link com.ruoyi.common.helper.DataPermissionHelper} 鎿嶄綔
* 鍐呯疆鏈嶅姟 sdss 绯荤粺鏁版嵁鏉冮檺鏈嶅姟 鍐呭鍙傝�� SysDataScopeService
* 濡傞渶鎵╁睍鏇村鑷畾涔夋湇鍔� 鍙互鍙傝�� sdss 鑷缂栧啓
*
* @author Lion Li
+ * @version 3.5.0
*/
@Getter
@AllArgsConstructor
@@ -23,34 +24,39 @@
/**
* 鍏ㄩ儴鏁版嵁鏉冮檺
*/
- ALL("1", ""),
+ ALL("1", "", ""),
/**
* 鑷畾鏁版嵁鏉冮檺
*/
- CUSTOM("2", " #{#deptName} IN ( #{@sdss.getRoleCustom( #user.roleId )} ) "),
+ CUSTOM("2", " #{#deptName} IN ( #{@sdss.getRoleCustom( #user.roleId )} ) ", ""),
/**
* 閮ㄩ棬鏁版嵁鏉冮檺
*/
- DEPT("3", " #{#deptName} = #{#user.deptId} "),
+ DEPT("3", " #{#deptName} = #{#user.deptId} ", ""),
/**
* 閮ㄩ棬鍙婁互涓嬫暟鎹潈闄�
*/
- DEPT_AND_CHILD("4", " #{#deptName} IN ( #{@sdss.getDeptAndChild( #user.deptId )} )"),
+ DEPT_AND_CHILD("4", " #{#deptName} IN ( #{@sdss.getDeptAndChild( #user.deptId )} )", ""),
/**
* 浠呮湰浜烘暟鎹潈闄�
*/
- SELF("5", " #{#userName?:1} = #{#user.userId} ");
+ SELF("5", " #{#userName} = #{#user.userId} ", " 1 = 0 ");
private final String code;
/**
* 璇硶 閲囩敤 spel 妯℃澘琛ㄨ揪寮�
*/
- private final String sql;
+ private final String sqlTemplate;
+
+ /**
+ * 涓嶆弧瓒� sqlTemplate 鍒欏~鍏�
+ */
+ private final String elseSql;
public static DataScopeType findCode(String code) {
if (StringUtils.isBlank(code)) {
--
Gitblit v1.9.3