安防告警增加类型和cpu温度告警
This commit is contained in:
@ -58,6 +58,12 @@ public class UploadedPhotos extends BaseEntity
|
||||
/** 震动状态信息 */
|
||||
@Excel(name = "震动状态信息")
|
||||
private String shakeState;
|
||||
/** CPU温度 */
|
||||
@Excel(name = "CPU温度")
|
||||
private Double cpuTemp;
|
||||
/** 事件类型:1=振动,2=箱门打开,3=人员入侵 */
|
||||
@Excel(name = "事件类型")
|
||||
private String eventType;
|
||||
|
||||
/** 上传时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
|
@ -16,10 +16,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="doorState" column="door_state" />
|
||||
<result property="shakeState" column="shake_state" />
|
||||
<result property="uploadTime" column="upload_time" />
|
||||
<result property="eventType" column="event_type" />
|
||||
<result property="cpuTemp" column="cpu_temp" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectUploadedPhotosVo">
|
||||
select id, photo_path,monitor_path, imei, sn, lat, lng, temp, door_state, shake_state, upload_time from uploaded_photos
|
||||
select * from uploaded_photos
|
||||
</sql>
|
||||
|
||||
<select id="selectUploadedPhotosList" parameterType="com.fastbee.iot.model.anfang.UploadedPhotos"
|
||||
@ -33,10 +35,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="lng != null "> and lng = #{lng}</if>
|
||||
<if test="params.beginTemp != null and params.beginTemp != '' and params.endTemp != null and params.endTemp != ''"> and temp between #{params.beginTemp} and #{params.endTemp}</if>
|
||||
<if test="doorState != null and doorState != ''"> and door_state = #{doorState}</if>
|
||||
<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="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
|
||||
order by id desc
|
||||
</select>
|
||||
|
||||
<select id="selectUploadedPhotosById" parameterType="Long" resultMap="UploadedPhotosResult">
|
||||
@ -57,6 +61,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="doorState != null">door_state,</if>
|
||||
<if test="shakeState != null">shake_state,</if>
|
||||
<if test="uploadTime != null">upload_time,</if>
|
||||
<if test="eventType != null">event_type,</if>
|
||||
<if test="cpuTemp != null">cpu_temp,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="photoPath != null and photoPath != ''">#{photoPath},</if>
|
||||
@ -69,6 +75,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="doorState != null">#{doorState},</if>
|
||||
<if test="shakeState != null">#{shakeState},</if>
|
||||
<if test="uploadTime != null">#{uploadTime},</if>
|
||||
<if test="eventType != null">#{eventType},</if>
|
||||
<if test="cpuTemp != null">#{cpuTemp},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -85,6 +93,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="doorState != null">door_state = #{doorState},</if>
|
||||
<if test="shakeState != null">shake_state = #{shakeState},</if>
|
||||
<if test="uploadTime != null">upload_time = #{uploadTime},</if>
|
||||
<if test="eventType != null">event_type = #{eventType},</if>
|
||||
<if test="cpuTemp != null">cpu_temp = #{cpuTemp},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@ -102,6 +112,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="doorState != null">door_state = #{doorState},</if>
|
||||
<if test="shakeState != null">shake_state = #{shakeState},</if>
|
||||
<if test="uploadTime != null">upload_time = #{uploadTime},</if>
|
||||
<if test="eventType != null">event_type = #{eventType},</if>
|
||||
<if test="cpuTemp != null">cpu_temp = #{cpuTemp},</if>
|
||||
</trim>
|
||||
where sn = #{sn} and upload_time = #{uploadTime}
|
||||
</update>
|
||||
|
Reference in New Issue
Block a user