新增安防告警不带图片和只上传图片

This commit is contained in:
wyw
2024-08-17 14:24:26 +08:00
parent 15dd120b0d
commit 8b13375a24
6 changed files with 110 additions and 19 deletions

View File

@ -45,6 +45,15 @@ public interface UploadedPhotosMapper
*/
public int updateUploadedPhotos(UploadedPhotos uploadedPhotos);
/**
* 通过SN和图片进行更新数据
* @param uploadedPhotos
* @return
*/
public int updateBySnAndTime(UploadedPhotos uploadedPhotos);
/**
* 删除存储上传的照片信息
*

View File

@ -89,6 +89,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
</update>
<update id="updateBySnAndTime" parameterType="com.fastbee.iot.model.anfang.UploadedPhotos">
update uploaded_photos
<trim prefix="SET" suffixOverrides=",">
<if test="photoPath != null and photoPath != ''">photo_path = #{photoPath},</if>
<if test="monitorPath != null and monitorPath != ''">monitor_path = #{monitorPath},</if>
<if test="imei != null and imei != ''">imei = #{imei},</if>
<if test="sn != null">sn = #{sn},</if>
<if test="lat != null">lat = #{lat},</if>
<if test="lng != null">lng = #{lng},</if>
<if test="temp != null">temp = #{temp},</if>
<if test="doorState != null">door_state = #{doorState},</if>
<if test="shakeState != null">shake_state = #{shakeState},</if>
<if test="uploadTime != null">upload_time = #{uploadTime},</if>
</trim>
where sn = #{sn} and upload_time = #{uploadTime}
</update>
<delete id="deleteUploadedPhotosById" parameterType="Long">
delete from uploaded_photos where id = #{id}
</delete>