消息推送根据微信号去重

This commit is contained in:
liyj 2025-10-11 15:50:12 +08:00
parent c7ab97f948
commit 1a5d5e3550

View File

@ -762,7 +762,9 @@ public class ShopMessageTemplateServiceImpl extends BaseServiceImpl<ShopMessageT
ExecutorService executor = Executors.newFixedThreadPool(6);
List<Future<?>> futures = new ArrayList<>();
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;
futures.add(executor.submit(() -> {
finalList.forEach(accountUserBindConnect -> {