netty-确定互联完成

This commit is contained in:
2023-08-22 22:26:56 +08:00
parent 0d275239a8
commit 9b614251ca
8 changed files with 30 additions and 54 deletions

View File

@@ -8,7 +8,6 @@
<result column="stream" property="stream"/>
<result column="venue_id" property="venueId"/>
<result column="venue_type" property="venueType"/>
<result column="device_type" property="deviceType"/>
<result column="bind_member" property="bindMember"/>
<result column="bind_time" property="bindTime"/>
<result column="status" property="status"/>
@@ -53,7 +52,6 @@
#{stream, jdbcType=VARCHAR},
#{venue_id, jdbcType=INTEGER},
#{venue_type, jdbcType=INTEGER},
#{device_type, jdbcType=VARCHAR},
#{bind_member, jdbcType=INTEGER},
#{bind_time, jdbcType=TIMESTAMP},
#{createdId, jdbcType=INTEGER},
@@ -94,9 +92,6 @@
<if test="venueType != null">
venue_type,
</if>
<if test="deviceType != null">
device_type,
</if>
<if test="bindMember != null">
bind_member,
</if>
@@ -138,9 +133,6 @@
<if test="venueType != null">
#{venueType},
</if>
<if test="deviceType != null">
#{deviceType},
</if>
<if test="bindMember != null">
#{bindMember},
</if>
@@ -211,9 +203,6 @@
<if test="venueType != null">
venue_type = #{venueType},
</if>
<if test="deviceType != null">
device_type = #{deviceType},
</if>
<if test="bindMember != null">
bind_member = #{bindMember},
</if>
@@ -271,49 +260,31 @@
<update id="offline">
UPDATE sv_device set status = 0,modified_time = now()
WHERE name = #{deviceName} and venue_id=#{venueId}
<if test="deviceType != null">
and device_type = #{deviceType}
</if>
</update>
<update id="online">
UPDATE sv_device set status = 2,modified_time = now()
WHERE name = #{deviceName} and venue_id=#{venueId}
<if test="deviceType != null">
and device_type = #{deviceType}
</if>
</update>
<select id="checkDevice" resultType="java.lang.Integer">
SELECT count(1) FROM sv_device
WHERE 1=1 AND name = #{deviceName} and venue_id=#{venueId} and deleted = 0
<if test="deviceType != null">
and device_type = #{deviceType}
</if>
</select>
<select id="findByDevice" resultType="com.sv.entity.Device">
SELECT
<include refid="Field"></include> FROM sv_device
WHERE 1=1 AND name = #{deviceName} and venue_id=#{venueId} and deleted = 0
<if test="deviceType != null">
and device_type = #{deviceType}
</if>
</select>
<update id="bindMember">
UPDATE sv_device set bind_member = #{bindMember},bind_time = now()
WHERE name = #{deviceName} and venue_id=#{venueId}
<if test="deviceType != null">
and device_type = #{deviceType}
</if>
</update>
<update id="unBindMember">
UPDATE sv_device set bind_member = null,bind_time = null
WHERE name = #{deviceName} and venue_id=#{venueId}
<if test="deviceType != null">
and device_type = #{deviceType}
</if>
</update>
</mapper>
</mapper>