Commit 6e56ca4b2e39af9e78b5ad95879693b6a16cb5a4

Authored by 痴货
1 parent 267cd7ac

【bug】解决满减活动未到时间,还显示的问题

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,11 +66,12 @@ public interface RewardActivityMapper extends BaseMapperX<RewardActivityDO> {
66 .eq(RewardActivityDO::getStatus,status) 66 .eq(RewardActivityDO::getStatus,status)
67 .lt(RewardActivityDO::getStartTime, dateTime) 67 .lt(RewardActivityDO::getStartTime, dateTime)
68 .gt(RewardActivityDO::getEndTime, dateTime) 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 .orderByDesc(RewardActivityDO::getId) 74 .orderByDesc(RewardActivityDO::getId)
73 - .last("limit 1")  
74 ); 75 );
75 } 76 }
76 77