From 101a71970c4043571827e8c0d54a3b1e532fdc0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B1=AA=E4=BA=91=E6=98=8A?= Date: Mon, 3 Aug 2020 18:25:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=99=9A=E6=8B=9F=E5=B1=9E=E6=80=A7=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=A0=A1=E9=AA=8C=E5=8F=8A=E5=8F=82=E6=95=B0=E8=B5=8B?= =?UTF-8?q?=E5=80=BC=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/base/dynamic/DynamicEntity.java | 1 - .../base/enumutil/BlockSoftSwitchEnumUtil.java | 143 +++++++++++++++++++++ 2 files changed, 143 insertions(+), 1 deletion(-) diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/dynamic/DynamicEntity.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/dynamic/DynamicEntity.java index 91b8cd0..7488292 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/dynamic/DynamicEntity.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/dynamic/DynamicEntity.java @@ -5,7 +5,6 @@ import io.swagger.annotations.ApiParam; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.persistence.Transient; import java.io.Serializable; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockSoftSwitchEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockSoftSwitchEnumUtil.java index dd4bd75..97c8733 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockSoftSwitchEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockSoftSwitchEnumUtil.java @@ -918,4 +918,147 @@ public class BlockSoftSwitchEnumUtil { } + /** + * 脚本类型 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum BS_SCRIPT_TYPE { + MESSAGE_PROCESS(10, "报文处理","可用参数:transData,orginData"); + + private int value; + private String description; + private String scriptRule; + + private BS_SCRIPT_TYPE (int value, String description,String scriptRule) { + this.value = value; + this.description = description; + this.scriptRule = scriptRule; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + public String getScriptRule() { + return scriptRule; + } + + public static String valueOfDescription(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + return tmp; + } + + public static BS_SCRIPT_TYPE valueOf(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + return values()[i]; + } + } + return null; + } + + } + + /** + * 脚本语言 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum BS_SCRIPT_LANGUAGE { +// SPEL(10, "Spring表达式语言(SpEL)"), + JAVASCRIPT(20, "JavaScript(JS)"); + + private int value; + private String description; + + private BS_SCRIPT_LANGUAGE (int value, String description) { + this.value = value; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + return tmp; + } + + public static BS_SCRIPT_LANGUAGE valueOf(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + return values()[i]; + } + } + return null; + } + + } + + /** + * 脚本执行方式 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum BS_SCRIPT_EXECUTE_METHOD { + EXECUTE_SCRIPT(10, "执行脚本"), + EXECUTE_METHOD(20, "执行方法"), + EXECUTE_OBJECT_METHOD(30, "执行对象方法"); + + private int value; + private String description; + + private BS_SCRIPT_EXECUTE_METHOD (int value, String description) { + this.value = value; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + return tmp; + } + + public static BS_SCRIPT_EXECUTE_METHOD valueOf(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + return values()[i]; + } + } + return null; + } + + } + }