|
@@ -242,12 +242,12 @@ public class UserOrderServiceImpl extends ServiceImpl<UserOrderDao, UserOrder> i
|
|
Map<String,BigDecimal> orderDiscount = new HashMap<>();
|
|
Map<String,BigDecimal> orderDiscount = new HashMap<>();
|
|
orderDetilListByOrderNo.forEach(o -> {
|
|
orderDetilListByOrderNo.forEach(o -> {
|
|
if (StringUtils.isNotBlank(o.getDiscountJson())) {
|
|
if (StringUtils.isNotBlank(o.getDiscountJson())) {
|
|
- Map<String,BigDecimal> decimalMap = JSON.parseObject(o.getDiscountJson(), Map.class);
|
|
|
|
- decimalMap.forEach((k,v) -> {
|
|
|
|
|
|
+ JSONObject jsonObject = JSON.parseObject(o.getDiscountJson(), JSONObject.class);
|
|
|
|
+ jsonObject.forEach((k,v) -> {
|
|
if (orderDiscount.containsKey(k)) {
|
|
if (orderDiscount.containsKey(k)) {
|
|
- orderDiscount.put(k,orderDiscount.get(k).add(v));
|
|
|
|
|
|
+ orderDiscount.put(k,orderDiscount.get(k).add(new BigDecimal(v.toString())));
|
|
} else {
|
|
} else {
|
|
- orderDiscount.put(k,v);
|
|
|
|
|
|
+ orderDiscount.put(k,new BigDecimal(v.toString()));
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|