Commit 6e56ca4b2e39af9e78b5ad95879693b6a16cb5a4
1 parent
267cd7ac
【bug】解决满减活动未到时间,还显示的问题
Showing
1 changed file
with
5 additions
and
4 deletions
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<RewardActivityDO> { |
| 66 | 66 | .eq(RewardActivityDO::getStatus,status) |
| 67 | 67 | .lt(RewardActivityDO::getStartTime, dateTime) |
| 68 | 68 | .gt(RewardActivityDO::getEndTime, dateTime) |
| 69 | - .and(i -> i. eq(RewardActivityDO::getProductScope, PromotionProductScopeEnum.SPU.getScope()).and(i1 -> i1.apply(productScopeValuesFindInSetFunc.apply(spuIds)))) | |
| 70 | - .or(i -> i.eq(RewardActivityDO::getProductScope, PromotionProductScopeEnum.ALL.getScope())) | |
| 71 | - .or(i -> i. eq(RewardActivityDO::getProductScope, PromotionProductScopeEnum.CATEGORY.getScope()).and(i1 -> i1.apply(productScopeValuesFindInSetFunc.apply(categoryIds)))) | |
| 69 | + .and(i -> i.eq(RewardActivityDO::getProductScope, PromotionProductScopeEnum.SPU.getScope()) | |
| 70 | + .and(i1 -> i1.apply(productScopeValuesFindInSetFunc.apply(spuIds))) | |
| 71 | + .or(i1 -> i1.eq(RewardActivityDO::getProductScope, PromotionProductScopeEnum.ALL.getScope())) | |
| 72 | + .or(i1 -> i1.eq(RewardActivityDO::getProductScope, PromotionProductScopeEnum.CATEGORY.getScope()) | |
| 73 | + .and(i2 -> i2.apply(productScopeValuesFindInSetFunc.apply(categoryIds))))) | |
| 72 | 74 | .orderByDesc(RewardActivityDO::getId) |
| 73 | - .last("limit 1") | |
| 74 | 75 | ); |
| 75 | 76 | } |
| 76 | 77 | ... | ... |