Commit 0744daab by ping.wu

属性英文修改

parent 19d81d18
......@@ -929,6 +929,7 @@ public class OrderSdkAdapter {
map.put("attributeForeignNames", orderItemResp.getProductForeignProperty());
productBean.setAddInfo(JSONObject.toJSONString(map));
productBean.setProductProperty(orderItemResp.getProductProperty());
productBean.setProductForeignProperty(orderItemResp.getProductForeignProperty());
productBean.setExtInfo(orderItemResp.getExtInfo());
productBean.setNote(orderItemResp.getNote());
......
......@@ -2131,6 +2131,8 @@ public class OrderAdapter {
productVo.setOriginalPrice(productBean.getPrice());
productVo.setFinalPrice(productBean.getSalePrice());
productVo.setExtras(shoppingCartAdapter.getExtraName(productBean.getSpecificationName(), attributeNames));
productVo.setForeignExtras(shoppingCartAdapter.getForeignExtras(productBean.getSpecificationForeignName(), productBean.getProductForeignProperty()));
productVo.setAttributeNamesEn(productBean.getProductForeignProperty());
//计算商品原总金额=商品原价格 * 商品数量
Long originalTotalAmount = productBean.getPrice() * productBean.getNumber();
if(ProductTypeEnum.WEIGHT_PRODUCT.getCode().equals(productBean.getProductType())){
......
......@@ -53,4 +53,26 @@ public class ShoppingCartAdapter {
}
return extraName.toString();
}
public String getForeignExtras(String skuNameEn, String attributeNamesEn) {
if (StringUtils.isBlank(skuNameEn)) {
skuNameEn = "";
}
if (StringUtils.isBlank(attributeNamesEn)) {
attributeNamesEn = "";
}
skuNameEn = skuNameEn.replace("|", "/") + "/" + attributeNamesEn;
String[] names = skuNameEn.split("/");
StringBuilder extraName = new StringBuilder("");
if (names.length >= 2) {
for (int i = 1; i < names.length; i++) {
if (i == names.length - 1) {
extraName.append(names[i]);
} else {
extraName.append(names[i]).append("/");
}
}
}
return extraName.toString();
}
}
......@@ -15,7 +15,7 @@ public class OrderProductAddInfo {
*/
private String attributeNames;
private String attributeForeignName;
private String attributeForeignNames;
/**
* 活动商品集合
*/
......
......@@ -314,7 +314,7 @@ public class ShoppingCartGoodsDto {
extras = extraList.stream().map(CartGoodsDetailDto.CartGoodsExtra::getAttributeName).collect(Collectors.joining("/"));
foreignExtras = extraList.stream().map(CartGoodsDetailDto.CartGoodsExtra::getAttributeForeignName).collect(Collectors.joining("/"));
}
return JSON.toJSONString(OrderProductAddInfo.builder().attributeNames(extras).attributeForeignName(foreignExtras).build());
return JSON.toJSONString(OrderProductAddInfo.builder().attributeNames(extras).attributeForeignNames(foreignExtras).build());
}
}
......
......@@ -152,6 +152,11 @@ public class ProductVo {
* 属性名称 订单详情展示 V1.5.2版本增加
*/
private String attributeNames;
/**
* 属性名称英文
*/
private String attributeNamesEn;
/**
* 是否包含商品券 V1.5.2版本增加
*/
......
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