From ca91d0e9fff1701da9d1235f6169c3bb5773a817 Mon Sep 17 00:00:00 2001 From: liujiang <569804566@qq.com> Date: Wed, 3 Dec 2025 22:21:13 +0800 Subject: [PATCH] =?UTF-8?q?master=EF=BC=9A=E5=B7=B2=E8=B4=AD=E6=8E=A8?= =?UTF-8?q?=E5=B9=BF=E4=BD=8DBUG=E4=BF=AE=E5=A4=8D=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/xkt/service/impl/AdvertRoundServiceImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xkt/src/main/java/com/ruoyi/xkt/service/impl/AdvertRoundServiceImpl.java b/xkt/src/main/java/com/ruoyi/xkt/service/impl/AdvertRoundServiceImpl.java index 6970c9dde..8796365bf 100644 --- a/xkt/src/main/java/com/ruoyi/xkt/service/impl/AdvertRoundServiceImpl.java +++ b/xkt/src/main/java/com/ruoyi/xkt/service/impl/AdvertRoundServiceImpl.java @@ -448,16 +448,16 @@ public class AdvertRoundServiceImpl implements IAdvertRoundService { .filter(x -> Objects.equals(x.getShowType(), AdShowType.POSITION_ENUM.getValue())) .filter(x -> ObjectUtils.isNotEmpty(x.getPayPrice())) .collect(Collectors.toMap(AdvertRound::getId, AdvertRound::getPayPrice)); - // 已购买的 时间范围播放轮次 的roundId列表 - final List boughtTimeRangeRoundIdList = boughtRoundList.stream().filter(x -> Objects.equals(x.getShowType(), AdShowType.TIME_RANGE.getValue())) - .map(AdRoundStoreBoughtResDTO::getRoundId).collect(Collectors.toList()); + // 已购买的 时间范围播放轮次 的 typeId 和 roundId 列表 + final List boughtTimeRangeMultiKeyList = boughtRoundList.stream().filter(x -> Objects.equals(x.getShowType(), AdShowType.TIME_RANGE.getValue())) + .map(x -> x.getTypeId().toString() + ":" + x.getRoundId().toString()).collect(Collectors.toList()); // 已购买的 位置枚举 的 advertRoundId 列表 final List boughtPositionAdvertRoundIdList = boughtRoundList.stream().filter(x -> Objects.equals(x.getShowType(), AdShowType.POSITION_ENUM.getValue())) .map(AdRoundStoreBoughtResDTO::getAdvertRoundId).collect(Collectors.toList()); // 购买失败的 时间范围播放轮次的 列表 Map boughtFailTimeRangeMap = allRecordList.stream() .filter(x -> Objects.equals(x.getShowType(), AdShowType.TIME_RANGE.getValue())) - .filter(x -> !boughtTimeRangeRoundIdList.contains(x.getRoundId())) + .filter(x -> !boughtTimeRangeMultiKeyList.contains(x.getTypeId().toString() + ":" + x.getRoundId().toString())) .collect(Collectors.toMap(AdvertRoundRecord::getRoundId, Function.identity(), BinaryOperator.maxBy(Comparator.comparingLong(AdvertRoundRecord::getId)))); // 购买失败的 位置枚举播放轮次的 列表