Showing
1 changed file
with
6 additions
and
2 deletions
@@ -1376,12 +1376,12 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon | @@ -1376,12 +1376,12 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon | ||
1376 | String recipientCity = StringUtils.EMPTY; | 1376 | String recipientCity = StringUtils.EMPTY; |
1377 | String recipientRegion = StringUtils.EMPTY; | 1377 | String recipientRegion = StringUtils.EMPTY; |
1378 | String recipinentAddress = StringUtils.EMPTY; | 1378 | String recipinentAddress = StringUtils.EMPTY; |
1379 | - if (buyerOrderMeta != null && StringUtils.isBlank(buyerOrderMeta.getMetaValue())){ | 1379 | + if (buyerOrderMeta != null && StringUtils.isNoneBlank(buyerOrderMeta.getMetaValue())){ |
1380 | JSONObject jsonObject = JSONObject.parseObject(buyerOrderMeta.getMetaValue()); | 1380 | JSONObject jsonObject = JSONObject.parseObject(buyerOrderMeta.getMetaValue()); |
1381 | mobile = jsonObject.getString("mobile"); | 1381 | mobile = jsonObject.getString("mobile"); |
1382 | consignee = jsonObject.getString("consignee"); | 1382 | consignee = jsonObject.getString("consignee"); |
1383 | String[] areas = jsonObject.getString("area").split("\\s+"); | 1383 | String[] areas = jsonObject.getString("area").split("\\s+"); |
1384 | - if (areas.length ==3){ | 1384 | + if (areas.length >=3){ |
1385 | recipientProvince = areas[0]; | 1385 | recipientProvince = areas[0]; |
1386 | recipientCity = areas[1]; | 1386 | recipientCity = areas[1]; |
1387 | recipientRegion = areas[2]; | 1387 | recipientRegion = areas[2]; |
@@ -1399,6 +1399,10 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon | @@ -1399,6 +1399,10 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon | ||
1399 | 1399 | ||
1400 | BigDecimal price = buyerOrderGoods.getGoodsPrice().subtract(buyerOrderGoods.getCouponCutAmount()).subtract(buyerOrderGoods.getActivityCutAmount()); | 1400 | BigDecimal price = buyerOrderGoods.getGoodsPrice().subtract(buyerOrderGoods.getCouponCutAmount()).subtract(buyerOrderGoods.getActivityCutAmount()); |
1401 | 1401 | ||
1402 | + // 处理空值 | ||
1403 | + buyerOrderGoods.setTariffAmount(new BigDecimal(0)); | ||
1404 | + buyerOrderGoods.setCutTariffAmount(new BigDecimal(0)); | ||
1405 | + | ||
1402 | OrderInfoForPackageNum orderInfoForPackageNum = OrderInfoForPackageNum.builder() | 1406 | OrderInfoForPackageNum orderInfoForPackageNum = OrderInfoForPackageNum.builder() |
1403 | .goodsPrice(buyerOrderGoods.getGoodsPrice()) | 1407 | .goodsPrice(buyerOrderGoods.getGoodsPrice()) |
1404 | .goodsAmount(price) | 1408 | .goodsAmount(price) |
-
Please register or login to post a comment