From 022ecc2c0a1b0c7459f40ce4a32f1c6bfd0425bb Mon Sep 17 00:00:00 2001
From: WenG <450292408@qq.com>
Date: Mon, 7 Sep 2020 12:53:44 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../main/java/com/cm/smartgate/TestDemo.java | 2 +-
.../cm/smartgate/pojo/dtos/SmartGateDTO.java | 36 +++++++++++++++++++
.../cm/smartgate/pojo/vos/SmartGateVO.java | 36 +++++++++++++++++++
.../main/java/netmanager/lib/PlatUtils.java | 4 +--
.../mapper/smartgate/smartgate-mapper.xml | 22 ++++++++++++
.../templates/smartgate/list-smartgate.html | 9 +++++
.../templates/smartgate/save-smartgate.html | 18 ++++++++++
.../templates/smartgate/update-smartgate.html | 18 ++++++++++
8 files changed, 142 insertions(+), 3 deletions(-)
diff --git a/cloud-hardware-smart-gate/src/main/java/com/cm/smartgate/TestDemo.java b/cloud-hardware-smart-gate/src/main/java/com/cm/smartgate/TestDemo.java
index 35c8cbe..f7f9699 100644
--- a/cloud-hardware-smart-gate/src/main/java/com/cm/smartgate/TestDemo.java
+++ b/cloud-hardware-smart-gate/src/main/java/com/cm/smartgate/TestDemo.java
@@ -23,7 +23,7 @@ public class TestDemo {
public static String ry_net_library_name = "netmanager";
public void execute() {
- NetLib instance = (NetLib) Native.loadLibrary(PlatUtils.sdk_plat_getLoadLibrary("", ry_net_library_name), NetLib.class);
+ NetLib instance = (NetLib) Native.loadLibrary(PlatUtils.sdk_plat_getLoadLibrary("D:\\develop\\java_libs\\net_manager_libs\\", ry_net_library_name), NetLib.class);
instance.Net_Init(null, null);
Scanner sc = new Scanner(System.in);
diff --git a/cloud-hardware-smart-gate/src/main/java/com/cm/smartgate/pojo/dtos/SmartGateDTO.java b/cloud-hardware-smart-gate/src/main/java/com/cm/smartgate/pojo/dtos/SmartGateDTO.java
index 8fcb234..04b811f 100644
--- a/cloud-hardware-smart-gate/src/main/java/com/cm/smartgate/pojo/dtos/SmartGateDTO.java
+++ b/cloud-hardware-smart-gate/src/main/java/com/cm/smartgate/pojo/dtos/SmartGateDTO.java
@@ -28,6 +28,12 @@ public class SmartGateDTO implements Serializable {
private String smartGateSummary;
@ApiModelProperty(name = "smartGateIpAddress", value = "ip地址")
private String smartGateIpAddress;
+ @ApiModelProperty(name = "smartGatePort", value = "端口")
+ private String smartGatePort;
+ @ApiModelProperty(name = "smartGateUsername", value = "用户名")
+ private String smartGateUsername;
+ @ApiModelProperty(name = "smartGatePassword", value = "密码")
+ private String smartGatePassword;
@ApiModelProperty(name = "gmtCreate", value = "创建时间")
private String gmtCreate;
@ApiModelProperty(name = "onlineState", value = "在线状态")
@@ -75,6 +81,30 @@ public class SmartGateDTO implements Serializable {
this.smartGateIpAddress = smartGateIpAddress;
}
+ public String getSmartGatePort() {
+ return smartGatePort == null ? "" : smartGatePort.trim();
+ }
+
+ public void setSmartGatePort(String smartGatePort) {
+ this.smartGatePort = smartGatePort;
+ }
+
+ public String getSmartGateUsername() {
+ return smartGateUsername == null ? "" : smartGateUsername.trim();
+ }
+
+ public void setSmartGateUsername(String smartGateUsername) {
+ this.smartGateUsername = smartGateUsername;
+ }
+
+ public String getSmartGatePassword() {
+ return smartGatePassword == null ? "" : smartGatePassword.trim();
+ }
+
+ public void setSmartGatePassword(String smartGatePassword) {
+ this.smartGatePassword = smartGatePassword;
+ }
+
public String getGmtCreate() {
return gmtCreate == null ? "" : gmtCreate.trim();
}
@@ -112,6 +142,12 @@ public class SmartGateDTO implements Serializable {
.append(smartGateSummary).append('\"');
sb.append(",\"smartGateIpAddress\":\"")
.append(smartGateIpAddress).append('\"');
+ sb.append(",\"smartGatePort\":\"")
+ .append(smartGatePort).append('\"');
+ sb.append(",\"smartGateUsername\":\"")
+ .append(smartGateUsername).append('\"');
+ sb.append(",\"smartGatePassword\":\"")
+ .append(smartGatePassword).append('\"');
sb.append(",\"gmtCreate\":\"")
.append(gmtCreate).append('\"');
sb.append(",\"onlineState\":")
diff --git a/cloud-hardware-smart-gate/src/main/java/com/cm/smartgate/pojo/vos/SmartGateVO.java b/cloud-hardware-smart-gate/src/main/java/com/cm/smartgate/pojo/vos/SmartGateVO.java
index 87d386b..53c9278 100644
--- a/cloud-hardware-smart-gate/src/main/java/com/cm/smartgate/pojo/vos/SmartGateVO.java
+++ b/cloud-hardware-smart-gate/src/main/java/com/cm/smartgate/pojo/vos/SmartGateVO.java
@@ -28,6 +28,12 @@ public class SmartGateVO {
@ApiModelProperty(name = "smartGateIpAddress", value = "ip地址")
@CheckEmptyAnnotation(name = "ip地址")
private String smartGateIpAddress;
+ @ApiModelProperty(name = "smartGatePort", value = "端口")
+ private String smartGatePort;
+ @ApiModelProperty(name = "smartGateUsername", value = "用户名")
+ private String smartGateUsername;
+ @ApiModelProperty(name = "smartGatePassword", value = "密码")
+ private String smartGatePassword;
public String getSmartGateSerialNo() {
return smartGateSerialNo == null ? "" : smartGateSerialNo.trim();
@@ -61,6 +67,30 @@ public class SmartGateVO {
this.smartGateIpAddress = smartGateIpAddress;
}
+ public String getSmartGatePort() {
+ return smartGatePort == null ? "" : smartGatePort.trim();
+ }
+
+ public void setSmartGatePort(String smartGatePort) {
+ this.smartGatePort = smartGatePort;
+ }
+
+ public String getSmartGateUsername() {
+ return smartGateUsername == null ? "" : smartGateUsername.trim();
+ }
+
+ public void setSmartGateUsername(String smartGateUsername) {
+ this.smartGateUsername = smartGateUsername;
+ }
+
+ public String getSmartGatePassword() {
+ return smartGatePassword == null ? "" : smartGatePassword.trim();
+ }
+
+ public void setSmartGatePassword(String smartGatePassword) {
+ this.smartGatePassword = smartGatePassword;
+ }
+
@Override
public String toString() {
final StringBuilder sb = new StringBuilder("{");
@@ -72,6 +102,12 @@ public class SmartGateVO {
.append(smartGateSummary).append('\"');
sb.append(",\"smartGateIpAddress\":\"")
.append(smartGateIpAddress).append('\"');
+ sb.append(",\"smartGatePort\":\"")
+ .append(smartGatePort).append('\"');
+ sb.append(",\"smartGateUsername\":\"")
+ .append(smartGateUsername).append('\"');
+ sb.append(",\"smartGatePassword\":\"")
+ .append(smartGatePassword).append('\"');
sb.append('}');
return sb.toString();
}
diff --git a/cloud-hardware-smart-gate/src/main/java/netmanager/lib/PlatUtils.java b/cloud-hardware-smart-gate/src/main/java/netmanager/lib/PlatUtils.java
index 7e66899..2356d67 100644
--- a/cloud-hardware-smart-gate/src/main/java/netmanager/lib/PlatUtils.java
+++ b/cloud-hardware-smart-gate/src/main/java/netmanager/lib/PlatUtils.java
@@ -68,7 +68,7 @@ public class PlatUtils {
String strRootPath = configPath.replace("\\", "/");
FileInputStream inputStream = null;
try {
- inputStream = new FileInputStream(configPath + "/config.properties");
+ inputStream = new FileInputStream(strRootPath + "/config.properties");
properties.load(inputStream);
} catch (FileNotFoundException e) {
e.printStackTrace();
@@ -113,7 +113,7 @@ public class PlatUtils {
strLibraryName = "lib" + strLibrary + ".so";
}
- String strResult = strLoadLibraryDir + strLibraryName;
+ String strResult = configPath + strLoadLibraryDir + strLibraryName;
System.out.println(strResult);
return strResult;
}
diff --git a/cloud-hardware-smart-gate/src/main/resources/mybatis/mapper/smartgate/smartgate-mapper.xml b/cloud-hardware-smart-gate/src/main/resources/mybatis/mapper/smartgate/smartgate-mapper.xml
index a3c70dd..be90450 100644
--- a/cloud-hardware-smart-gate/src/main/resources/mybatis/mapper/smartgate/smartgate-mapper.xml
+++ b/cloud-hardware-smart-gate/src/main/resources/mybatis/mapper/smartgate/smartgate-mapper.xml
@@ -10,6 +10,9 @@