lihui001 3 years ago
parent
commit
bc993a1299

+ 1 - 1
zoniot-water/zoniot-water-api/src/main/java/com/zcxk/water/api/dto/AlarmTypePageDto.java

@@ -13,7 +13,7 @@ import lombok.Data;
 public class AlarmTypePageDto extends BasePageDto {
 
     @ApiModelProperty(value="告警类型名称")
-    private String name;
+    private String alarmName;
 
     @ApiModelProperty(value="告警分类 1:设备告警,2:离线告警")
     private Integer alarmCategory;

+ 5 - 2
zoniot-water/zoniot-water-core/src/main/java/com/zcxk/water/core/mapper/AlarmTypeMapper.xml

@@ -241,8 +241,11 @@
       left join sms_device sd on (sp.id = sat.device_id)
       where
       1=1
-      <if test="dto.name !=null and dto.name!=''" >
-        and `name` like concat('%', #{dto.name}, '%')
+      <if test="dto.alarmName !=null and dto.alarmName != ''" >
+        and sat.`name` like concat('%', #{dto.alarmName}, '%')
+      </if>
+      <if test="dto.alarmCategory !=null and dto.alarmCategory!=''" >
+        and sat.alarm_category  = #{dto.alarmCategory}
       </if>
       and sat.status = 1
       <include refid="permissionCondition"></include>