Browse Source

null转空

CzRger 1 year ago
parent
commit
1208049ed6

+ 1 - 1
src/ship-test/entity/params-entity.js

@@ -10,6 +10,6 @@ module.exports = class ParamsEntity {
     this.remark = isValue(obj?.remark) ? obj.remark : null
     this.createTime = isValue(obj?.createTime) ? YMDHms(obj.createTime) : null
     this.updateTime = isValue(obj?.updateTime) ? YMDHms(obj.updateTime) : null
-    this.defaultCql = isValue(obj?.defaultCql) ? obj.defaultCql : null
+    this.defaultCql = isValue(obj?.defaultCql) ? obj.defaultCql : ''
   }
 }

+ 8 - 8
src/ship-test/entity/source-entity.js

@@ -9,13 +9,13 @@ module.exports = class SourceEntity {
     this.remark = isValue(obj?.remark) ? obj.remark : null
     this.createTime = isValue(obj?.createTime) ? YMDHms(obj.createTime) : null
     this.updateTime = isValue(obj?.updateTime) ? YMDHms(obj.updateTime) : null
-    this.tileUrl = isValue(obj?.tileUrl) ? obj.tileUrl : null
-    this.tileName = isValue(obj?.tileName) ? obj.tileName : null
-    this.wsUrl = isValue(obj?.wsUrl) ? obj.wsUrl : null
-    this.wsDataFlag = isValue(obj?.wsDataFlag) ? obj.wsDataFlag : null
-    this.historyWsUrl = isValue(obj?.historyWsUrl) ? obj.historyWsUrl : null
-    this.historyWsDataFlag = isValue(obj?.historyWsDataFlag) ? obj.historyWsDataFlag : null
-    this.historyWsOtherParams = isValue(obj?.historyWsOtherParams) ? obj.historyWsOtherParams : null
-    this.color = isValue(obj?.color) ? obj.color : null
+    this.tileUrl = isValue(obj?.tileUrl) ? obj.tileUrl : ''
+    this.tileName = isValue(obj?.tileName) ? obj.tileName : ''
+    this.wsUrl = isValue(obj?.wsUrl) ? obj.wsUrl : ''
+    this.wsDataFlag = isValue(obj?.wsDataFlag) ? obj.wsDataFlag : ''
+    this.historyWsUrl = isValue(obj?.historyWsUrl) ? obj.historyWsUrl : ''
+    this.historyWsDataFlag = isValue(obj?.historyWsDataFlag) ? obj.historyWsDataFlag : ''
+    this.historyWsOtherParams = isValue(obj?.historyWsOtherParams) ? obj.historyWsOtherParams : ''
+    this.color = isValue(obj?.color) ? obj.color : ''
   }
 }

+ 2 - 2
src/ship-test/entity/static-entity.js

@@ -9,7 +9,7 @@ module.exports = class StaticEntity {
     this.remark = isValue(obj?.remark) ? obj.remark : null
     this.createTime = isValue(obj?.createTime) ? YMDHms(obj.createTime) : null
     this.updateTime = isValue(obj?.updateTime) ? YMDHms(obj.updateTime) : null
-    this.color = isValue(obj?.color) ? obj.color : null
-    this.wkt = isValue(obj?.wkt) ? obj.wkt : null
+    this.color = isValue(obj?.color) ? obj.color : ''
+    this.wkt = isValue(obj?.wkt) ? obj.wkt : ''
   }
 }

+ 14 - 14
src/ship-test/entity/track-entity.js

@@ -7,19 +7,19 @@ module.exports = class ParamsEntity {
     this.id = isValue(obj?.id) ? obj.id : null
     this.createTime = isValue(obj?.createTime) ? YMDHms(obj.createTime) : null
     this.updateTime = isValue(obj?.updateTime) ? YMDHms(obj.updateTime) : null
-    this.trackKey = isValue(obj?.trackKey) ? obj.trackKey : null
-    this.trackPointKey = isValue(obj?.trackPointKey) ? obj.trackPointKey : null
-    this.trackWktKey = isValue(obj?.trackWktKey) ? obj.trackWktKey : null
-    this.trackSpeedKey = isValue(obj?.trackSpeedKey) ? obj.trackSpeedKey : null
-    this.trackCourseKey = isValue(obj?.trackCourseKey) ? obj.trackCourseKey : null
-    this.trackHeadKey = isValue(obj?.trackHeadKey) ? obj.trackHeadKey : null
-    this.trackTimeKey = isValue(obj?.trackTimeKey) ? obj.trackTimeKey : null
-    this.historyTrackKey = isValue(obj?.historyTrackKey) ? obj.historyTrackKey : null
-    this.historyTrackPointKey = isValue(obj?.historyTrackPointKey) ? obj.historyTrackPointKey : null
-    this.historyTrackWktKey = isValue(obj?.historyTrackWktKey) ? obj.historyTrackWktKey : null
-    this.historyTrackSpeedKey = isValue(obj?.historyTrackSpeedKey) ? obj.historyTrackSpeedKey : null
-    this.historyTrackCourseKey = isValue(obj?.historyTrackCourseKey) ? obj.historyTrackCourseKey : null
-    this.historyTrackHeadKey = isValue(obj?.historyTrackHeadKey) ? obj.historyTrackHeadKey : null
-    this.historyTrackTimeKey = isValue(obj?.historyTrackTimeKey) ? obj.historyTrackTimeKey : null
+    this.trackKey = isValue(obj?.trackKey) ? obj.trackKey : ''
+    this.trackPointKey = isValue(obj?.trackPointKey) ? obj.trackPointKey : ''
+    this.trackWktKey = isValue(obj?.trackWktKey) ? obj.trackWktKey : ''
+    this.trackSpeedKey = isValue(obj?.trackSpeedKey) ? obj.trackSpeedKey : ''
+    this.trackCourseKey = isValue(obj?.trackCourseKey) ? obj.trackCourseKey : ''
+    this.trackHeadKey = isValue(obj?.trackHeadKey) ? obj.trackHeadKey : ''
+    this.trackTimeKey = isValue(obj?.trackTimeKey) ? obj.trackTimeKey : ''
+    this.historyTrackKey = isValue(obj?.historyTrackKey) ? obj.historyTrackKey : ''
+    this.historyTrackPointKey = isValue(obj?.historyTrackPointKey) ? obj.historyTrackPointKey : ''
+    this.historyTrackWktKey = isValue(obj?.historyTrackWktKey) ? obj.historyTrackWktKey : ''
+    this.historyTrackSpeedKey = isValue(obj?.historyTrackSpeedKey) ? obj.historyTrackSpeedKey : ''
+    this.historyTrackCourseKey = isValue(obj?.historyTrackCourseKey) ? obj.historyTrackCourseKey : ''
+    this.historyTrackHeadKey = isValue(obj?.historyTrackHeadKey) ? obj.historyTrackHeadKey : ''
+    this.historyTrackTimeKey = isValue(obj?.historyTrackTimeKey) ? obj.historyTrackTimeKey : ''
   }
 }