提交 d8b1645f 作者: gh

人群包判断修正

上级 62be57d5
......@@ -218,6 +218,8 @@ public class CustomerGraphicsServiceImpl extends ServiceImpl<CustomerGraphicsMap
Date requestDate = integrationRequestDTO.getRequestDate();
long currentTimestamp = requestDate.getTime();
List<CustomerGraphics> customerGraphicsList = list(new QueryWrapper<CustomerGraphics>().eq(CustomerGraphics.COL_POST_TIME, requestDate).eq(CustomerGraphics.COL_SEND_STATUS,9));
List<CrowdPackage> crowdPackageList = crowdPackageService.list();
......@@ -241,7 +243,7 @@ public class CustomerGraphicsServiceImpl extends ServiceImpl<CustomerGraphicsMap
//1.活跃时间判断,2.用户去重
Map<String, List<CrowdPackageUserVO>> appidUserMap = userList.stream()
.filter(a->a.getLastActive()!=null&&(activeTimeMin==null||a.getLastActive().getTime()>activeTimeMin)&&(activeTimeMax==null||a.getLastActive().getTime()<activeTimeMax))
.filter(a->a.getLastActive()!=null&&(activeTimeMin==null||(currentTimestamp-a.getLastActive().getTime())>=activeTimeMin)&&(activeTimeMax==null||(currentTimestamp-a.getLastActive().getTime()<activeTimeMax)))
.collect(Collectors.groupingBy(CrowdPackageUserVO::getAppId, Collectors.collectingAndThen(toCollection(() -> new TreeSet<>(Comparator.comparing(CrowdPackageUserVO::getOpenId))), ArrayList::new)));
//根据客服id找不同公众号的链接,并按appId分组
List<ReferralEntityVo> referralList = referralEntityService.findReferralByCustomerGraphicsId(customerGraphics.getId());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论