lizijie
2021-05-24 38125c756f9f3139bed2939e9d3ba7801f0ebb64
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;