|
|
@@ -1675,7 +1675,7 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
|
|
|
}
|
|
|
erpOrder.setPlatform_code(order.getOrderCode());
|
|
|
erpOrder.setWarehouse_code(erpConfig.getErpWarehouseCode());
|
|
|
- erpOrder.setShop_code(erpConfig.getErpShopCode());
|
|
|
+ erpOrder.setShop_code(erpConfig.getErpJstShopCode());
|
|
|
erpOrder.setBuyer_account(order.getUserName());
|
|
|
|
|
|
// erpOrder.setPost_fee(order.getTotalPostage().doubleValue());
|
|
|
@@ -3487,6 +3487,7 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
|
|
|
if (attrValue != null) {
|
|
|
attrValue.setStock(attrValue.getStock() - Integer.parseInt(liveOrder.getTotalNum()));
|
|
|
attrValue.setSales(attrValue.getSales() + Integer.parseInt(liveOrder.getTotalNum()));
|
|
|
+ fsStoreProductAttrValueMapper.updateFsStoreProductAttrValue(attrValue);
|
|
|
} else {
|
|
|
// 更改店铺库存
|
|
|
fsStoreProduct.setStock(fsStoreProduct.getStock()-Integer.parseInt(liveOrder.getTotalNum()));
|
|
|
@@ -3513,6 +3514,7 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
|
|
|
liveOrder.setCompanyUserId(liveUserFirstEntry.getCompanyUserId());
|
|
|
liveOrder.setTuiUserId(liveUserFirstEntry.getCompanyUserId());
|
|
|
String orderSn = OrderCodeUtils.getOrderSn();
|
|
|
+// String orderSn = "123"; // todo yhq
|
|
|
log.info("订单生成:"+orderSn);
|
|
|
liveOrder.setOrderCode(orderSn);
|
|
|
BigDecimal payPrice = fsStoreProduct.getPrice().multiply(new BigDecimal(liveOrder.getTotalNum()));
|
|
|
@@ -3561,7 +3563,7 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
|
|
|
liveOrder.setPayType("1");
|
|
|
liveOrder.setTotalPrice(payPrice);
|
|
|
liveOrder.setPayMoney(BigDecimal.ZERO);
|
|
|
- liveOrder.setPayPrice(payPrice);
|
|
|
+ liveOrder.setPayPrice(payPrice.subtract(liveOrder.getDiscountMoney()));
|
|
|
try {
|
|
|
if (baseMapper.insertLiveOrder(liveOrder) > 0) {
|
|
|
LiveOrderItemDTO dto=new LiveOrderItemDTO();
|