Commit 71c0a3a9 by 徐康

商品id截取

parent f3ace699
...@@ -185,7 +185,7 @@ public class DeliveryAdapter { ...@@ -185,7 +185,7 @@ public class DeliveryAdapter {
if (CollectionUtils.isNotEmpty(order.getProductList())) { if (CollectionUtils.isNotEmpty(order.getProductList())) {
order.getProductList().forEach(productList -> { order.getProductList().forEach(productList -> {
ProductInfo deliveryProductInfo = new ProductInfo(); ProductInfo deliveryProductInfo = new ProductInfo();
deliveryProductInfo.setProductCode(productList.getProductId()); deliveryProductInfo.setProductCode(productList.getProductId().substring(4));
String productName = StringUtils.isBlank(productList.getSpecificationName()) ? productList.getProductName() : productList.getSpecificationName(); String productName = StringUtils.isBlank(productList.getSpecificationName()) ? productList.getProductName() : productList.getSpecificationName();
OrderProductAddInfoDto extInfo = JSON.parseObject(productList.getExtInfo(), OrderProductAddInfoDto.class); OrderProductAddInfoDto extInfo = JSON.parseObject(productList.getExtInfo(), OrderProductAddInfoDto.class);
if(CollectionUtils.isNotEmpty(extInfo.getSpecialAttrs())) { if(CollectionUtils.isNotEmpty(extInfo.getSpecialAttrs())) {
...@@ -221,7 +221,7 @@ public class DeliveryAdapter { ...@@ -221,7 +221,7 @@ public class DeliveryAdapter {
if(CollectionUtils.isNotEmpty(productList.getComboProduct())) { if(CollectionUtils.isNotEmpty(productList.getComboProduct())) {
productList.getComboProduct().forEach(comboProduct -> { productList.getComboProduct().forEach(comboProduct -> {
ProductInfo deliveryComboProductInfo = new ProductInfo(); ProductInfo deliveryComboProductInfo = new ProductInfo();
deliveryComboProductInfo.setProductCode(comboProduct.getProductId()); deliveryComboProductInfo.setProductCode(comboProduct.getProductId().substring(4));
String productNameCombo = StringUtils.isBlank(comboProduct.getSpecificationName()) ? comboProduct.getProductName() : comboProduct.getSpecificationName(); String productNameCombo = StringUtils.isBlank(comboProduct.getSpecificationName()) ? comboProduct.getProductName() : comboProduct.getSpecificationName();
OrderProductAddInfoDto extInfoCombo = JSON.parseObject(comboProduct.getExtInfo(), OrderProductAddInfoDto.class); OrderProductAddInfoDto extInfoCombo = JSON.parseObject(comboProduct.getExtInfo(), OrderProductAddInfoDto.class);
if(CollectionUtils.isNotEmpty(extInfoCombo.getSpecialAttrs())) { if(CollectionUtils.isNotEmpty(extInfoCombo.getSpecialAttrs())) {
...@@ -251,7 +251,7 @@ public class DeliveryAdapter { ...@@ -251,7 +251,7 @@ public class DeliveryAdapter {
deliveryComboProductInfo.setTaxId(StringUtils.isNotEmpty(orderComboProductAddInfoDto.getTaxId()) ? orderComboProductAddInfoDto.getTaxId() : "10"); deliveryComboProductInfo.setTaxId(StringUtils.isNotEmpty(orderComboProductAddInfoDto.getTaxId()) ? orderComboProductAddInfoDto.getTaxId() : "10");
deliveryComboProductInfo.setTaxRate(orderComboProductAddInfoDto.getTax() > 0 ? orderComboProductAddInfoDto.getTax() : 6); deliveryComboProductInfo.setTaxRate(orderComboProductAddInfoDto.getTax() > 0 ? orderComboProductAddInfoDto.getTax() : 6);
deliveryComboProductInfo.setParentCode(Long.valueOf(comboProduct.getParentProductId().replace("_", ""))); deliveryComboProductInfo.setParentCode(Long.valueOf(comboProduct.getParentProductId().replace("_", "").substring(4)));
deliveryProductInfo.setProductCode(deliveryComboProductInfo.getParentCode()+""); deliveryProductInfo.setProductCode(deliveryComboProductInfo.getParentCode()+"");
if(CollectionUtils.isNotEmpty(comboProduct.getMaterialProduct())) { if(CollectionUtils.isNotEmpty(comboProduct.getMaterialProduct())) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment