安防增加安防状态

This commit is contained in:
wuyw
2024-08-18 00:06:26 +08:00
parent e949f4ea20
commit d37ea25372
4 changed files with 33 additions and 6 deletions

View File

@ -61,9 +61,11 @@ public class UploadedPhotos extends BaseEntity
/** CPU温度 */
@Excel(name = "CPU温度")
private Double cpuTemp;
/** 事件类型1=振动2=箱门打开,3=人员入侵 */
/** 事件类型1=振动2=箱门打开,3=箱门持续打开 */
@Excel(name = "事件类型")
private String eventType;
@Excel(name = "安防状态:1=布防, 0=撤防")
private String anFangStatus;
/** 上传时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")

View File

@ -18,6 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="uploadTime" column="upload_time" />
<result property="eventType" column="event_type" />
<result property="cpuTemp" column="cpu_temp" />
<result property="anFangStatus" column="an_fang_status" />
</resultMap>
<sql id="selectUploadedPhotosVo">
@ -38,6 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="eventType != null and eventType != ''"> and event_type = #{eventType}</if>
<if test="cpuTemp != null and cpuTemp != ''"> and cpu_temp = #{cpuTemp}</if>
<if test="shakeState != null and shakeState != ''"> and shake_state = #{shakeState}</if>
<if test="anFangStatus != null and anFangStatus != ''"> and an_fang_status = #{anFangStatus}</if>
<if test="params.beginUploadTime != null and params.beginUploadTime != '' and params.endUploadTime != null and params.endUploadTime != ''"> and upload_time between #{params.beginUploadTime} and #{params.endUploadTime}</if>
</where>
order by id desc
@ -63,6 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="uploadTime != null">upload_time,</if>
<if test="eventType != null">event_type,</if>
<if test="cpuTemp != null">cpu_temp,</if>
<if test="anFangStatus != null">an_fang_status,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="photoPath != null and photoPath != ''">#{photoPath},</if>
@ -77,6 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="uploadTime != null">#{uploadTime},</if>
<if test="eventType != null">#{eventType},</if>
<if test="cpuTemp != null">#{cpuTemp},</if>
<if test="anFangStatus != null">#{anFangStatus},</if>
</trim>
</insert>
@ -95,6 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="uploadTime != null">upload_time = #{uploadTime},</if>
<if test="eventType != null">event_type = #{eventType},</if>
<if test="cpuTemp != null">cpu_temp = #{cpuTemp},</if>
<if test="anFangStatus != null">an_fang_status = #{anFangStatus},</if>
</trim>
where id = #{id}
</update>
@ -114,6 +119,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="uploadTime != null">upload_time = #{uploadTime},</if>
<if test="eventType != null">event_type = #{eventType},</if>
<if test="cpuTemp != null">cpu_temp = #{cpuTemp},</if>
<if test="anFangStatus != null">an_fang_status = #{anFangStatus},</if>
</trim>
where sn = #{sn} and upload_time = #{uploadTime}
</update>