Commit 69692d73 authored by chenfm's avatar chenfm

告警查询接口增加筛选条件

parent b3ffcd33
......@@ -32,8 +32,9 @@ public class AlarmListForm {
@NotNull(message = "参数pageSize不能为空", groups = {ValidatorList.class})
private Integer pageSize;
private Long deviceType;
private String deviceName;
private Long deviceInstance;
private Integer alarmLevel;
......
......@@ -25,8 +25,11 @@
left join data_model model on rule.model_id = model.id
left join data_model_property property on rule.property_id = property.id
<where>
<if test="alarmListForm.deviceName != null">
device.name like '%${alarmListForm.deviceName}%'
<if test="alarmListForm.deviceType != null">
device.device_type_id = #{alarmListForm.deviceType}
</if>
<if test="alarmListForm.deviceInstance != null">
and device.id = #{alarmListForm.deviceInstance}
</if>
<if test="alarmListForm.alarmLevel != null">
and rule.alarm_level = #{alarmListForm.alarmLevel}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment