提交代码

master
胡锐 6 months ago committed by yuanye
parent 5b70aa012b
commit d2ea1553a5
  1. 3
      service/src/main/java/com/hfkj/service/order/OrderCreateService.java
  2. 10
      service/src/main/java/com/hfkj/service/order/impl/BsOrderChildServiceImpl.java
  3. 3
      service/src/main/java/com/hfkj/service/order/impl/BsOrderServiceImpl.java

@ -99,6 +99,9 @@ public class OrderCreateService {
if (goodsVpd == null) { if (goodsVpd == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的商品虚拟规格"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的商品虚拟规格");
} }
// 虚拟配置
orderChild.setBusiness(goodsVpd);
// 创建卡券订单 // 创建卡券订单
BsOrderCoupon orderCoupon = new BsOrderCoupon(); BsOrderCoupon orderCoupon = new BsOrderCoupon();
orderCoupon.setOrderNo(orderChild.getOrderNo()); orderCoupon.setOrderNo(orderChild.getOrderNo());

@ -10,7 +10,9 @@ import com.hfkj.entity.GoodsUserAddress;
import com.hfkj.model.order.OrderChildModel; import com.hfkj.model.order.OrderChildModel;
import com.hfkj.service.goods.BsOrderGoodsService; import com.hfkj.service.goods.BsOrderGoodsService;
import com.hfkj.service.goods.GoodsUserAddressService; import com.hfkj.service.goods.GoodsUserAddressService;
import com.hfkj.service.goods.GoodsVpdService;
import com.hfkj.service.order.BsOrderChildService; import com.hfkj.service.order.BsOrderChildService;
import com.hfkj.sysenum.order.OrderChildProductTypeEnum;
import com.hfkj.sysenum.order.OrderChildStatusEnum; import com.hfkj.sysenum.order.OrderChildStatusEnum;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -36,6 +38,8 @@ public class BsOrderChildServiceImpl implements BsOrderChildService {
@Resource @Resource
private BsOrderGoodsService orderGoodsService; private BsOrderGoodsService orderGoodsService;
@Resource
private GoodsVpdService goodsVpdService;
@Override @Override
public void editData(BsOrderChild data) { public void editData(BsOrderChild data) {
@ -75,8 +79,8 @@ public class BsOrderChildServiceImpl implements BsOrderChildService {
OrderChildModel childModel = new OrderChildModel(); OrderChildModel childModel = new OrderChildModel();
BeanUtils.copyProperties(orderChild, childModel); BeanUtils.copyProperties(orderChild, childModel);
if (childModel.getProductType().equals(OrderChildProductTypeEnum.type1.getCode())) {
BsOrderGoods orderGoods = orderGoodsService.findGoodsOrder(orderNo); BsOrderGoods orderGoods = orderGoodsService.findGoodsOrder(orderNo);
if (orderGoods != null) { if (orderGoods != null) {
GoodsUserAddress address = goodsUserAddressService.queryDetail(orderGoods.getDeliveryAddressId()); GoodsUserAddress address = goodsUserAddressService.queryDetail(orderGoods.getDeliveryAddressId());
JSONObject object; JSONObject object;
@ -91,7 +95,9 @@ public class BsOrderChildServiceImpl implements BsOrderChildService {
childModel.setBusiness(object); childModel.setBusiness(object);
} }
} else if (childModel.getProductType().equals(OrderChildProductTypeEnum.type2.getCode())) {
childModel.setBusiness(goodsVpdService.queryDetailBySpecsId(childModel.getProductSpecId()));
}
orderChildModelList.add(childModel); orderChildModelList.add(childModel);
} }
return orderChildModelList; return orderChildModelList;

@ -458,10 +458,9 @@ public class BsOrderServiceImpl implements BsOrderService {
// todo 1.0阶段暂时需要返回收货地址使用 // todo 1.0阶段暂时需要返回收货地址使用
for (OrderChildModel orderChild : orderModel.getOrderChildList()) { for (OrderChildModel orderChild : orderModel.getOrderChildList()) {
if (orderChild.getProductType() == 1) { if (orderChild.getProductType().equals(OrderChildProductTypeEnum.type1.getCode())) {
orderModel.setBusiness(orderChild.getBusiness()); orderModel.setBusiness(orderChild.getBusiness());
} }
} }
// 更新缓存 // 更新缓存

Loading…
Cancel
Save