master
袁野 6 months ago
parent 79fd8c6443
commit 0157a57f1e
  1. 1
      service/src/main/java/com/hfkj/model/order/OrderChildModel.java
  2. 4
      service/src/main/java/com/hfkj/service/order/OrderCreateService.java
  3. 6
      service/src/main/java/com/hfkj/service/order/impl/BsOrderServiceImpl.java

@ -1,6 +1,7 @@
package com.hfkj.model.order; package com.hfkj.model.order;
import com.hfkj.entity.BsOrderChild; import com.hfkj.entity.BsOrderChild;
import com.hfkj.entity.BsOrderGoods;
import lombok.Data; import lombok.Data;
/** /**

@ -214,10 +214,14 @@ public class OrderCreateService {
bsOrderGoodsService.create(orderGoods); bsOrderGoodsService.create(orderGoods);
jsonObject.put("orderGoodsId", orderGoods.getId());
if (object.getLong("shopCartId") != null) { if (object.getLong("shopCartId") != null) {
shoppingCartService.delete(object.getLong("shopCartId")); shoppingCartService.delete(object.getLong("shopCartId"));
} }
orderChild.setBusiness(jsonObject); orderChild.setBusiness(jsonObject);
return orderChild; return orderChild;

@ -125,11 +125,11 @@ public class BsOrderServiceImpl implements BsOrderService {
// 提交订单前实物商品处理 // 提交订单前实物商品处理
if (child.getProductType().equals(OrderChildProductTypeEnum.type1.getCode())) { if (child.getProductType().equals(OrderChildProductTypeEnum.type1.getCode())) {
child = orderCreateService.goods(order, child); child = orderCreateService.goods(order, child);
} else if (child.getProductType().equals(OrderChildProductTypeEnum.type2.getCode())) {
// 提交订单虚拟商品处理
// todo 1.0阶段暂时需要返回收货地址使用 // todo 1.0阶段暂时需要返回收货地址使用
order.setBusiness(child.getBusiness()); order.setBusiness(child.getBusiness());
} else if (child.getProductType().equals(OrderChildProductTypeEnum.type2.getCode())) {
// 提交订单虚拟商品处理
child = orderCreateService.product(order, child);
} }
// 提交订单前产品处理 // 提交订单前产品处理
if (child.getProductType().equals(OrderChildProductTypeEnum.type2.getCode())) { if (child.getProductType().equals(OrderChildProductTypeEnum.type2.getCode())) {

Loading…
Cancel
Save