From 9fd514f624c4899c06f91902d0990704a9b24937 Mon Sep 17 00:00:00 2001
From: lizijie <lzjiiie@163.com>
Date: Mon, 15 Nov 2021 14:16:31 +0800
Subject: [PATCH] 修改报警类型传参

---
 screen-api/src/main/java/com/moral/api/service/impl/AlarmInfoServiceImpl.java |   30 +++++++++++++++---------------
 screen-api/src/main/java/com/moral/api/entity/AlarmInfo.java                  |    2 ++
 2 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/screen-api/src/main/java/com/moral/api/entity/AlarmInfo.java b/screen-api/src/main/java/com/moral/api/entity/AlarmInfo.java
index bc3a6bd..b57b8d0 100644
--- a/screen-api/src/main/java/com/moral/api/entity/AlarmInfo.java
+++ b/screen-api/src/main/java/com/moral/api/entity/AlarmInfo.java
@@ -1,6 +1,7 @@
 package com.moral.api.entity;
 
 import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
 import com.baomidou.mybatisplus.annotation.TableId;
 import java.time.LocalDateTime;
@@ -38,6 +39,7 @@
     /**
      * ������������������
      */
+    @TableField("`index`")
     private String index;
 
     /**
diff --git a/screen-api/src/main/java/com/moral/api/service/impl/AlarmInfoServiceImpl.java b/screen-api/src/main/java/com/moral/api/service/impl/AlarmInfoServiceImpl.java
index 01941d0..34aa0cd 100644
--- a/screen-api/src/main/java/com/moral/api/service/impl/AlarmInfoServiceImpl.java
+++ b/screen-api/src/main/java/com/moral/api/service/impl/AlarmInfoServiceImpl.java
@@ -94,30 +94,30 @@
             String index = parameters.get("index").toString();
             if (!index.equals("all")){
                 map.put("index",index);
-                alarmInfoQueryWrapper.eq("index", index);
+                alarmInfoQueryWrapper.eq("`index`", index);
             }
             String alarmType = parameters.get("alarmType").toString();
             switch (alarmType){
-                case "������" : map.put("alarmType","������");
-                    alarmInfoQueryWrapper.eq("alarmType","������");
+                case "overrun" : map.put("alarmType","������");
+                    alarmInfoQueryWrapper.eq("alarm_type","������");
                     break;
-                case "���������" : map.put("alarmType","���������");
-                    alarmInfoQueryWrapper.eq("alarmType","���������");
+                case "sudden" : map.put("alarmType","���������");
+                    alarmInfoQueryWrapper.eq("alarm_type","���������");
                     break;
-                case "���������100" : map.put("alarmType","������������������100%");
-                    alarmInfoQueryWrapper.eq("alarmType","������������������100%");
+                case "state100" : map.put("alarmType","������������������100%");
+                    alarmInfoQueryWrapper.eq("alarm_type","������������������100%");
                     break;
-                case "���������150" : map.put("alarmType","������������������150%");
-                    alarmInfoQueryWrapper.eq("alarmType","������������������150%");
+                case "state150" : map.put("alarmType","������������������150%");
+                    alarmInfoQueryWrapper.eq("alarm_type","������������������150%");
                     break;
-                case "���������250" : map.put("alarmType","������������������250%");
-                    alarmInfoQueryWrapper.eq("alarmType","������������������250%");
+                case "state250" : map.put("alarmType","������������������250%");
+                    alarmInfoQueryWrapper.eq("alarm_type","������������������250%");
                     break;
-                case "������������150" : map.put("alarmType","������������������150%");
-                    alarmInfoQueryWrapper.eq("alarmType","������������������150%");
+                case "city150" : map.put("alarmType","������������������150%");
+                    alarmInfoQueryWrapper.eq("alarm_type","������������������150%");
                     break;
-                case "������������250" : map.put("alarmType","������������������250%");
-                    alarmInfoQueryWrapper.eq("alarmType","������������������250%");
+                case "city250" : map.put("alarmType","������������������250%");
+                    alarmInfoQueryWrapper.eq("alarm_type","������������������250%");
                     break;
                 default:break;
             }

--
Gitblit v1.8.0