|
@@ -290,23 +290,6 @@ public class UserOrderServiceImpl extends ServiceImpl<UserOrderDao, UserOrder> i
|
|
|
});
|
|
|
userOrderVo.setOrderDetailList(orderDetilList);
|
|
|
|
|
|
- // 会员,畅学卡 返回周期类
|
|
|
- List<Long> memberPriceSettingsIds = orderDetilList.stream()
|
|
|
- .filter(o -> Lists.newArrayList(GoodTypeEnum.DISCOUNT, GoodTypeEnum.VIP, GoodTypeEnum.SVIP).contains(o.getGoodType()))
|
|
|
- .map(UserOrderDetail::getBizId)
|
|
|
- .filter(Objects::nonNull)
|
|
|
- .collect(Collectors.toList());
|
|
|
- if (CollectionUtils.isNotEmpty(memberPriceSettingsIds)) {
|
|
|
- Map<Long, MemberPriceSettings> memberPriceSettingsMap = memberPriceSettingsService.getMapByIds(memberPriceSettingsIds);
|
|
|
- orderDetilList.forEach(o -> {
|
|
|
- if (Lists.newArrayList(GoodTypeEnum.DISCOUNT, GoodTypeEnum.VIP, GoodTypeEnum.SVIP).contains(o.getGoodType())) {
|
|
|
- MemberPriceSettings memberPriceSettings = memberPriceSettingsMap.get(o.getBizId());
|
|
|
- if (memberPriceSettings != null) {
|
|
|
- o.setPeriod(memberPriceSettings.getPeriod());
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
|
|
|
|
|
|
// 计算优惠券金额
|
|
@@ -331,6 +314,23 @@ public class UserOrderServiceImpl extends ServiceImpl<UserOrderDao, UserOrder> i
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+ // 会员,畅学卡 返回周期类
|
|
|
+ List<Long> memberPriceSettingsIds = userOrderDetailVos.stream()
|
|
|
+ .filter(o -> Lists.newArrayList(GoodTypeEnum.DISCOUNT, GoodTypeEnum.VIP, GoodTypeEnum.SVIP).contains(o.getGoodType()))
|
|
|
+ .map(UserOrderDetail::getBizId)
|
|
|
+ .filter(Objects::nonNull)
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ if (CollectionUtils.isNotEmpty(memberPriceSettingsIds)) {
|
|
|
+ Map<Long, MemberPriceSettings> memberPriceSettingsMap = memberPriceSettingsService.getMapByIds(memberPriceSettingsIds);
|
|
|
+ userOrderDetailVos.forEach(o -> {
|
|
|
+ if (Lists.newArrayList(GoodTypeEnum.DISCOUNT, GoodTypeEnum.VIP, GoodTypeEnum.SVIP).contains(o.getGoodType())) {
|
|
|
+ MemberPriceSettings memberPriceSettings = memberPriceSettingsMap.get(o.getBizId());
|
|
|
+ if (memberPriceSettings != null) {
|
|
|
+ o.setPeriod(memberPriceSettings.getPeriod());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
userOrderVo.setOrderDetailList(userOrderDetailVos);
|
|
|
}
|
|
|
}
|