api-设备唯一Id 修改为 设备号 + 场馆号 + 进场OR出场

This commit is contained in:
limqhz
2020-07-23 16:39:58 +08:00
parent ade7baaa6b
commit 16e2f04c38
17 changed files with 125 additions and 265 deletions

View File

@@ -247,13 +247,16 @@
<update id="offline">
UPDATE sv_device set status = 0,modified_time = now()
WHERE name = #{deviceName} and venue_id=#{venueId}
<if test="venueType != null">
and venue_type = #{venueType}
</if>
</update>
<update id="online">
UPDATE sv_device set status = 2,modified_time = now()
WHERE name = #{deviceName} and venue_id=#{venueId}
<if test="venueType != null">
and venue_type = #{venueType},
and venue_type = #{venueType}
</if>
</update>
@@ -261,7 +264,7 @@
SELECT count(1) FROM sv_device
WHERE 1=1 AND name = #{deviceName} and venue_id=#{venueId} and deleted = 0
<if test="venueType != null">
and venue_type = #{venueType},
and venue_type = #{venueType}
</if>
</select>
@@ -270,7 +273,7 @@
<include refid="Field"></include> FROM sv_device
WHERE 1=1 AND name = #{deviceName} and venue_id=#{venueId} and deleted = 0
<if test="venueType != null">
and venue_type = #{venueType},
and venue_type = #{venueType}
</if>
</select>