Commit 125b619c by 徐康

啡常月享卡

parent 16dfad36
......@@ -18,6 +18,7 @@ import com.freemud.sdk.api.assortment.order.enums.QueryOrderAccountType;
import com.freemud.sdk.api.assortment.order.request.order.CreateOrderProductRequest;
import com.freemud.sdk.api.assortment.order.request.order.OrderProductAddInfoDto;
import com.freemud.sdk.api.assortment.order.request.order.OrderSpecialExtraAttrRequest;
import com.freemud.sdk.api.assortment.order.response.order.QueryOrdersResponse;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Component;
......@@ -185,14 +186,20 @@ public class DeliveryAdapter {
String attr = "";
for (OrderSpecialExtraAttrRequest special : extInfo.getSpecialAttrs()) {
if(special.getAttributeName().indexOf("冰") >= 0) {
attr += special.getAttributeName()+",";
attr = special.getAttributeName();
break;
}
}
if(attr.length() > 0) {
attr = attr.substring(0, attr.length()-1);
productName += "("+attr+")";
}
}
if(CollectionUtils.isNotEmpty(productList.getMaterialProduct())) {
for (QueryOrdersResponseDto.DataBean.OrderBean.ProductBean material : productList.getMaterialProduct()) {
productName += "/"+material.getSpecificationName();
}
}
deliveryProductInfo.setProductName(productName);
deliveryProductInfo.setProductNumber(productList.getNumber());
deliveryProductInfo.setProductPrice(productList.getPrice().intValue());
......@@ -215,14 +222,20 @@ public class DeliveryAdapter {
String attr = "";
for (OrderSpecialExtraAttrRequest special : extInfoCombo.getSpecialAttrs()) {
if(special.getAttributeName().indexOf("冰") >= 0) {
attr += special.getAttributeName()+",";
attr = special.getAttributeName();
break;
}
}
if(attr.length() > 0) {
attr = attr.substring(0, attr.length()-1);
productNameCombo += "("+attr+")";
}
}
if(CollectionUtils.isNotEmpty(comboProduct.getMaterialProduct())) {
for (QueryOrdersResponseDto.DataBean.OrderBean.ProductBean material : comboProduct.getMaterialProduct()) {
productNameCombo += "/"+material.getSpecificationName();
}
}
deliveryComboProductInfo.setProductName(productNameCombo);
deliveryComboProductInfo.setProductNumber(comboProduct.getNumber()/productList.getNumber());
deliveryComboProductInfo.setProductPrice(comboProduct.getPrice().intValue());
......
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