| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | resultMap.put("msg",ResponseCodeEnum.SUCCESS.getMsg()); |
| | | //刷新缓存 |
| | | refreshCache(); |
| | | //注销token |
| | | TokenUtils.destoryToken(Integer.parseInt(map.get("id").toString())); |
| | | return resultMap; |
| | | } |
| | | |
| | |
| | | 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; |