|
|
@@ -584,6 +584,7 @@ public class LiveAfterSalesServiceImpl implements ILiveAfterSalesService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
@Override
|
|
|
public R revoke(String userId, LiveAfterSalesRevokeParam param) {
|
|
|
LiveAfterSales storeAfterSales = baseMapper.selectLiveAfterSalesById(param.getId());
|
|
|
@@ -597,7 +598,7 @@ public class LiveAfterSalesServiceImpl implements ILiveAfterSalesService {
|
|
|
throw new CustomException("已发货退款单不能撤销");
|
|
|
}
|
|
|
//只有未发货的可以撤销,
|
|
|
- if (!storeAfterSales.getOrderStatus().equals(OrderInfoEnum.STATUS_2.getValue())) {
|
|
|
+ if (!storeAfterSales.getOrderStatus().equals(2)) {
|
|
|
throw new CustomException("只有未发货的订单可以撤销售后");
|
|
|
}
|
|
|
storeAfterSales.setSalesStatus(1);
|
|
|
@@ -614,7 +615,7 @@ public class LiveAfterSalesServiceImpl implements ILiveAfterSalesService {
|
|
|
logs.setStoreAfterSalesId(storeAfterSales.getId());
|
|
|
logs.setChangeMessage(OrderInfoEnum.REFUND_STATUS_1.getDesc());
|
|
|
liveAfterSalesLogsMapper.insertLiveAfterSalesLogs(logs);
|
|
|
- if (storeAfterSales.getOrderStatus().equals(OrderInfoEnum.STATUS_2.getValue())) {
|
|
|
+ if (storeAfterSales.getOrderStatus().equals(3)) {
|
|
|
if (StringUtils.isNotEmpty(order.getExtendOrderId())) {
|
|
|
//更新订单code
|
|
|
String orderSn = SnowflakeUtils.nextId();
|
|
|
@@ -626,7 +627,6 @@ public class LiveAfterSalesServiceImpl implements ILiveAfterSalesService {
|
|
|
orderMap.setOrderCode(orderSn);
|
|
|
liveOrderService.updateLiveOrder(orderMap);
|
|
|
//生成新的订单
|
|
|
-
|
|
|
List<LiveOrderPayment> payments = liveOrderPaymentMapper.selectLiveOrderPaymentByPay(2, order.getOrderId());
|
|
|
for (LiveOrderPayment payment : payments) {
|
|
|
LiveOrderPayment livePayment = new LiveOrderPayment();
|
|
|
@@ -635,9 +635,8 @@ public class LiveAfterSalesServiceImpl implements ILiveAfterSalesService {
|
|
|
liveOrderPaymentMapper.updateLiveOrderPayment(livePayment);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
try {
|
|
|
- liveOrderService.pushLiveOrder(order);
|
|
|
+ liveOrderService.createOmsOrder(order.getOrderId());
|
|
|
} catch (Exception e) {
|
|
|
log.error("推送ERP订单失败!",e);
|
|
|
}
|