消息推送根据微信号去重

This commit is contained in:
liyj 2025-10-11 15:50:12 +08:00
parent 3e7c7f8cd9
commit 13ec66d045

View File

@ -762,7 +762,9 @@ public class ShopMessageTemplateServiceImpl extends BaseServiceImpl<ShopMessageT
ExecutorService executor = Executors.newFixedThreadPool(6); ExecutorService executor = Executors.newFixedThreadPool(6);
List<Future<?>> futures = new ArrayList<>(); List<Future<?>> futures = new ArrayList<>();
for (int i = 1; i <= pages; i++) { for (int i = 1; i <= pages; i++) {
List<AccountUserBindConnect> finalList = accountService.getAllBindPage(CommonConstant.BIND_SUB_TMPL_SKILL, i, BATCH_SIZE); List<AccountUserBindConnect> finalList = accountService.getAllBindPage(CommonConstant.BIND_SUB_TMPL_SKILL, i, BATCH_SIZE)
.stream().filter(com.suisung.mall.common.utils.CommonUtil.distinctByKey(AccountUserBindConnect::getBind_openid))
.collect(Collectors.toList());
int finalI = i; int finalI = i;
futures.add(executor.submit(() -> { futures.add(executor.submit(() -> {
finalList.forEach(accountUserBindConnect -> { finalList.forEach(accountUserBindConnect -> {