132 lines
3.4 KiB
Plaintext
132 lines
3.4 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.camera.dao.CamersDao">
|
||
|
|
<insert id="base64Save" parameterType="String">
|
||
|
|
insert into edu_baseInfo (path) values(#{0})
|
||
|
|
</insert>
|
||
|
|
|
||
|
|
<select id="findByPage" resultType="com.bonus.camera.beans.cameraBeans" parameterType="com.bonus.camera.beans.cameraBeans">
|
||
|
|
SELECT
|
||
|
|
edu.id,
|
||
|
|
GROUP_CONCAT(seat.seat_id) as cameraSites,
|
||
|
|
edu.camera_name aS cameraName,
|
||
|
|
roo.room_name as roomName,
|
||
|
|
edu.note,
|
||
|
|
edu.room_id AS roomId
|
||
|
|
FROM
|
||
|
|
edu_camera edu
|
||
|
|
LEFT JOIN camera_seat seat ON seat.camera_id = edu.id
|
||
|
|
LEFT JOIN exam_room roo on roo.room_id =edu.room_id
|
||
|
|
GROUP BY
|
||
|
|
edu.id
|
||
|
|
|
||
|
|
</select>
|
||
|
|
<select id="findByPageOne" resultType="com.bonus.camera.beans.cameraBeans" parameterType="com.bonus.camera.beans.cameraBeans">
|
||
|
|
SELECT
|
||
|
|
id,
|
||
|
|
picture,
|
||
|
|
ippath,
|
||
|
|
picture_name AS pictureName,
|
||
|
|
picture_time AS pictureTime
|
||
|
|
FROM
|
||
|
|
screen_people
|
||
|
|
where 1=1
|
||
|
|
<if test="param.keyWord != null and param.keyWord != '' ">
|
||
|
|
and (
|
||
|
|
picture_time LIKE CONCAT("%",#{param.keyWord},"%")
|
||
|
|
)
|
||
|
|
</if>
|
||
|
|
</select>
|
||
|
|
<insert id="insertScreen" parameterType="com.bonus.camera.beans.ScreenBeans">
|
||
|
|
insert into screen_people
|
||
|
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||
|
|
|
||
|
|
<if test="picture != null" >
|
||
|
|
picture,
|
||
|
|
</if>
|
||
|
|
<if test="ippath != null" >
|
||
|
|
ippath,
|
||
|
|
</if>
|
||
|
|
<if test="pictureTime != null" >
|
||
|
|
picture_time,
|
||
|
|
</if>
|
||
|
|
<if test="pictureName != null" >
|
||
|
|
picture_name,
|
||
|
|
</if>
|
||
|
|
</trim>
|
||
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||
|
|
|
||
|
|
<if test="picture != null" >
|
||
|
|
#{picture},
|
||
|
|
</if>
|
||
|
|
<if test="ippath != null" >
|
||
|
|
#{ippath},
|
||
|
|
</if>
|
||
|
|
<if test="pictureTime != null" >
|
||
|
|
#{pictureTime},
|
||
|
|
</if>
|
||
|
|
<if test="pictureName != null" >
|
||
|
|
#{pictureName}
|
||
|
|
</if>
|
||
|
|
</trim>
|
||
|
|
|
||
|
|
</insert>
|
||
|
|
<insert id="InsertbaseInfo" parameterType="com.bonus.camera.beans.cameraBeans">
|
||
|
|
insert into camera_seat
|
||
|
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||
|
|
<if test="roomId != null" >
|
||
|
|
room_id,
|
||
|
|
</if>
|
||
|
|
<if test="cameraId != null" >
|
||
|
|
camera_id,
|
||
|
|
</if>
|
||
|
|
<if test="seatId != null" >
|
||
|
|
seat_id
|
||
|
|
</if>
|
||
|
|
</trim>
|
||
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||
|
|
<if test="roomId != null" >
|
||
|
|
#{roomId},
|
||
|
|
</if>
|
||
|
|
<if test="cameraId != null" >
|
||
|
|
#{cameraId},
|
||
|
|
</if>
|
||
|
|
<if test="seatId != null" >
|
||
|
|
#{seatId}
|
||
|
|
</if>
|
||
|
|
</trim>
|
||
|
|
</insert>
|
||
|
|
<insert id="mainbaseInfo" parameterType="com.bonus.camera.beans.cameraBeans" useGeneratedKeys="true" keyProperty="id">
|
||
|
|
insert into edu_camera
|
||
|
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||
|
|
<if test="roomId != null" >
|
||
|
|
room_id,
|
||
|
|
</if>
|
||
|
|
<if test="cameraName != null" >
|
||
|
|
camera_name,
|
||
|
|
</if>
|
||
|
|
<if test="note != null" >
|
||
|
|
note
|
||
|
|
</if>
|
||
|
|
</trim>
|
||
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||
|
|
<if test="roomId != null" >
|
||
|
|
#{roomId},
|
||
|
|
</if>
|
||
|
|
<if test="cameraName != null" >
|
||
|
|
#{cameraName},
|
||
|
|
</if>
|
||
|
|
<if test="note != null" >
|
||
|
|
#{note}
|
||
|
|
</if>
|
||
|
|
</trim>
|
||
|
|
</insert>
|
||
|
|
<delete id="deleteApply" parameterType="com.bonus.camera.beans.cameraBeans">
|
||
|
|
delete from screen_people where id=#{id}
|
||
|
|
|
||
|
|
</delete>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</mapper>
|