From 38125c756f9f3139bed2939e9d3ba7801f0ebb64 Mon Sep 17 00:00:00 2001
From: lizijie <lzjiiie@163.com>
Date: Mon, 24 May 2021 09:51:30 +0800
Subject: [PATCH] 修改返回数据集合名称;角色变更时刷新缓存,注销token

---
 screen-manage/src/main/java/com/moral/api/service/impl/SensorServiceImpl.java |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/screen-manage/src/main/java/com/moral/api/service/impl/SensorServiceImpl.java b/screen-manage/src/main/java/com/moral/api/service/impl/SensorServiceImpl.java
index ed60274..845f996 100644
--- a/screen-manage/src/main/java/com/moral/api/service/impl/SensorServiceImpl.java
+++ b/screen-manage/src/main/java/com/moral/api/service/impl/SensorServiceImpl.java
@@ -14,6 +14,7 @@
 import com.moral.constant.Constants;
 import com.moral.constant.RedisConstants;
 import com.moral.constant.ResponseCodeEnum;
+import com.moral.util.TokenUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.stereotype.Service;
@@ -189,7 +190,7 @@
             sensorMap.put("key",sensor.getId());
             sensorList.add(sensorMap);
         }
-        resultMap.put("manageRoles",sensorList);
+        resultMap.put("sensors",sensorList);
         resultMap.put("totalNumber",totleNum);
         resultMap.put("current",current);
         int totalPageNumber = totleNum/size;
@@ -230,6 +231,8 @@
         resultMap.put("msg",ResponseCodeEnum.SUCCESS.getMsg());
         //������������
         refreshCache();
+        //������token
+        TokenUtils.destoryToken(Integer.parseInt(map.get("id").toString()));
         return resultMap;
     }
 
@@ -262,7 +265,7 @@
             sensorMap.put("key",sensor.getId());
             sensorList.add(sensorMap);
         }
-        resultMap.put("manageRoles",sensorList);
+        resultMap.put("sensors",sensorList);
         resultMap.put("totalNumber",totleNum);
         resultMap.put("current",current);
         int totalPageNumber = totleNum/size;

--
Gitblit v1.8.0