TRX vor 1 Jahr
Ursprung
Commit
771c73c1ea

+ 1 - 4
src/main/java/com/zswl/dataservice/controller/openApi/SystemTimeController.java

@@ -3,11 +3,9 @@ package com.zswl.dataservice.controller.openApi;
 import com.zswl.dataservice.model.openApi.SystemTimeModel;
 import com.zswl.dataservice.model.openApi.SystemTimeParam;
 import com.zswl.dataservice.service.openApi.business.SystemTimeService;
-import com.zswl.dataservice.utils.HttpUtils;
 import com.zswl.dataservice.utils.result.ResultContent;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.tags.Tag;
-import jakarta.servlet.http.HttpServletRequest;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.MediaType;
@@ -33,8 +31,7 @@ public class SystemTimeController {
 
     @Operation(summary = "获取服务器时间接口")
     @PostMapping(value = "serverTime", consumes = MediaType.APPLICATION_JSON_VALUE)
-    public ResultContent<SystemTimeModel> serverTime(HttpServletRequest request,@RequestBody SystemTimeParam param) {
-//        SystemTimeParam param = HttpUtils.toBean(request, SystemTimeParam.class);
+    public ResultContent<SystemTimeModel> serverTime(@RequestBody SystemTimeParam param) {
 
         return systemTimeService.serverTime(param);
     }

+ 1 - 1
src/main/java/com/zswl/dataservice/domain/mqtt/GateWayInfo.java

@@ -31,7 +31,7 @@ public class GateWayInfo extends SuperEntity {
     private String ip;
 
     @Schema(description = "网关在线状态")
-    OnLineState onLineState;
+    private OnLineState onLineState;
 
     @Schema(description = "所属项目")
     @DBRef(lazy = true)

+ 2 - 2
src/main/java/com/zswl/dataservice/domain/mqtt/MqttInfo.java

@@ -30,10 +30,10 @@ public class MqttInfo extends SuperEntity {
     @Schema(description = "mqtt端口")
     private String brokerPort;
 
-    @Schema(description = "mqtt用户名")
+    @Schema(description = "管理员mqtt用户名")
     private String userName;
 
-    @Schema(description = "密码")
+    @Schema(description = "管理员密码")
     private String password;
 
     @Schema(description = "标记这个服务器的地址的名称,如:重庆、贵阳、成都")

+ 3 - 2
src/main/java/com/zswl/dataservice/service/mqtt/GateWayInfoService.java

@@ -86,7 +86,7 @@ public class GateWayInfoService extends SuperService {
      * @param param
      * @return
      */
-    public ResultContent addGateWayInfo(GateWayInfoAddParam param) {
+    public ResultContent<GateWayInfo> addGateWayInfo(GateWayInfoAddParam param) {
         initDefaultUser(param);
         GateWayInfo gateWayInfo = gateWayInfoDao.findTopByGateWayId(param.getGateWayId());
         if (ObjectUtils.isEmpty(gateWayInfo)) {
@@ -105,7 +105,7 @@ public class GateWayInfoService extends SuperService {
         log.info("网关注册成功");
         // 通知同步
         deviceSyncFullCardService.noticeSyncGateWay(gateWayInfo);
-        return ResultContent.buildSuccess();
+        return ResultContent.buildSuccess(gateWayInfo);
     }
 
     /**
@@ -119,6 +119,7 @@ public class GateWayInfoService extends SuperService {
         if (ObjectUtils.isEmpty(projectInfo)) {
             return ResultContent.buildFail(String.format("分组不存在:%s", param.getProjectInfoCode()));
         }
+        // 添加网关信息
         addGateWayInfo(param);
 
         // 给网关分配个mqtt账号

+ 0 - 2
src/main/java/com/zswl/dataservice/service/openApi/OpenApiVerifyService.java

@@ -22,7 +22,6 @@ import com.zswl.dataservice.utils.net.IPUtil;
 import com.zswl.dataservice.utils.os.SystemUtil;
 import com.zswl.dataservice.utils.result.ResultContent;
 import jakarta.servlet.http.HttpServletRequest;
-import jakarta.servlet.http.HttpServletRequestWrapper;
 import jakarta.servlet.http.HttpServletResponse;
 import lombok.SneakyThrows;
 import lombok.extern.slf4j.Slf4j;
@@ -36,7 +35,6 @@ import org.springframework.stereotype.Service;
 import org.springframework.web.context.request.RequestContextHolder;
 import org.springframework.web.context.request.ServletRequestAttributes;
 import org.springframework.web.servlet.ModelAndView;
-import org.springframework.web.util.ContentCachingRequestWrapper;
 import org.springframework.web.util.ContentCachingResponseWrapper;
 
 import java.io.PrintWriter;

+ 1 - 1
src/main/java/com/zswl/dataservice/utils/test/TestAddUser.java

@@ -23,7 +23,7 @@ public class TestAddUser {
     public static void main(String[] args) {
         try {
             log.info("-------------------- 开始 --------------------------");
-            JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://192.168.0.104:1098/jmxrmi");
+            JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://192.168.0.106:1098/jmxrmi");
             @Cleanup JMXConnector connector = JMXConnectorFactory.connect(url, null);
             connector.connect();
             System.out.println("连接成功..............");