From e7d90fd46364afb25c9c0cb9c1a5784f7aac6bf9 Mon Sep 17 00:00:00 2001
From: kongdeqiang <123456>
Date: 星期一, 13 四月 2026 16:15:36 +0800
Subject: [PATCH] 推送修改

---
 src/main/java/com/wgcloud/WgcloudServiceApplication.java     |    2 
 src/main/java/com/wgcloud/entity/OspfInfo.java               |   11 +++
 src/main/resources/templates/ospfMonitor/list.html           |    2 
 src/main/java/com/wgcloud/util/msg/WarnMailUtil.java         |    4 
 src/main/java/com/wgcloud/service/OspfInfoService.java       |    5 +
 src/main/resources/mybatis/mapper/OspfMonitorMapper.xml      |   44 ++++++++------
 src/main/resources/mybatis/mapper/OspfInfoMapper.xml         |   44 ++++++++------
 src/main/java/com/wgcloud/controller/OspfInfoController.java |    2 
 src/main/resources/templates/mail/view.html                  |    2 
 src/main/java/com/wgcloud/controller/MailSetController.java  |    2 
 src/main/java/com/wgcloud/entity/OspfMonitor.java            |    8 ++
 src/main/java/com/wgcloud/util/PingUtil.java                 |    5 +
 src/main/resources/templates/ospfMonitor/add.html            |    8 ++
 src/main/java/com/wgcloud/task/ScheduledTask.java            |    4 
 src/main/resources/application.yml                           |    8 +-
 15 files changed, 101 insertions(+), 50 deletions(-)

diff --git a/src/main/java/com/wgcloud/WgcloudServiceApplication.java b/src/main/java/com/wgcloud/WgcloudServiceApplication.java
index 3f01e40..0acffdc 100644
--- a/src/main/java/com/wgcloud/WgcloudServiceApplication.java
+++ b/src/main/java/com/wgcloud/WgcloudServiceApplication.java
@@ -31,7 +31,7 @@
 @ServletComponentScan("com.wgcloud.filter")
 @ComponentScan(basePackages = "com.wgcloud")
 @EnableCaching
-//@EnableScheduling
+@EnableScheduling
 public class WgcloudServiceApplication {
     public static void main(String[] args) {
         SpringApplication.run(WgcloudServiceApplication.class, args);
diff --git a/src/main/java/com/wgcloud/controller/MailSetController.java b/src/main/java/com/wgcloud/controller/MailSetController.java
index a7cead7..9126e0f 100644
--- a/src/main/java/com/wgcloud/controller/MailSetController.java
+++ b/src/main/java/com/wgcloud/controller/MailSetController.java
@@ -118,7 +118,7 @@
                 mailSetService.saveLog(request, StaticKeys.LOG_UPDATE, mailSet);
             }
             StaticKeys.mailSet = mailSet;
-            result = WarnMailUtil.sendMail(mailSet.getToMail(), "WGCLOUD娴嬭瘯閭欢鍙戦��", "WGCLOUD娴嬭瘯閭欢鍙戦��");
+            result = WarnMailUtil.sendMail(mailSet.getToMail(), "绯荤粺娴嬭瘯閭欢鍙戦��", "绯荤粺娴嬭瘯閭欢鍙戦��");
         } catch (Exception e) {
             logger.error("娴嬭瘯閭欢璁剧疆淇℃伅閿欒", e);
             logInfoService.save("娴嬭瘯閭欢璁剧疆淇℃伅閿欒", e.toString(), StaticKeys.LOG_XTCZ);
diff --git a/src/main/java/com/wgcloud/controller/OspfInfoController.java b/src/main/java/com/wgcloud/controller/OspfInfoController.java
index 21db5a6..9b04de3 100644
--- a/src/main/java/com/wgcloud/controller/OspfInfoController.java
+++ b/src/main/java/com/wgcloud/controller/OspfInfoController.java
@@ -133,12 +133,14 @@
                 ospfInfo.setMonitorIp(ospfMonitor.getHostname());
                 ospfInfo.setMonitorUsername(ospfMonitor.getUsername());
                 ospfInfo.setMonitorPassword(ospfMonitor.getPassword());
+                ospfInfo.setMonitorRemoteType(ospfMonitor.getRemoteType());
                 OspfInfoService.save(ospfInfo);
             } else {
                 OspfMonitor ospfMonitor = ospfMonitorService.selectById(ospfInfo.getMonitorId());
                 ospfInfo.setMonitorIp(ospfMonitor.getHostname());
                 ospfInfo.setMonitorUsername(ospfMonitor.getUsername());
                 ospfInfo.setMonitorPassword(ospfMonitor.getPassword());
+                ospfInfo.setMonitorRemoteType(ospfMonitor.getRemoteType());
                 OspfInfoService.updateById(ospfInfo);
             }
 
diff --git a/src/main/java/com/wgcloud/entity/OspfInfo.java b/src/main/java/com/wgcloud/entity/OspfInfo.java
index 58ca318..224f78e 100644
--- a/src/main/java/com/wgcloud/entity/OspfInfo.java
+++ b/src/main/java/com/wgcloud/entity/OspfInfo.java
@@ -51,6 +51,7 @@
 
     private String monitorUsername;
     private String monitorPassword;
+    private String monitorRemoteType;
 
 
     public String getHostname() {
@@ -62,6 +63,16 @@
         this.hostname = hostname;
     }
 
+    public String getMonitorRemoteType() {
+        return monitorRemoteType;
+    }
+
+
+    public void setMonitorRemoteType(String monitorRemoteType) {
+        this.monitorRemoteType = monitorRemoteType;
+    }
+
+
 
     public String getInfoContent() {
         return infoContent;
diff --git a/src/main/java/com/wgcloud/entity/OspfMonitor.java b/src/main/java/com/wgcloud/entity/OspfMonitor.java
index 2ef893d..dce7ab7 100644
--- a/src/main/java/com/wgcloud/entity/OspfMonitor.java
+++ b/src/main/java/com/wgcloud/entity/OspfMonitor.java
@@ -41,13 +41,21 @@
 
     private String password;
 
+    private String remoteType;
+
     public String getUsername() {
         return username;
+    }
+    public String getRemoteType() {
+        return remoteType;
     }
 
     public void setUsername(String username) {
         this.username = username;
     }
+    public void setRemoteType(String remoteType) {
+        this.remoteType = remoteType;
+    }
 
     public String getPassword() {
         return password;
diff --git a/src/main/java/com/wgcloud/service/OspfInfoService.java b/src/main/java/com/wgcloud/service/OspfInfoService.java
index 2d21ed9..0ffbaa7 100644
--- a/src/main/java/com/wgcloud/service/OspfInfoService.java
+++ b/src/main/java/com/wgcloud/service/OspfInfoService.java
@@ -142,6 +142,11 @@
             map.put("username",ospfInfo.getMonitorUsername());
             map.put("password",ospfInfo.getMonitorPassword());
             map.put("monitorIp",ospfInfo.getMonitorIp());
+            if(ospfInfo.getMonitorRemoteType().equals("TELNET")){
+                map.put("type","0");
+            }else if(ospfInfo.getMonitorRemoteType().equals("SSH")){
+                map.put("type","1");
+            }
             String str = JSON.toJSONString(map);
             System.out.println(str);
             try {
diff --git a/src/main/java/com/wgcloud/task/ScheduledTask.java b/src/main/java/com/wgcloud/task/ScheduledTask.java
index 2e32384..e46b5c3 100644
--- a/src/main/java/com/wgcloud/task/ScheduledTask.java
+++ b/src/main/java/com/wgcloud/task/ScheduledTask.java
@@ -126,7 +126,7 @@
      * 20绉掑悗鎵ц锛屼箣鍚庢瘡6鍒嗛挓鍒锋柊涓�娆�
      * 鍒濆鍖栦竴浜涗换鍔�
      */
-    //@Scheduled(initialDelay = 20000L, fixedRate = 6 * 60 * 1000)
+    @Scheduled(initialDelay = 20000L, fixedRate = 6 * 60 * 1000)
     public void initTask() {
         logger.info("initTask------------" + DateUtil.getDateTimeString(new Date()));
         try {
@@ -249,7 +249,7 @@
      * 90绉掑悗鎵ц锛屼箣鍚庢瘡闅�15鍒嗛挓鎵ц, 鍗曚綅锛歮s銆�
      * 妫�娴嬫暟閫歅ING璁惧
      */
-    //@Scheduled(initialDelay = 90000L, fixedRateString = "${base.dceTimes}" + "000")
+    @Scheduled(initialDelay = 90000L, fixedRateString = "${base.dceTimes}" + "000")
     public void dceInfoTask() {
         if (!StaticKeys.NODE_MASTER.equals(commonConfig.getNodeType())) {
             logger.info("slave鑺傜偣涓嶆墽琛屾娴嬫暟閫氳澶嘝ING浠诲姟");
diff --git a/src/main/java/com/wgcloud/util/PingUtil.java b/src/main/java/com/wgcloud/util/PingUtil.java
index 14b57f7..b2e4005 100644
--- a/src/main/java/com/wgcloud/util/PingUtil.java
+++ b/src/main/java/com/wgcloud/util/PingUtil.java
@@ -37,10 +37,11 @@
         String pingCommand;
         Runtime r = Runtime.getRuntime();
         String osName = System.getProperty("os.name");
+        System.out.println( "osName锛�"+osName);
         if (osName.contains("Windows")) {
             pingCommand = "ping " + ipAddress + " -n " + count + " -w " + (timeOut * 1000);
         } else {
-            pingCommand = "ping " + " -c " + count + " -w " + timeOut + " " + ipAddress;
+            pingCommand = "ping " + " -c " + count +  " "  + ipAddress;
         }
         Integer diffTimes = StaticKeys.OUT_TIME_MARK;
         try {
@@ -87,6 +88,7 @@
             //鏌ユ壘鏁存暟鐨勬鍒� begin
             String regInt = "(=\\d+ms)";
             Pattern patternInt = Pattern.compile(regInt);
+
             Matcher matcherInt = patternInt.matcher(line);
             while (matcherInt.find()) {
                 String groupStr = matcherInt.group(1);
@@ -105,6 +107,7 @@
             String regDouble = "(=\\d+.\\d+ms)";
             Pattern patternDouble = Pattern.compile(regDouble);
             Matcher matcherDouble = patternDouble.matcher(line);
+
             while (matcherDouble.find()) {
                 String groupStr = matcherDouble.group(1);
                 logger.debug(line + "--------------" + groupStr);
diff --git a/src/main/java/com/wgcloud/util/msg/WarnMailUtil.java b/src/main/java/com/wgcloud/util/msg/WarnMailUtil.java
index 644c8ea..37535b3 100644
--- a/src/main/java/com/wgcloud/util/msg/WarnMailUtil.java
+++ b/src/main/java/com/wgcloud/util/msg/WarnMailUtil.java
@@ -1118,8 +1118,8 @@
             mails = mails.substring(1);
         }
         try {
-            String mailTitlePrefix = "[WGCLOUD]";
-            String mailContentSuffix = "<p><p><p><a target='_blank' href='http://www.wgstart.com'>WGCLOUD</a>鏁笂";
+            String mailTitlePrefix = "[TSSW]";
+            String mailContentSuffix = "<p><p><p><a target='_blank' href='http://www.wgstart.com'>tssw</a>鏁笂";
             mailTitlePrefix = commonConfig.getMailTitlePrefix();
             mailContentSuffix = commonConfig.getMailContentSuffix();
             HtmlEmail email = new HtmlEmail();
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 793b5e3..7682c46 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -14,7 +14,7 @@
     name: wgcloud-server
   datasource:
     driver-class-name: com.mysql.jdbc.Driver
-    url: jdbc:mysql://127.0.0.1:3306/wgcloud?characterEncoding=utf-8&characterSetResults=utf8&autoReconnect=true&useSSL=false&allowMultiQueries=true&allowPublicKeyRetrieval=true
+    url: jdbc:mysql://localhost:3306/wgcloud?characterEncoding=utf-8&characterSetResults=utf8&autoReconnect=true&useSSL=false&allowMultiQueries=true&allowPublicKeyRetrieval=true
     username: root
     password: rootroot
     # hikari杩炴帴姹犵殑鍙傛暟 鐩稿叧璁剧疆
@@ -86,7 +86,7 @@
   #鏈嶅姟鎺ュ彛鐩戞帶闂撮殧锛屽崟浣嶇锛岄粯璁�10鍒嗛挓
   heathTimes: 600
   #鏁伴�氳澶囩洃鎺ч棿闅旓紝鍗曚綅绉掞紝榛樿15鍒嗛挓
-  dceTimes: 900
+  dceTimes: 300
   #snmp璁惧鐩戞祴闂撮殧锛屽崟浣嶇锛岄粯璁�20鍒嗛挓
   snmpTimes: 1200
   #鍛婅缂撳瓨鏃堕棿闂撮殧(姝ゆ椂闂存鍐呭悓涓�鍛婅閫氱煡涓嶅啀閲嶅鍙�)锛屽崟浣嶇锛岄粯璁�120鍒嗛挓
@@ -108,9 +108,9 @@
   #绯荤粺绠�绉帮紝濡倃gcloud锛屾鍔熻兘闇�鍗囩骇鍒颁笓涓氱増
   wgShortName:
   #鍛婅閭欢鏍囬鍓嶇紑锛屾鍔熻兘闇�鍗囩骇鍒颁笓涓氱増
-  mailTitlePrefix: '[WGCLOUD]'
+  mailTitlePrefix: '[KDQ]'
   #鍛婅閭欢鍐呭鍚庣紑锛屾鍔熻兘闇�鍗囩骇鍒颁笓涓氱増
-  mailContentSuffix: '<p><p><p>WGCLOUD鏁笂'
+  mailContentSuffix: '<p><p><p>KDQ鏁笂'
   #鏄惁鏄剧ず椤甸潰搴曢儴鐗堟潈銆佺綉鍧�淇℃伅锛寉es鏄剧ず锛宯o涓嶆樉绀猴紝姝ゅ姛鑳介渶鍗囩骇鍒颁笓涓氱増
   copyRight: yes
   year: 1
diff --git a/src/main/resources/mybatis/mapper/OspfInfoMapper.xml b/src/main/resources/mybatis/mapper/OspfInfoMapper.xml
index 9f523a0..bacea81 100644
--- a/src/main/resources/mybatis/mapper/OspfInfoMapper.xml
+++ b/src/main/resources/mybatis/mapper/OspfInfoMapper.xml
@@ -12,12 +12,13 @@
 		<result column="MONITOR_USERNAME" property="monitorUsername" jdbcType="CHAR" />
 		<result column="MONITOR_PASSWORD" property="monitorPassword" jdbcType="CHAR" />
 		<result column="CREATE_TIME" property="createTime" jdbcType="TIMESTAMP" />
+		<result column="MONITOR_REMOTE_TYPE" property="monitorRemoteType" jdbcType="CHAR" />
 	</resultMap>
-	
+
 	<sql id="tableColumnList">
-		ID,HOST_NAME, INFO_CONTENT, STATE,AREA_NUM,CREATE_TIME,MONITOR_ID,MONITOR_IP,MONITOR_USERNAME,MONITOR_PASSWORD
+		ID,HOST_NAME, INFO_CONTENT, STATE,AREA_NUM,CREATE_TIME,MONITOR_ID,MONITOR_IP,MONITOR_USERNAME,MONITOR_PASSWORD,MONITOR_REMOTE_TYPE
 	</sql>
-	
+
 	<sql id="queryByParams">
 		<if test="hostname != null">
 			<choose>
@@ -57,19 +58,19 @@
 			<![CDATA[ AND AREA_NUM = #{areaNum} ]]>
 		</if>
 	</sql>
-	
-	
+
+
 	<select id="selectById" resultMap="resultMap" parameterType="java.lang.String">
 		SELECT
 		<include refid="tableColumnList" />
 		FROM OSPF_INFO WHERE ID=#{id}
 	</select>
-	
-	
+
+
 	<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
 		DELETE FROM OSPF_INFO WHERE ID = #{id}
 	</delete>
-	
+
 	<delete id="deleteByDate"  parameterType="map">
 		DELETE FROM OSPF_INFO WHERE
 		<if test="_databaseId == 'mysql'">
@@ -82,12 +83,12 @@
 			<![CDATA[  CREATE_TIME <=  to_date(#{endTime},'yyyy-MM-dd hh24:mi:ss')]]>
 		</if>
 	</delete>
-	
-	
+
+
 	<delete id="deleteByAccHname"  parameterType="map">
 		DELETE FROM OSPF_INFO WHERE ACCOUNT = #{account} AND HOST_NAME = #{hostname}
 	</delete>
-	
+
 	<delete id="deleteById" parameterType="java.lang.String">
 		DELETE FROM OSPF_INFO WHERE ID IN
 		<foreach item="item" index="index" collection="array" open="(" separator="," close=")">
@@ -100,15 +101,15 @@
 			<when test="_databaseId == 'oracle'">
 				begin
 				<foreach collection="list" item="item" index="index">
-					INSERT INTO OSPF_INFO (ID,HOST_NAME,INFO_CONTENT,STATE,AREA_NUM,CREATE_TIME,MONITOR_IP,MONITOR_ID,MONITOR_USERNAME,MONITOR_PASSWORD)  VALUES
-					(#{item.id},#{item.hostname},#{item.infoContent},#{item.state},#{item.areaNum},#{item.createTime},#{item.monitorIp},#{item.monitorId},#{item.monitorUsername},#{item.monitorPassword});
+					INSERT INTO OSPF_INFO (ID,HOST_NAME,INFO_CONTENT,STATE,AREA_NUM,CREATE_TIME,MONITOR_IP,MONITOR_ID,MONITOR_REMOTE_TYPE,MONITOR_USERNAME,MONITOR_PASSWORD,CREATE_TIME)  VALUES
+					(#{item.id},#{item.hostname},#{item.infoContent},#{item.state},#{item.areaNum},#{item.createTime},#{item.monitorIp},#{item.monitorId},#{item.monitorRemoteType},#{item.monitorUsername},#{item.monitorPassword},#{item.createTime});
 				</foreach>
 				end;
 			</when>
 			<otherwise>
-				INSERT INTO OSPF_INFO (ID,HOST_NAME,INFO_CONTENT,STATE,AREA_NUM,CREATE_TIME,MONITOR_IP,MONITOR_ID,MONITOR_USERNAME,MONITOR_PASSWORD)  VALUES
+				INSERT INTO OSPF_INFO (ID,HOST_NAME,INFO_CONTENT,STATE,AREA_NUM,CREATE_TIME,MONITOR_IP,MONITOR_ID,MONITOR_REMOTE_TYPE,MONITOR_USERNAME,MONITOR_PASSWORD,CREATE_TIME)  VALUES
 				<foreach collection="list" item="item" index="index" separator="," >
-					(#{item.id},#{item.hostname},#{item.infoContent},#{item.state},#{item.areaNum},#{item.createTime},#{item.monitorIp},#{item.monitorId},#{item.monitorUsername},#{item.monitorPassword})
+					(#{item.id},#{item.hostname},#{item.infoContent},#{item.state},#{item.areaNum},#{item.createTime},#{item.monitorIp},#{item.monitorId},#{item.monitorRemoteType},#{item.monitorUsername},#{item.monitorPassword},#{item.createTime})
 				</foreach>
 			</otherwise>
 		</choose>
@@ -124,6 +125,7 @@
       		<if test="areaNum != null" >AREA_NUM,</if>
       		<if test="monitorIp != null" >MONITOR_IP,</if>
       		<if test="monitorId != null" >MONITOR_ID,</if>
+      		<if test="monitorRemoteType != null" >MONITOR_REMOTE_TYPE,</if>
       		<if test="monitorUsername != null" >MONITOR_USERNAME,</if>
       		<if test="monitorPassword != null" >MONITOR_PASSWORD,</if>
       		<if test="createTime != null" >CREATE_TIME</if>
@@ -136,6 +138,7 @@
 			<if test="areaNum != null" >#{areaNum},</if>
 			<if test="monitorIp != null" >#{monitorIp},</if>
 			<if test="monitorId != null" >#{monitorId},</if>
+			<if test="monitorRemoteType != null" >#{monitorRemoteType},</if>
 			<if test="monitorUsername != null" >#{monitorUsername},</if>
 			<if test="monitorPassword != null" >#{monitorPassword},</if>
       		<if test="createTime != null" >#{createTime}</if>
@@ -160,7 +163,7 @@
 		</where>
 		 ORDER BY CREATE_TIME DESC
 	</select>
-	
+
 	<select id="selectByParams" parameterType="map" resultMap="resultMap">
 		SELECT
 		<include refid="tableColumnList" />
@@ -202,9 +205,12 @@
 			<if test="monitorPassword != null">
 				MONITOR_PASSWORD = #{monitorPassword},
 			</if>
+		    <if test="monitorRemoteType != null">
+				MONITOR_REMOTE_TYPE = #{monitorRemoteType},
+			</if>
 		</set>
 		WHERE ID = #{id}
 	</update>
-	
-	
-</mapper>
\ No newline at end of file
+
+
+</mapper>
diff --git a/src/main/resources/mybatis/mapper/OspfMonitorMapper.xml b/src/main/resources/mybatis/mapper/OspfMonitorMapper.xml
index f383b5e..b67176a 100644
--- a/src/main/resources/mybatis/mapper/OspfMonitorMapper.xml
+++ b/src/main/resources/mybatis/mapper/OspfMonitorMapper.xml
@@ -9,12 +9,13 @@
 		<result column="USERNAME" property="username" jdbcType="CHAR" />
 		<result column="PASSWORD" property="password" jdbcType="CHAR" />
 		<result column="CREATE_TIME" property="createTime" jdbcType="TIMESTAMP" />
+		<result column="REMOTE_TYPE" property="remoteType" jdbcType="CHAR" />
 	</resultMap>
-	
+
 	<sql id="tableColumnList">
-		ID,HOST_NAME, INFO_CONTENT, STATE,USERNAME,PASSWORD,CREATE_TIME
+		ID,HOST_NAME, INFO_CONTENT, STATE,USERNAME,PASSWORD,CREATE_TIME,REMOTE_TYPE
 	</sql>
-	
+
 	<sql id="queryByParams">
 		<if test="hostname != null">
 			<choose>
@@ -54,19 +55,19 @@
 			<![CDATA[ AND AREA_NUM = #{areaNum} ]]>
 		</if>
 	</sql>
-	
-	
+
+
 	<select id="selectById" resultMap="resultMap" parameterType="java.lang.String">
 		SELECT
 		<include refid="tableColumnList" />
 		FROM OSPF_MONITOR WHERE ID=#{id}
 	</select>
-	
-	
+
+
 	<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
 		DELETE FROM OSPF_MONITOR WHERE ID = #{id}
 	</delete>
-	
+
 	<delete id="deleteByDate"  parameterType="map">
 		DELETE FROM OSPF_MONITOR WHERE
 		<if test="_databaseId == 'mysql'">
@@ -79,12 +80,12 @@
 			<![CDATA[  CREATE_TIME <=  to_date(#{endTime},'yyyy-MM-dd hh24:mi:ss')]]>
 		</if>
 	</delete>
-	
-	
+
+
 	<delete id="deleteByAccHname"  parameterType="map">
 		DELETE FROM OSPF_MONITOR WHERE ACCOUNT = #{account} AND HOST_NAME = #{hostname}
 	</delete>
-	
+
 	<delete id="deleteById" parameterType="java.lang.String">
 		DELETE FROM OSPF_MONITOR WHERE ID IN
 		<foreach item="item" index="index" collection="array" open="(" separator="," close=")">
@@ -103,9 +104,9 @@
 				end;
 			</when>
 			<otherwise>
-				INSERT INTO OSPF_MONITOR (ID,HOST_NAME,INFO_CONTENT,STATE,USERNAME,PASSWORD,CREATE_TIME)  VALUES
+				INSERT INTO OSPF_MONITOR (ID,HOST_NAME,INFO_CONTENT,STATE,USERNAME,PASSWORD,CREATE_TIME,REMOTE_TYPE)  VALUES
 				<foreach collection="list" item="item" index="index" separator="," >
-					(#{item.id},#{item.hostname},#{item.infoContent},#{item.state},#{item.username},#{item.password},#{item.createTime})
+					(#{item.id},#{item.hostname},#{item.infoContent},#{item.state},#{item.username},#{item.password},#{item.createTime},#{item.remoteType})
 				</foreach>
 			</otherwise>
 		</choose>
@@ -120,7 +121,8 @@
       		<if test="state != null" >STATE,</if>
       		<if test="username != null" >USERNAME,</if>
       		<if test="password != null" >PASSWORD,</if>
-      		<if test="createTime != null" >CREATE_TIME</if>
+      		<if test="createTime != null" >CREATE_TIME,</if>
+		    <if test="remoteType != null" >REMOTE_TYPE</if>
     	</trim>
     	<trim prefix="values (" suffix=")" suffixOverrides="," >
       		<if test="id != null" >#{id},</if>
@@ -129,7 +131,8 @@
       		<if test="state != null" >#{state},</if>
 			<if test="username != null" >#{username},</if>
 			<if test="password != null" >#{password},</if>
-      		<if test="createTime != null" >#{createTime}</if>
+      		<if test="createTime != null" >#{createTime},</if>
+		    <if test="remoteType != null" >#{remoteType}</if>
     	</trim>
 	</insert>
 
@@ -151,7 +154,7 @@
 		</where>
 		 ORDER BY CREATE_TIME DESC
 	</select>
-	
+
 	<select id="selectByParams" parameterType="map" resultMap="resultMap">
 		SELECT
 		<include refid="tableColumnList" />
@@ -184,9 +187,12 @@
 			<if test="createTime != null">
 				CREATE_TIME = #{createTime},
 			</if>
+		    <if test="remoteType != null">
+				REMOTE_TYPE = #{remoteType},
+			</if>
 		</set>
 		WHERE ID = #{id}
 	</update>
-	
-	
-</mapper>
\ No newline at end of file
+
+
+</mapper>
diff --git a/src/main/resources/templates/mail/view.html b/src/main/resources/templates/mail/view.html
index 499cc37..6db456c 100644
--- a/src/main/resources/templates/mail/view.html
+++ b/src/main/resources/templates/mail/view.html
@@ -57,7 +57,7 @@
                     <input type="text"  th:value="${mailSet.fromMailName}" autocomplete="off" class="validate[required,maxSize[40],custom[email]] form-control" name="fromMailName" id="fromMailName" placeholder="123456@qq.com">
                 </div>
                 <div class="form-group">
-                    <label for="fromPwd"><font color="red">*</font>鍙戦�侀偖绠卞瘑鐮� <span  data-trigger="hover"  data-container="body" data-toggle="popover" data-placement="top" data-content="鏄剧ず瀵嗙爜" onclick="javascript:showPasswd();" style="cursor:pointer;margin-left: 5px"><i id="eyeSwitch" class="fa fa-eye"></i></span></label>
+                    <label for="fromPwd"><font color="red">*</font>鍙戦�侀偖绠辨巿鏉冪爜 <span  data-trigger="hover"  data-container="body" data-toggle="popover" data-placement="top" data-content="鏄剧ず瀵嗙爜" onclick="javascript:showPasswd();" style="cursor:pointer;margin-left: 5px"><i id="eyeSwitch" class="fa fa-eye"></i></span></label>
                     <input type="password"  th:value="${mailSet.fromPwd}"  class="validate[required,maxSize[20]] form-control" name="fromPwd" id="fromPwd" placeholder="">
                 </div>
                 <div class="form-group">
diff --git a/src/main/resources/templates/ospfMonitor/add.html b/src/main/resources/templates/ospfMonitor/add.html
index 1ca8e80..61be9f8 100644
--- a/src/main/resources/templates/ospfMonitor/add.html
+++ b/src/main/resources/templates/ospfMonitor/add.html
@@ -66,6 +66,14 @@
                     <label>瀵嗙爜</label>
                     <input type="text" autocomplete="off"  th:value="${ospfMonitor.password}" class="validate[required,maxSize[50]] form-control" name="password" id="password" placeholder="">
                 </div>
+                <div class="form-group">
+                    <label><font color="red">*</font>杩炴帴绫诲瀷</label>
+                    <select class="validate[required] form-control" name="remoteType" id="remoteType">
+                        <option value="">璇烽�夋嫨</option>
+                        <option value="TELNET" th:selected="${ospfMonitor.remoteType == 'TELNET'}">TELNET</option>
+                        <option value="SSH" th:selected="${ospfMonitor.remoteType == 'SSH'}">SSH</option>
+                    </select>
+                </div>
             </div>
             <!-- /.card-body -->
 
diff --git a/src/main/resources/templates/ospfMonitor/list.html b/src/main/resources/templates/ospfMonitor/list.html
index 4a5dfc1..bd6f12b 100644
--- a/src/main/resources/templates/ospfMonitor/list.html
+++ b/src/main/resources/templates/ospfMonitor/list.html
@@ -67,6 +67,7 @@
             <th title="璁惧IP">璁惧IP</th>
             <th title="鐢ㄦ埛鍚�">鐢ㄦ埛鍚�</th>
             <th title="瀵嗙爜">瀵嗙爜</th>
+            <th title="杩炴帴鏂瑰紡">杩炴帴鏂瑰紡</th>
             </tr>
           </th:block>
           </thead>
@@ -79,6 +80,7 @@
               <td th:text="${item.hostname}"></td>
               <td th:text="${item.username}"></td>
               <td th:text="${item.password}"></td>
+              <td th:text="${item.remoteType}"></td>
               <td>
                 <th:block th:if="${session.LOGIN_KEY.role != 'guest'}">
                     <button type="button"  th:onclick="del([[${item.id}]])"  class="btn bg-gradient-danger btn-sm">鍒犻櫎</button>

--
Gitblit v1.9.1