From 5ca038d888922e93bf45c7bd37f3c6dce849dcff Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期五, 24 十二月 2021 11:36:02 +0800 Subject: [PATCH] update 调整监控依赖 从 common 迁移到 framework --- ruoyi-common/src/main/java/com/ruoyi/common/enums/DataScopeType.java | 20 +++++++++++++------- 1 files changed, 13 insertions(+), 7 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..7cf3d5e 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 @@ -10,11 +10,12 @@ * 璇硶鏀寔 spel 妯℃澘琛ㄨ揪寮� * * 鍐呯疆鏁版嵁 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