Commit 26fa313d by 徐高华

群活码

parent 7e90922a
...@@ -223,7 +223,7 @@ public class HmLinkApiServiceImpl implements HmLinkApiService { ...@@ -223,7 +223,7 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
hmQDTO.setInStoreId(inStoreId); hmQDTO.setInStoreId(inStoreId);
List<GroupChatHmBO> hmBOList = joinRuleManager.handleMainStore(hmQDTO); List<GroupChatHmBO> hmBOList = joinRuleManager.handleMainStore(hmQDTO);
if(CollectionUtils.isNotEmpty(hmBOList)) { if(CollectionUtils.isNotEmpty(hmBOList)) {
int sort = new Random(hmBOList.size()).nextInt() ; int sort = new Random().nextInt(hmBOList.size()) ;
hmId = hmBOList.get(sort).getChatHmId() ; hmId = hmBOList.get(sort).getChatHmId() ;
} }
}else { }else {
...@@ -237,7 +237,7 @@ public class HmLinkApiServiceImpl implements HmLinkApiService { ...@@ -237,7 +237,7 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
log.info("服务门店"); log.info("服务门店");
List<GroupChatHmBO> hmBOList = joinRuleManager.handleMainStore(hmQDTO); List<GroupChatHmBO> hmBOList = joinRuleManager.handleMainStore(hmQDTO);
if(CollectionUtils.isNotEmpty(hmBOList)) { if(CollectionUtils.isNotEmpty(hmBOList)) {
int sort = new Random(hmBOList.size()).nextInt() ; int sort = new Random().nextInt(hmBOList.size()) ;
hmId = hmBOList.get(sort).getChatHmId() ; hmId = hmBOList.get(sort).getChatHmId() ;
break; break;
} }
...@@ -245,7 +245,7 @@ public class HmLinkApiServiceImpl implements HmLinkApiService { ...@@ -245,7 +245,7 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
log.info("协管门店"); log.info("协管门店");
List<GroupChatHmBO> hmBOList = joinRuleManager.handleOtherStore(hmQDTO); List<GroupChatHmBO> hmBOList = joinRuleManager.handleOtherStore(hmQDTO);
if(CollectionUtils.isNotEmpty(hmBOList)) { if(CollectionUtils.isNotEmpty(hmBOList)) {
int sort = new Random(hmBOList.size()).nextInt() ; int sort = new Random().nextInt(hmBOList.size()) ;
hmId = hmBOList.get(sort).getChatHmId() ; hmId = hmBOList.get(sort).getChatHmId() ;
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment