49 lines
1.6 KiB
Plaintext
49 lines
1.6 KiB
Plaintext
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
|
<!DOCTYPE mapper
|
||
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||
|
|
<mapper namespace="com.bonus.mcu.dao.McuDao">
|
||
|
|
|
||
|
|
<!-- 获取所有在线的球机信息-->
|
||
|
|
<select id="getBallsMessage" parameterType="com.bonus.mcu.beans.McuBean" resultType="com.bonus.mcu.beans.McuBean">
|
||
|
|
|
||
|
|
select id,camera_name AS`name`,puid,ball_index as `index`,
|
||
|
|
CASE `online`
|
||
|
|
WHEN '1' THEN
|
||
|
|
'在线'
|
||
|
|
ELSE
|
||
|
|
'不在线'
|
||
|
|
END 'online'
|
||
|
|
from edu_camera
|
||
|
|
ORDER BY `online` DESC
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="getinfoBysxt" parameterType="com.bonus.mcu.beans.BallBean" resultType="com.bonus.mcu.beans.BallBean">
|
||
|
|
SELECT
|
||
|
|
DISTINCT
|
||
|
|
sz.`NAME`,
|
||
|
|
sz.department,
|
||
|
|
sz.lat_x AS Latitude,
|
||
|
|
sz.lon_y AS Longitude,
|
||
|
|
sz.seat
|
||
|
|
FROM
|
||
|
|
edu_camera edu
|
||
|
|
LEFT JOIN camera_seat seat ON seat.camera_id = edu.id
|
||
|
|
LEFT JOIN sz_seat sz ON sz.seat = seat.seat_id
|
||
|
|
WHERE
|
||
|
|
edu.puid = #{id}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="getBallList" parameterType="com.bonus.mcu.beans.BallBean" resultType="com.bonus.mcu.beans.BallBean">
|
||
|
|
select puid as id ,'1' as AllowFlag,camera_name as `Name`,`online` as OnlineFlag,
|
||
|
|
'1' as `Enable`,'IV' as `Type`,puid as DeviceID,ball_index as ballIndex
|
||
|
|
FROM edu_camera
|
||
|
|
where 1=1
|
||
|
|
<if test="puid !=null and puid !='' and puid !='null' ">
|
||
|
|
and puid = #{puid}
|
||
|
|
</if>
|
||
|
|
|
||
|
|
</select>
|
||
|
|
|
||
|
|
|
||
|
|
</mapper>
|