Przeglądaj źródła

Merge remote-tracking branch 'origin/feature/1020-tencent-im' into feature/1020-tencent-im

Eric 1 rok temu
rodzic
commit
4e03b4451c

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ImGroupServiceImpl.java

@@ -1263,7 +1263,7 @@ public class ImGroupServiceImpl extends BaseServiceImpl<String, ImGroup> impleme
                     privateImportMessage.setToAccount(targetIdUserId);
                     //设置随机数
                     if (i.getMsgRandom() == null) {
-                        int nextInt = new Random().nextInt();
+                        int nextInt = Math.abs(new Random().nextInt());
                         privateImportMessage.setMsgRandom(nextInt);
                         i.setMsgRandom(nextInt);
                     } else {
@@ -1271,7 +1271,7 @@ public class ImGroupServiceImpl extends BaseServiceImpl<String, ImGroup> impleme
                     }
 
                     if (i.getMsgSeq() == null) {
-                        int nextInt = new Random().nextInt();
+                        int nextInt = Math.abs(new Random().nextInt());
                         i.setMsgSeq(nextInt);
                         privateImportMessage.setMsgSeq(nextInt);
                     } else {