From 7f0570d20aac189f1b170942bd7100b281a1c824 Mon Sep 17 00:00:00 2001 From: ludc Date: 星期三, 26 四月 2023 00:07:37 +0800 Subject: [PATCH] 代码整合,新增codefixedcontroller --- Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/enumpack/SysIntegrationAuthorityTypeEnum.java | 128 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 128 insertions(+), 0 deletions(-) diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/enumpack/SysIntegrationAuthorityTypeEnum.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/enumpack/SysIntegrationAuthorityTypeEnum.java new file mode 100644 index 0000000..e8b4cb7 --- /dev/null +++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/enumpack/SysIntegrationAuthorityTypeEnum.java @@ -0,0 +1,128 @@ +package com.vci.ubcs.code.enumpack; + + +import com.vci.ubcs.starter.annotation.VciEnum; +import com.vci.ubcs.starter.web.constant.MdmEnumIdConstant; +import com.vci.ubcs.starter.web.enumpck.BaseEnum; + +/** + * Description: 绯荤粺闆嗘垚楠岃瘉鏂瑰紡 + * + * @author: LiHang + * @date: Created on 2022/3/7 + */ +@VciEnum(name = MdmEnumIdConstant.SYS_INTEGRATION_AUTHORITY_TYPE,text = "绯荤粺闆嗘垚楠岃瘉鏂瑰紡",description = "") +public enum SysIntegrationAuthorityTypeEnum implements BaseEnum { + /** + * 鐢ㄦ埛鏂瑰紡 + */ + LOGIN("login","鐢ㄦ埛鐧诲綍"), + /** + * 浠ょ墝鏂瑰紡 + */ + TOKEN("token","浠ょ墝"); + + /** + * 鏋氫妇鐨勫�� + */ + private String value; + + /** + * 鏋氫妇鏄剧ず鏂囨湰 + */ + private String text; + + /** + * 鑾峰彇鏋氫妇鍊� + * + * @return 鏋氫妇鍊� + */ + @Override + public String getValue() { + return value; + } + + /** + * 璁剧疆鏋氫妇鍊� + * + * @param value 鏋氫妇鍊� + */ + public void setValue(String value) { + this.value = value; + } + + /** + * 鑾峰彇鏋氫妇鏄剧ず鏂囨湰 + * + * @return 鏄剧ず鏂囨湰 + */ + @Override + public String getText() { + return text; + } + + /** + * 璁剧疆鏄剧ず鏂囨湰 + * + * @param text 鏄剧ず鏂囨湰 + */ + public void setText(String text) { + this.text = text; + } + + /** + * 鏋勯�犲嚱鏁� + * + * @param value 鍊� + * @param text 鏄剧ず鏂囨湰 + */ + private SysIntegrationAuthorityTypeEnum(String value, String text) { + this.value = value; + this.text = text; + } + + /** + * 鏍规嵁鍚嶇О鑾峰彇瀵瑰簲鐨勬灇涓惧�� + * + * @param text 鍚嶇О + * @return 鏋氫妇鍊� + */ + public static String getValueByText(String text) { + for (SysIntegrationAuthorityTypeEnum wenum : SysIntegrationAuthorityTypeEnum.values()) { + if (wenum.getText().equalsIgnoreCase(text)) { + return wenum.getValue(); + } + } + return ""; + } + + /** + * 鏍规嵁鏋氫妇鍊艰幏鍙栧悕绉� + * + * @param value 鏋氫妇鍊� + * @return 鍚嶇О + */ + public static String getTextByValue(String value) { + for (SysIntegrationAuthorityTypeEnum wenum : SysIntegrationAuthorityTypeEnum.values()) { + if (wenum.getValue().equalsIgnoreCase(value)) { + return wenum.getText(); + } + } + return ""; + } + + /** + * 鏍规嵁鏋氫妇鍊艰幏鍙栨灇涓惧璞� + * + * @param value 鏋氫妇鍊� + * @return 鏋氫妇瀵硅薄锛屼笉瀛樺湪鏃跺�欒繑鍥瀗ull + */ + public static SysIntegrationAuthorityTypeEnum forValue(String value) { + for (SysIntegrationAuthorityTypeEnum wenum : SysIntegrationAuthorityTypeEnum.values()) { + if (wenum.getValue().equalsIgnoreCase(value)) { + return wenum; + } + } + return null; + } +} -- Gitblit v1.9.3