| @@ -2008,7 +2008,7 @@ public class WxOrderServiceImpl implements WxOrderService { | |||||
| } | } | ||||
| //如果没有orderId,则用lastOrder的信息 | //如果没有orderId,则用lastOrder的信息 | ||||
| if (null == composeOrder.getMainOrderId() || composeOrder.getMainOrderId().intValue() <= 0) { | if (null == composeOrder.getMainOrderId() || composeOrder.getMainOrderId().intValue() <= 0) { | ||||
| return new WxComposeOrder(lastOrder.getId(), composeOrder.getComposeOrderType()); | |||||
| return new WxComposeOrder(lastOrder.getId(), composeOrder.getComposeOrderType(),lastOrder.getPayment()); | |||||
| } | } | ||||
| return composeOrder; | return composeOrder; | ||||
| } | } | ||||
| @@ -7,9 +7,10 @@ import lombok.Data; | |||||
| @Data | @Data | ||||
| public class WxComposeOrder { | public class WxComposeOrder { | ||||
| public WxComposeOrder(Long mainOrderId,Integer composeOrderType) { | |||||
| public WxComposeOrder(Long mainOrderId,Integer composeOrderType,Integer payment) { | |||||
| this.mainOrderId = mainOrderId; | this.mainOrderId = mainOrderId; | ||||
| this.composeOrderType = composeOrderType; | this.composeOrderType = composeOrderType; | ||||
| this.payment = payment; | |||||
| } | } | ||||
| private Long mainOrderId; | private Long mainOrderId; | ||||
| @@ -34,7 +34,7 @@ public class SingleOrderAdapterService implements OrderAdapterService { | |||||
| @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | ||||
| @Override | @Override | ||||
| public WxComposeOrder createDBMainOrder(WxCUserBasicInfo user,List<OrderComposeSaveDto> orderSave,EnumPayWay payWay) { | public WxComposeOrder createDBMainOrder(WxCUserBasicInfo user,List<OrderComposeSaveDto> orderSave,EnumPayWay payWay) { | ||||
| return new WxComposeOrder(0L, EnumComposeOrder.SINGLE.getCode()); | |||||
| return new WxComposeOrder(0L, EnumComposeOrder.SINGLE.getCode(),0); | |||||
| } | } | ||||
| @Override | @Override | ||||
| @@ -45,8 +45,7 @@ public class SingleOrderAdapterService implements OrderAdapterService { | |||||
| @Override | @Override | ||||
| public WxComposeOrder getComposeOrder(Long mainOrderId, String tenantId) { | public WxComposeOrder getComposeOrder(Long mainOrderId, String tenantId) { | ||||
| WxOrder wxOrder = wxOrderMapper.selectById(mainOrderId, tenantId); | WxOrder wxOrder = wxOrderMapper.selectById(mainOrderId, tenantId); | ||||
| WxComposeOrder corder = new WxComposeOrder(wxOrder.getId(),EnumComposeOrder.SINGLE.getCode()); | |||||
| corder.setPayment(wxOrder.getPayment()); | |||||
| WxComposeOrder corder = new WxComposeOrder(wxOrder.getId(),EnumComposeOrder.SINGLE.getCode(),wxOrder.getPayment()); | |||||
| corder.setSingleOrder(wxOrder); | corder.setSingleOrder(wxOrder); | ||||
| return corder; | return corder; | ||||
| } | } | ||||
| @@ -59,13 +59,12 @@ public abstract class BaseBatchOrderAdapterService implements OrderAdapterServic | |||||
| order.setPayment(payment); | order.setPayment(payment); | ||||
| order.setCreateDate(new Date()); | order.setCreateDate(new Date()); | ||||
| wxBatchOrderMapper.insert(order); | wxBatchOrderMapper.insert(order); | ||||
| return new WxComposeOrder(order.getId(),composeOrderType.getCode()); | |||||
| return new WxComposeOrder(order.getId(),composeOrderType.getCode(),payment); | |||||
| } | } | ||||
| protected WxComposeOrder getComposeOrder(Long mainOrderId, String tenantId,EnumComposeOrder composeOrderType) { | protected WxComposeOrder getComposeOrder(Long mainOrderId, String tenantId,EnumComposeOrder composeOrderType) { | ||||
| WxBatchOrder order = wxBatchOrderMapper.selectById(mainOrderId, tenantId); | WxBatchOrder order = wxBatchOrderMapper.selectById(mainOrderId, tenantId); | ||||
| WxComposeOrder corder = new WxComposeOrder(order.getId(),composeOrderType.getCode()); | |||||
| corder.setPayment(order.getPayment()); | |||||
| WxComposeOrder corder = new WxComposeOrder(order.getId(),composeOrderType.getCode(),order.getPayment()); | |||||
| corder.setMainOrder(order); | corder.setMainOrder(order); | ||||
| return corder; | return corder; | ||||
| } | } | ||||