|
@@ -3,15 +3,15 @@
|
|
|
<mapper namespace="com.yx.face.dao.FaceDeviceDao">
|
|
|
<update id="update">
|
|
|
UPDATE face_device
|
|
|
- SET type = #{type},
|
|
|
- admin_id_of_staff_entrance = #{adminId}
|
|
|
+ SET type = #{type},
|
|
|
+ admin_id_of_staff_entrance = #{adminId}
|
|
|
WHERE sn = #{sn}
|
|
|
</update>
|
|
|
|
|
|
<update id="updateStatus">
|
|
|
UPDATE face_device
|
|
|
- SET type = #{type},
|
|
|
- state = 0,
|
|
|
+ SET type = #{type},
|
|
|
+ state = 0,
|
|
|
admin_id_of_staff_entrance = #{adminId}
|
|
|
WHERE sn = #{sn}
|
|
|
</update>
|
|
@@ -117,6 +117,18 @@
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
+ <select id="getByAminVo" resultType="java.lang.String">
|
|
|
+
|
|
|
+ SELECT sn
|
|
|
+ FROM face_device fd
|
|
|
+ left join admin a on a.id = fd.admin_id
|
|
|
+ WHERE fd.enable = 1
|
|
|
+ AND fd.online = 1
|
|
|
+ AND fd.auth = 1
|
|
|
+ and a.province_id = #{adminVo.provinceId}
|
|
|
+ and a.type in (3,4, 5)
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="getFaceDeviceBySn" resultType="com.yx.face.model.entity.FaceDevice">
|
|
|
SELECT *
|
|
|
FROM face_device
|
|
@@ -211,9 +223,11 @@
|
|
|
</where>
|
|
|
</select>
|
|
|
<select id="selectTypeFaceDev" resultType="com.yx.face.model.entity.FaceDevice">
|
|
|
- SELECT sn ,id
|
|
|
+ SELECT sn, id
|
|
|
FROM face_device
|
|
|
- WHERE enable = 1 and online = 1 and auth = 1
|
|
|
+ WHERE enable = 1
|
|
|
+ and online = 1
|
|
|
+ and auth = 1
|
|
|
AND type = #{type}
|
|
|
</select>
|
|
|
<select id="getBySnList" resultType="com.yx.face.model.vo.FaceDeviceVO">
|
|
@@ -244,5 +258,4 @@
|
|
|
AND admin_id = #{adminId}
|
|
|
</if>
|
|
|
</select>
|
|
|
-</mapper>
|
|
|
-
|
|
|
+</mapper>
|