Commit 87146584 by YG8999

设备网关代码

parent a76a0965
......@@ -65,6 +65,10 @@ public class Device extends BaseEntity
@Excel(name = "设备位置")
private String devPosition;
/** 设备网关dev_id */
@Excel(name = "设备网关dev_id")
private String gatewayId;
@Override
public String toString() {
......@@ -86,6 +90,7 @@ public class Device extends BaseEntity
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("devPosition", getDevPosition())
.append("gatewayId", getGatewayId())
.toString();
}
}
......@@ -22,10 +22,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="devPosition" column="dev_position" />
<result property="gatewayId" column="gateway_id" />
</resultMap>
<sql id="selectDeviceVo">
select id, dev_name, dev_mac, dev_id, dev_psw, dev_ver, dev_type, projt_id, projt_psw, group, status, create_by, create_time, update_by, update_time, remark, dev_position from s_device
select id, dev_name, dev_mac, dev_id, dev_psw, dev_ver, dev_type, projt_id, projt_psw, group, status, create_by, create_time, update_by, update_time, remark, dev_position, gateway_id from s_device
</sql>
<select id="selectDeviceList" parameterType="Device" resultMap="DeviceResult">
......@@ -42,6 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="group != null and group != ''"> and group = #{group}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="devPosition != null and devPosition != ''"> and dev_position = #{devPosition}</if>
<if test="gatewayId != null and gatewayId != ''"> and gateway_id = #{gatewayId}</if>
</where>
</select>
......@@ -69,6 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
<if test="devPosition != null">dev_position,</if>
<if test="gatewayId != null">gateway_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="devName != null">#{devName},</if>
......@@ -87,6 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
<if test="devPosition != null">#{devPosition},</if>
<if test="gatewayId != null">#{gatewayId},</if>
</trim>
</insert>
......@@ -109,6 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="devPosition != null">dev_position = #{devPosition},</if>
<if test="gatewayId != null">gateway_id = #{gatewayId},</if>
</trim>
where id = #{id}
</update>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment