Prechádzať zdrojové kódy

增加是否自动更新字段

yanliming 5 rokov pred
rodič
commit
a6362db69b

+ 19 - 0
common/src/main/java/com/jpsoft/smart/modules/base/entity/DeviceInfo.java

@@ -91,6 +91,14 @@ public class DeviceInfo {
 	 */
 	@ApiModelProperty(value = "类型")
 	private String typeN;
+	/**
+	 *是否开启自动更新
+	 */
+	@ApiModelProperty(value = "是否开启自动更新")
+	private Boolean isAutoUpdate;
+
+	@ApiModelProperty(value = "是否开启自动更新")
+	private String isAutoUpdateN;
 	/**
 	 *是否删除
 	 */
@@ -132,4 +140,15 @@ public class DeviceInfo {
 		return isOnlineN;
 	}
 
+	public String getIsAutoUpdateN() {
+		if(isAutoUpdate!=null) {
+			if (isAutoUpdate) {
+				isAutoUpdateN = "是";
+			} else {
+				isAutoUpdateN = "否";
+			}
+		}
+		return isAutoUpdateN;
+	}
+
 }

+ 7 - 2
common/src/main/resources/mapper/base/DeviceInfo.xml

@@ -15,6 +15,7 @@
 			<result property="ipAddress" column="ip_address" />
 			<result property="port" column="port_" />
 			<result property="type" column="type_" />
+			<result property="isAutoUpdate" column="is_auto_update" />
 			<result property="delFlag" column="del_flag" />
 			<result property="createBy" column="create_by" />
 			<result property="createTime" column="create_time" />
@@ -29,7 +30,7 @@
 	-->
 	<![CDATA[
 		insert into base_device_info
-	    (id_,header_,device_no,alias_name,address_,is_online,unlock_password,code_address,ip_address,port_,type_,del_flag,create_by,create_time,update_by,update_time)
+	    (id_,header_,device_no,alias_name,address_,is_online,unlock_password,code_address,ip_address,port_,type_,is_auto_update,del_flag,create_by,create_time,update_by,update_time)
 		values
 		(
 #{id,jdbcType=VARCHAR}
@@ -43,6 +44,7 @@
 ,#{ipAddress,jdbcType=VARCHAR}
 ,#{port,jdbcType=VARCHAR}
 ,#{type,jdbcType=VARCHAR}
+,#{isAutoUpdate,jdbcType=NUMERIC}
 ,#{delFlag,jdbcType= NUMERIC }
 ,#{createBy,jdbcType=VARCHAR}
 ,#{createTime,jdbcType= TIMESTAMP }
@@ -87,6 +89,9 @@
 				<if test="type!=null">
 		type_=#{type,jdbcType=VARCHAR},
 		</if>
+			<if test="isAutoUpdate!=null">
+				is_auto_update=#{isAutoUpdate,jdbcType= NUMERIC },
+			</if>
 				<if test="delFlag!=null">
 		del_flag=#{delFlag,jdbcType= NUMERIC },
 		</if>
@@ -107,7 +112,7 @@
 	</update>
 	<select id="get" parameterType="string" resultMap="DeviceInfoMap">
 		select 
-id_, header_,device_no,alias_name,address_,is_online,unlock_password,code_address,ip_address,port_,type_,del_flag,create_by,create_time,update_by,update_time		from base_device_info where id_=#{0}
+id_, header_,device_no,alias_name,address_,is_online,unlock_password,code_address,ip_address,port_,type_,is_auto_update,del_flag,create_by,create_time,update_by,update_time		from base_device_info where id_=#{0}
 	</select>
 	<select id="exist" parameterType="string" resultType="int">
 		select count(*) from base_device_info where id_=#{0} and  del_flag=false