101 lines
5.9 KiB
XML
101 lines
5.9 KiB
XML
|
|
<?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.canteen.core.kitchen.mapper.KitchenStaffMorningCheckMapper">
|
||
|
|
<resultMap type="com.bonus.canteen.core.kitchen.domain.KitchenStaffMorningCheck" id="KitchenStaffMorningCheckResult">
|
||
|
|
<result property="checkId" column="check_Id" />
|
||
|
|
<result property="staffId" column="staff_id" />
|
||
|
|
<result property="deviceId" column="device_id" />
|
||
|
|
<result property="temperatureValue" column="temperature_value" />
|
||
|
|
<result property="temperatureStatus" column="temperature_status" />
|
||
|
|
<result property="checkStatus" column="check_status" />
|
||
|
|
<result property="recordTime" column="record_time" />
|
||
|
|
<result property="checkVideoUrl" column="check_video_url" />
|
||
|
|
<result property="createBy" column="create_by" />
|
||
|
|
<result property="createTime" column="create_time" />
|
||
|
|
<result property="updateBy" column="update_by" />
|
||
|
|
<result property="updateTime" column="update_time" />
|
||
|
|
</resultMap>
|
||
|
|
|
||
|
|
<sql id="selectKitchenStaffMorningCheckVo">
|
||
|
|
select check_Id, staff_id, device_id, temperature_value, temperature_status, check_status, record_time, check_video_url, create_by, create_time, update_by, update_time from kitchen_staff_morning_check
|
||
|
|
</sql>
|
||
|
|
|
||
|
|
<select id="selectKitchenStaffMorningCheckList" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenStaffMorningCheck" resultMap="KitchenStaffMorningCheckResult">
|
||
|
|
<include refid="selectKitchenStaffMorningCheckVo"/>
|
||
|
|
<where>
|
||
|
|
<if test="staffId != null "> and staff_id = #{staffId}</if>
|
||
|
|
<if test="deviceId != null "> and device_id = #{deviceId}</if>
|
||
|
|
<if test="temperatureValue != null "> and temperature_value = #{temperatureValue}</if>
|
||
|
|
<if test="temperatureStatus != null and temperatureStatus != ''"> and temperature_status = #{temperatureStatus}</if>
|
||
|
|
<if test="checkStatus != null "> and check_status = #{checkStatus}</if>
|
||
|
|
<if test="recordTime != null "> and record_time = #{recordTime}</if>
|
||
|
|
<if test="checkVideoUrl != null and checkVideoUrl != ''"> and check_video_url = #{checkVideoUrl}</if>
|
||
|
|
</where>
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="selectKitchenStaffMorningCheckByCheckId" parameterType="Long" resultMap="KitchenStaffMorningCheckResult">
|
||
|
|
<include refid="selectKitchenStaffMorningCheckVo"/>
|
||
|
|
where check_Id = #{checkId}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<insert id="insertKitchenStaffMorningCheck" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenStaffMorningCheck" useGeneratedKeys="true" keyProperty="checkId">
|
||
|
|
insert into kitchen_staff_morning_check
|
||
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="staffId != null">staff_id,</if>
|
||
|
|
<if test="deviceId != null">device_id,</if>
|
||
|
|
<if test="temperatureValue != null">temperature_value,</if>
|
||
|
|
<if test="temperatureStatus != null">temperature_status,</if>
|
||
|
|
<if test="checkStatus != null">check_status,</if>
|
||
|
|
<if test="recordTime != null">record_time,</if>
|
||
|
|
<if test="checkVideoUrl != null">check_video_url,</if>
|
||
|
|
<if test="createBy != null">create_by,</if>
|
||
|
|
<if test="createTime != null">create_time,</if>
|
||
|
|
<if test="updateBy != null">update_by,</if>
|
||
|
|
<if test="updateTime != null">update_time,</if>
|
||
|
|
</trim>
|
||
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="staffId != null">#{staffId},</if>
|
||
|
|
<if test="deviceId != null">#{deviceId},</if>
|
||
|
|
<if test="temperatureValue != null">#{temperatureValue},</if>
|
||
|
|
<if test="temperatureStatus != null">#{temperatureStatus},</if>
|
||
|
|
<if test="checkStatus != null">#{checkStatus},</if>
|
||
|
|
<if test="recordTime != null">#{recordTime},</if>
|
||
|
|
<if test="checkVideoUrl != null">#{checkVideoUrl},</if>
|
||
|
|
<if test="createBy != null">#{createBy},</if>
|
||
|
|
<if test="createTime != null">#{createTime},</if>
|
||
|
|
<if test="updateBy != null">#{updateBy},</if>
|
||
|
|
<if test="updateTime != null">#{updateTime},</if>
|
||
|
|
</trim>
|
||
|
|
</insert>
|
||
|
|
|
||
|
|
<update id="updateKitchenStaffMorningCheck" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenStaffMorningCheck">
|
||
|
|
update kitchen_staff_morning_check
|
||
|
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
|
<if test="staffId != null">staff_id = #{staffId},</if>
|
||
|
|
<if test="deviceId != null">device_id = #{deviceId},</if>
|
||
|
|
<if test="temperatureValue != null">temperature_value = #{temperatureValue},</if>
|
||
|
|
<if test="temperatureStatus != null">temperature_status = #{temperatureStatus},</if>
|
||
|
|
<if test="checkStatus != null">check_status = #{checkStatus},</if>
|
||
|
|
<if test="recordTime != null">record_time = #{recordTime},</if>
|
||
|
|
<if test="checkVideoUrl != null">check_video_url = #{checkVideoUrl},</if>
|
||
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||
|
|
</trim>
|
||
|
|
where check_Id = #{checkId}
|
||
|
|
</update>
|
||
|
|
|
||
|
|
<delete id="deleteKitchenStaffMorningCheckByCheckId" parameterType="Long">
|
||
|
|
delete from kitchen_staff_morning_check where check_Id = #{checkId}
|
||
|
|
</delete>
|
||
|
|
|
||
|
|
<delete id="deleteKitchenStaffMorningCheckByCheckIds" parameterType="String">
|
||
|
|
delete from kitchen_staff_morning_check where check_Id in
|
||
|
|
<foreach item="checkId" collection="array" open="(" separator="," close=")">
|
||
|
|
#{checkId}
|
||
|
|
</foreach>
|
||
|
|
</delete>
|
||
|
|
</mapper>
|