Commit 71c0a3a9 by 徐康

商品id截取

parent f3ace699
......@@ -185,7 +185,7 @@ public class DeliveryAdapter {
if (CollectionUtils.isNotEmpty(order.getProductList())) {
order.getProductList().forEach(productList -> {
ProductInfo deliveryProductInfo = new ProductInfo();
deliveryProductInfo.setProductCode(productList.getProductId());
deliveryProductInfo.setProductCode(productList.getProductId().substring(4));
String productName = StringUtils.isBlank(productList.getSpecificationName()) ? productList.getProductName() : productList.getSpecificationName();
OrderProductAddInfoDto extInfo = JSON.parseObject(productList.getExtInfo(), OrderProductAddInfoDto.class);
if(CollectionUtils.isNotEmpty(extInfo.getSpecialAttrs())) {
......@@ -221,7 +221,7 @@ public class DeliveryAdapter {
if(CollectionUtils.isNotEmpty(productList.getComboProduct())) {
productList.getComboProduct().forEach(comboProduct -> {
ProductInfo deliveryComboProductInfo = new ProductInfo();
deliveryComboProductInfo.setProductCode(comboProduct.getProductId());
deliveryComboProductInfo.setProductCode(comboProduct.getProductId().substring(4));
String productNameCombo = StringUtils.isBlank(comboProduct.getSpecificationName()) ? comboProduct.getProductName() : comboProduct.getSpecificationName();
OrderProductAddInfoDto extInfoCombo = JSON.parseObject(comboProduct.getExtInfo(), OrderProductAddInfoDto.class);
if(CollectionUtils.isNotEmpty(extInfoCombo.getSpecialAttrs())) {
......@@ -251,7 +251,7 @@ public class DeliveryAdapter {
deliveryComboProductInfo.setTaxId(StringUtils.isNotEmpty(orderComboProductAddInfoDto.getTaxId()) ? orderComboProductAddInfoDto.getTaxId() : "10");
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()+"");
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