Browse Source

fix 建造者构造器参数无法获取问题

18339543638 3 năm trước cách đây
mục cha
commit
8386010ce9

+ 0 - 8
coffee-admin/src/test/java/com/coffee/admin/SpringBootApplicationTests.java

@@ -1,6 +1,5 @@
 package com.coffee.admin;
 
-import com.coffee.framework.test.controller.TestController;
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -19,13 +18,6 @@ import org.springframework.test.context.junit4.SpringRunner;
 @SpringBootTest(classes = AdminApplication.class)
 public class SpringBootApplicationTests {
 
-    @Autowired
-    public TestController testController;
 
-    @Test
-    public void init(){
-        long count = testController.getService().count();
-        Assert.assertEquals(count,1);
-    }
 
 }

+ 0 - 2
coffee-system/src/main/java/com/coffee/bus/registry/device/ClusterDeviceOperator.java

@@ -1,6 +1,5 @@
 package com.coffee.bus.registry.device;
 
-import cn.hutool.core.map.MapUtil;
 import cn.hutool.core.util.StrUtil;
 import com.coffee.bus.enums.NetPumpStatusEnum;
 import com.coffee.bus.registry.device.bean.DeviceCacheInfo;
@@ -8,7 +7,6 @@ import com.coffee.bus.registry.device.bean.DeviceOperator;
 import com.coffee.common.cache.ConfigStorage;
 import com.coffee.common.cache.value.Value;
 import lombok.AllArgsConstructor;
-import org.python.antlr.ast.Str;
 
 import java.util.Date;
 import java.util.*;

+ 13 - 0
coffee-system/src/main/java/com/coffee/bus/registry/device/bean/DeviceCacheInfo.java

@@ -76,4 +76,17 @@ public class DeviceCacheInfo implements CacheInfo {
 
     private DeviceCacheInfo() {
     }
+
+    private DeviceCacheInfo(String deviceId, String alias, Boolean enable, String tenantId, String usingId, Date startTime, NetPumpStatusEnum status, String patientCode, Integer mark, Boolean master) {
+        this.deviceId = deviceId;
+        this.alias = alias;
+        this.enable = enable;
+        this.tenantId = tenantId;
+        this.usingId = usingId;
+        this.startTime = startTime;
+        this.status = status;
+        this.patientCode = patientCode;
+        this.mark = mark;
+        this.master = master;
+    }
 }