|
@@ -238,6 +238,23 @@ public class UserOrderServiceImpl extends ServiceImpl<UserOrderDao, UserOrder> i
|
|
|
userOrderVo.setTenantName(tenantInfo.getName());
|
|
|
}
|
|
|
}
|
|
|
+ Map<String,BigDecimal> orderDiscount = new HashMap<>();
|
|
|
+ orderDetilListByOrderNo.forEach(o -> {
|
|
|
+ if (StringUtils.isNotBlank(o.getDiscountJson())) {
|
|
|
+ Map<String,BigDecimal> decimalMap = JSON.parseObject(o.getDiscountJson(), Map.class);
|
|
|
+ decimalMap.forEach((k,v) -> {
|
|
|
+ if (orderDiscount.containsKey(k)) {
|
|
|
+ orderDiscount.put(k,orderDiscount.get(k).add(v));
|
|
|
+ } else {
|
|
|
+ orderDiscount.put(k,v);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // 过滤 金额=0
|
|
|
+ Map<String,BigDecimal> orderDiscountMap = orderDiscount.entrySet().stream().filter(o -> o.getValue().compareTo(BigDecimal.ZERO) > 0).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
|
|
+ userOrderVo.setOrderDiscountMap(orderDiscountMap);
|
|
|
+
|
|
|
for (UserOrderDetailVo userOrderDetailVo : orderDetilListByOrderNo) {
|
|
|
if (userOrderDetailVo.getGoodType().equals(GoodTypeEnum.TENANT_ALBUM)) {
|
|
|
TenantAlbum tenantAlbum = tenantAlbumService.getById(userOrderDetailVo.getBizId());
|