|
|
@@ -172,15 +172,16 @@ public class PromotionUserCouponServiceImpl extends ServiceImpl<PromotionUserCou
|
|
|
vo.setCouponType(batch.getCouponType());
|
|
|
}
|
|
|
|
|
|
- // 查询规则信息
|
|
|
- PromotionCouponRule rule = ruleMapper.selectOne(
|
|
|
+ // 查询规则信息(商品券可含多条,取第一条用于列表展示)
|
|
|
+ List<PromotionCouponRule> rules = ruleMapper.selectList(
|
|
|
new LambdaQueryWrapper<PromotionCouponRule>()
|
|
|
.eq(PromotionCouponRule::getBatchId, coupon.getBatchId()));
|
|
|
- if (rule != null) {
|
|
|
- vo.setThreshold(rule.getThreshold());
|
|
|
- vo.setAmount(rule.getAmount());
|
|
|
- vo.setDiscountRate(rule.getDiscountRate());
|
|
|
- vo.setIsMutex(rule.getIsMutex());
|
|
|
+ if (!rules.isEmpty()) {
|
|
|
+ PromotionCouponRule first = rules.get(0);
|
|
|
+ vo.setThreshold(first.getThreshold());
|
|
|
+ vo.setAmount(first.getAmount());
|
|
|
+ vo.setDiscountRate(first.getDiscountRate());
|
|
|
+ vo.setIsMutex(first.getIsMutex());
|
|
|
}
|
|
|
|
|
|
result.add(vo);
|