Commit 9db8c113 by ping.wu

Merge remote-tracking branch 'origin/feature-yu.sun-material-20201030' into…

Merge remote-tracking branch 'origin/feature-yu.sun-material-20201030' into feature-yu.sun-material-20201030
parents b53aa9a3 ba4c77a2
......@@ -718,7 +718,6 @@ public class ShoppingCartMCoffeeServiceImpl {
if(!ResponseCodeConstant.RESPONSE_SUCCESS_STR.equals(storeCheckResponse.getCode())) {
shoppingCartGoodsResponseVo.setChanged(true);
shoppingCartGoodsResponseVo.setToastMsg(storeCheckResponse.getMessage());
// return storeCheckResponse;
}
List<CartGoods> cartGoodsList = getOrderGoods(orderInfo.getResult());
......@@ -819,6 +818,16 @@ public class ShoppingCartMCoffeeServiceImpl {
getComboxGoods(cartGoods, combo, orderItemList);
});
}
//特制
if (StringUtils.isNotEmpty(orderItem.getExtInfo())){
JSONObject extJson = JSONObject.parseObject(orderItem.getExtInfo());
CartGoods.SpecialExtra specialExtra = new CartGoods.SpecialExtra();
specialExtra.setAttributeId(extJson.containsKey("attributeId") ? extJson.getString("attributeId") : "");
specialExtra.setAttributeName(extJson.containsKey("attributeName") ? extJson.getString("attributeName") : "");
specialExtra.setAttributeId(extJson.containsKey("specialCode") ? extJson.getString("specialCode") : "");
cartGoods.setSpecialExtra(Arrays.asList(specialExtra));
}
if (ObjectUtils.equals(88, orderItem.getProductType())) {
// 获取套餐子商品列表
cartGoods.setProductMaterialList(new ArrayList<>());
......@@ -852,6 +861,18 @@ public class ShoppingCartMCoffeeServiceImpl {
}
comboxGoods.setExtra(extra);
}
for (OrderItemResp itemResp : orderItemList) {
//特制
if (StringUtils.isNotEmpty(itemResp.getExtInfo())){
JSONObject extJson = JSONObject.parseObject(itemResp.getExtInfo());
CartGoods.SpecialExtra specialExtra = new CartGoods.SpecialExtra();
specialExtra.setAttributeId(extJson.containsKey("attributeId") ? extJson.getString("attributeId") : "");
specialExtra.setAttributeName(extJson.containsKey("attributeName") ? extJson.getString("attributeName") : "");
specialExtra.setAttributeId(extJson.containsKey("specialCode") ? extJson.getString("specialCode") : "");
comboxGoods.setSpecialExtra(Arrays.asList(specialExtra));
}
}
Map<String, Object> map = JSONObject.parseObject(orderItemResp.getExtInfo(), Map.class);
if (map.containsKey("isFixedProduct") && (boolean) map.get("isFixedProduct")) {
cartGoods.getProductComboList().add(comboxGoods);
......
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