From 9b4433fddf5b401edb0aace8a404ac733b122702 Mon Sep 17 00:00:00 2001 From: 田源 <tianyuan@vci-tech.com> Date: 星期四, 03 四月 2025 14:35:02 +0800 Subject: [PATCH] 添加非密字段显示 --- Source/BladeX-Tool/blade-starter-datascope/src/main/java/org/springblade/core/datascope/enums/DataScopeEnum.java | 78 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 78 insertions(+), 0 deletions(-) diff --git a/Source/BladeX-Tool/blade-starter-datascope/src/main/java/org/springblade/core/datascope/enums/DataScopeEnum.java b/Source/BladeX-Tool/blade-starter-datascope/src/main/java/org/springblade/core/datascope/enums/DataScopeEnum.java new file mode 100644 index 0000000..5f3e82d --- /dev/null +++ b/Source/BladeX-Tool/blade-starter-datascope/src/main/java/org/springblade/core/datascope/enums/DataScopeEnum.java @@ -0,0 +1,78 @@ +/* + * + * Copyright (c) 2018-2025, lengleng All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: lengleng (wangiegie@gmail.com) + * + */ +package org.springblade.core.datascope.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * 鏁版嵁鏉冮檺绫诲瀷 + * + * @author lengleng, Chill + */ +@Getter +@AllArgsConstructor +public enum DataScopeEnum { + /** + * 鍏ㄩ儴鏁版嵁 + */ + ALL(1, "鍏ㄩ儴"), + + /** + * 鏈汉鍙 + */ + OWN(2, "鏈汉鍙"), + + /** + * 鎵�鍦ㄦ満鏋勫彲瑙� + */ + OWN_DEPT(3, "鎵�鍦ㄦ満鏋勫彲瑙�"), + + /** + * 鎵�鍦ㄦ満鏋勫強瀛愮骇鍙 + */ + OWN_DEPT_CHILD(4, "鎵�鍦ㄦ満鏋勫強瀛愮骇鍙"), + + /** + * 鑷畾涔� + */ + CUSTOM(5, "鑷畾涔�"); + + /** + * 绫诲瀷 + */ + private final int type; + /** + * 鎻忚堪 + */ + private final String description; + + public static DataScopeEnum of(Integer dataScopeType) { + if (dataScopeType == null) { + return null; + } + DataScopeEnum[] values = DataScopeEnum.values(); + for (DataScopeEnum scopeTypeEnum : values) { + if (scopeTypeEnum.type == dataScopeType) { + return scopeTypeEnum; + } + } + return null; + } +} -- Gitblit v1.9.3