From 6e56ca4b2e39af9e78b5ad95879693b6a16cb5a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=97=B4=E8=B4=A7?= <252048765@qq.com> Date: Sat, 14 Sep 2024 20:06:54 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90bug=E3=80=91=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E6=BB=A1=E5=87=8F=E6=B4=BB=E5=8A=A8=E6=9C=AA=E5=88=B0=E6=97=B6?= =?UTF-8?q?=E9=97=B4=EF=BC=8C=E8=BF=98=E6=98=BE=E7=A4=BA=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../promotion/dal/mysql/reward/RewardActivityMapper.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/reward/RewardActivityMapper.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/reward/RewardActivityMapper.java index 06703a0f1..5abbc9265 100755 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/reward/RewardActivityMapper.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/reward/RewardActivityMapper.java @@ -66,11 +66,12 @@ public interface RewardActivityMapper extends BaseMapperX { .eq(RewardActivityDO::getStatus,status) .lt(RewardActivityDO::getStartTime, dateTime) .gt(RewardActivityDO::getEndTime, dateTime) - .and(i -> i. eq(RewardActivityDO::getProductScope, PromotionProductScopeEnum.SPU.getScope()).and(i1 -> i1.apply(productScopeValuesFindInSetFunc.apply(spuIds)))) - .or(i -> i.eq(RewardActivityDO::getProductScope, PromotionProductScopeEnum.ALL.getScope())) - .or(i -> i. eq(RewardActivityDO::getProductScope, PromotionProductScopeEnum.CATEGORY.getScope()).and(i1 -> i1.apply(productScopeValuesFindInSetFunc.apply(categoryIds)))) + .and(i -> i.eq(RewardActivityDO::getProductScope, PromotionProductScopeEnum.SPU.getScope()) + .and(i1 -> i1.apply(productScopeValuesFindInSetFunc.apply(spuIds))) + .or(i1 -> i1.eq(RewardActivityDO::getProductScope, PromotionProductScopeEnum.ALL.getScope())) + .or(i1 -> i1.eq(RewardActivityDO::getProductScope, PromotionProductScopeEnum.CATEGORY.getScope()) + .and(i2 -> i2.apply(productScopeValuesFindInSetFunc.apply(categoryIds))))) .orderByDesc(RewardActivityDO::getId) - .last("limit 1") ); }