|
|
@@ -1,5 +1,7 @@
|
|
|
package com.nb.im.room;
|
|
|
|
|
|
+import cn.hutool.core.collection.CollectionUtil;
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
import lombok.Getter;
|
|
|
import org.redisson.api.*;
|
|
|
|
|
|
@@ -86,7 +88,13 @@ public class ImRoomOperator {
|
|
|
* @return void
|
|
|
*/
|
|
|
public void readUnreadMsg(String userId, List<String> key){
|
|
|
- getSet(userId).removeAll(key);
|
|
|
+ if(CollectionUtil.isEmpty(key)){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ RSet<String> set = getSet(userId);
|
|
|
+ if(ObjectUtil.isNotNull(set)){
|
|
|
+ set.removeAll(key);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|