diff --git a/src/main/java/com/jmfy/controller/NoticeController.java b/src/main/java/com/jmfy/controller/NoticeController.java index 9c7a10c..a8e25e7 100644 --- a/src/main/java/com/jmfy/controller/NoticeController.java +++ b/src/main/java/com/jmfy/controller/NoticeController.java @@ -71,8 +71,10 @@ public class NoticeController { continue; } } - String[] string= new String[remove.size()]; - RedisUtil.getInstence().delMapKey(RedisUserKey.NOTICE,"",remove.toArray(string)); + if(!remove.isEmpty()){ + String[] string= new String[remove.size()]; + RedisUtil.getInstence().delMapKey(RedisUserKey.NOTICE,"",remove.toArray(string)); + } return 0; }