|
|
@ -78,6 +78,10 @@ public class OrderCreateService { |
|
|
|
if (goodsSpecs == null) { |
|
|
|
if (goodsSpecs == null) { |
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的商品规格"); |
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的商品规格"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
JSONObject businessObj = orderChild.getBusiness()==null? new JSONObject(): new JSONObject((Map<String, Object>) orderChild.getBusiness()); |
|
|
|
|
|
|
|
if (businessObj.getLong("shopCartId") != null) { |
|
|
|
|
|
|
|
shoppingCartService.delete(businessObj.getLong("shopCartId")); |
|
|
|
|
|
|
|
} |
|
|
|
orderChild.setMerId(goodsMsg.getMerId()); |
|
|
|
orderChild.setMerId(goodsMsg.getMerId()); |
|
|
|
orderChild.setProductName(goodsMsg.getTitle()); |
|
|
|
orderChild.setProductName(goodsMsg.getTitle()); |
|
|
|
orderChild.setProductImg(goodsMsg.getListImg()); |
|
|
|
orderChild.setProductImg(goodsMsg.getListImg()); |
|
|
@ -112,7 +116,7 @@ public class OrderCreateService { |
|
|
|
orderCoupon.setStatus(OrderChildStatusEnum.status1.getCode()); |
|
|
|
orderCoupon.setStatus(OrderChildStatusEnum.status1.getCode()); |
|
|
|
orderCouponService.editData(orderCoupon); |
|
|
|
orderCouponService.editData(orderCoupon); |
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i <= orderCoupon.getGoodsCount(); i++) { |
|
|
|
for (int i = 0; i < orderCoupon.getGoodsCount(); i++) { |
|
|
|
// 卡券订单卡密
|
|
|
|
// 卡券订单卡密
|
|
|
|
BsOrderCouponNo orderCouponNo = new BsOrderCouponNo(); |
|
|
|
BsOrderCouponNo orderCouponNo = new BsOrderCouponNo(); |
|
|
|
orderCouponNo.setCouponOrderId(orderCoupon.getId()); |
|
|
|
orderCouponNo.setCouponOrderId(orderCoupon.getId()); |
|
|
|