diff --git a/northstar-api/src/main/java/org/dromara/northstar/common/model/DynamicParams.java b/northstar-api/src/main/java/org/dromara/northstar/common/model/DynamicParams.java index 4a20ed293276a01ee16f4b3cb3e7a89474f5293a..d2b2489e247df338865090ad3fdb91e6d45fe2fd 100644 --- a/northstar-api/src/main/java/org/dromara/northstar/common/model/DynamicParams.java +++ b/northstar-api/src/main/java/org/dromara/northstar/common/model/DynamicParams.java @@ -6,6 +6,7 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Objects; +import java.util.Optional; import org.dromara.northstar.common.SettingOptionsProvider; import org.dromara.northstar.common.constant.FieldType; @@ -70,7 +71,7 @@ public abstract class DynamicParams { boolean required = anno.required(); Object value; try { - value = ReflectionUtil.getFieldValue(this, f.getName()); + value = Optional.ofNullable(ReflectionUtil.getFieldValue(this, f.getName())).orElse("").toString(); } catch (NoSuchFieldException | IllegalAccessException e) { log.warn(f.getName() + "字段获取失败", e); value = null; diff --git a/northstar-api/src/test/java/org/dromara/northstar/common/model/DynamicParamsTest.java b/northstar-api/src/test/java/org/dromara/northstar/common/model/DynamicParamsTest.java index 45544f3d94f0c8fad59fa4ea491b2af44538a58e..35c1d0cb2cc5ff934818bed77f74c21e9ec806fd 100644 --- a/northstar-api/src/test/java/org/dromara/northstar/common/model/DynamicParamsTest.java +++ b/northstar-api/src/test/java/org/dromara/northstar/common/model/DynamicParamsTest.java @@ -28,9 +28,9 @@ class DynamicParamsTest { Map resultMap = params.getMetaInfo(); assertThat(resultMap).hasSize(3); - assertThat(resultMap.get("actionInterval").getValue()).isEqualTo(60); + assertThat(resultMap.get("actionInterval").getValue()).isEqualTo("60"); assertThat(resultMap.get("priceType").getValue()).isEqualTo("OPP_PRICE"); - assertThat(resultMap.get("showHedge").getValue()).isEqualTo(false); + assertThat(resultMap.get("showHedge").getValue()).isEqualTo("false"); } @Data diff --git a/northstar-api/src/test/java/org/dromara/northstar/gateway/GatewayMetaProviderTest.java b/northstar-api/src/test/java/org/dromara/northstar/gateway/GatewayMetaProviderTest.java index 572cd805008b85f8780b0d7ca9d37e12c288a534..ab7302d58885a950170070bcffdcde2a952474e2 100644 --- a/northstar-api/src/test/java/org/dromara/northstar/gateway/GatewayMetaProviderTest.java +++ b/northstar-api/src/test/java/org/dromara/northstar/gateway/GatewayMetaProviderTest.java @@ -64,7 +64,7 @@ class GatewayMetaProviderTest { void testResolve() throws Exception { Map fieldMap = ((DynamicParams)mockSettings).getMetaInfo(); - assertThat(fieldMap.get("openSpreadRate").getValue()).isEqualTo(1D); + assertThat(fieldMap.get("openSpreadRate").getValue()).isEqualTo("1.0"); assertThat(fieldMap.get("indicatorSymbol").getValue()).isEqualTo("test1"); fieldMap.get("openSpreadRate").setValue(5D); diff --git a/northstar-monitor/electron-egg/package.json b/northstar-monitor/electron-egg/package.json index a47374759aedca2d0abbe6bfe148d6a8e18604f6..dcc8aa3b37f3c941dcac31c510ae5101b1fdea6d 100644 --- a/northstar-monitor/electron-egg/package.json +++ b/northstar-monitor/electron-egg/package.json @@ -1,6 +1,6 @@ { "name": "northstar-desktop", - "version": "7.3.0-RC2", + "version": "7.3.0", "description": "A fast, desktop software development framework", "main": "main.js", "scripts": { diff --git a/northstar-monitor/package-lock.json b/northstar-monitor/package-lock.json index d9e339715465bc484b0bb8b6f86345da9c810ad3..c74418af5deb0305b979480c4d88fc1ad3bc702d 100644 --- a/northstar-monitor/package-lock.json +++ b/northstar-monitor/package-lock.json @@ -1,6 +1,6 @@ { "name": "northstar-monitor", - "version": "7.3.0-RC2", + "version": "7.3.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/northstar-monitor/package.json b/northstar-monitor/package.json index 18edb1cd486bad414b56c2b8129d546a4de2d255..bc122ae5e2d3c777691c046c26201c12f21542cd 100644 --- a/northstar-monitor/package.json +++ b/northstar-monitor/package.json @@ -1,6 +1,6 @@ { "name": "northstar-monitor", - "version": "7.3.0-RC2", + "version": "7.3.0", "private": true, "main": "electron/main.js", "scripts": { diff --git a/northstar-monitor/src/components/ModuleForm.vue b/northstar-monitor/src/components/ModuleForm.vue index 05c0e36d1b1394a362e7fbbf8770e98ff084a0ac..23efa816c524c074a91199990853e745e4e2fb50 100644 --- a/northstar-monitor/src/components/ModuleForm.vue +++ b/northstar-monitor/src/components/ModuleForm.vue @@ -127,16 +127,16 @@ @@ -148,10 +148,10 @@ {{ param.unit }} diff --git a/pom.xml b/pom.xml index c33f4cde1acfbb0f7a74a47a6856d8ccb8cb7efd..0691aa9a7daf15f5462a023c9723d3dada4979cf 100644 --- a/pom.xml +++ b/pom.xml @@ -17,7 +17,7 @@ https://gitee.com/dromara/northstar - 7.3.0-RC2 + 7.3.0 21 -Dfile.encoding=UTF-8 UTF-8