fix: 支持套餐商品点餐

This commit is contained in:
张松
2024-12-04 13:40:33 +08:00
parent eace580860
commit 7aed024853
2 changed files with 7 additions and 1 deletions

View File

@@ -49,5 +49,7 @@ public class TbOrderDetail implements Serializable {
private static final long serialVersionUID = 1L;
private Integer isMember;
private String proGroupInfo;
}

View File

@@ -347,7 +347,10 @@ public class CartService {
Integer type = jsonObject.getInteger("type");
Integer buyNum = jsonObject.getInteger("num");
Integer userId = jsonObject.getInteger("userId");
List<Integer> groupProductIdList = jsonObject.getJSONArray("groupProductIdList").toJavaList(Integer.class);
List<Integer> groupProductIdList = null;
if (jsonObject.containsKey("groupProductIdList")) {
groupProductIdList = jsonObject.getJSONArray("groupProductIdList").toJavaList(Integer.class);
}
// 商品备注
String note = jsonObject.getString("note");
if (StringUtils.isBlank(shopId) || StringUtils.isBlank(productId)
@@ -1164,6 +1167,7 @@ public class CartService {
orderDetail.setProductSkuName(productSku.getSpecSnap());
}
orderDetail.setProGroupInfo(cashierCart.getProGroupInfo());
orderDetail.setMemberPrice(cashierCart.getMemberPrice());
orderDetail.setNote(cashierCart.getNote());
orderDetail.setCreateTime(DateUtil.date().toTimestamp());