|
|
@@ -50,12 +50,14 @@ import com.fs.store.service.IFsStoreAfterSalesService;
|
|
|
import com.fs.store.service.IFsUserService;
|
|
|
import com.fs.system.config.SnowflakeUtils;
|
|
|
import com.fs.system.service.ISysConfigService;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.http.util.Asserts;
|
|
|
import org.springframework.aop.framework.AopContext;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Qualifier;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import com.fs.live.service.ILiveAfterSalesService;
|
|
|
+import org.springframework.transaction.annotation.Propagation;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
|
|
|
|
|
@@ -65,6 +67,7 @@ import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
|
|
* @author fs
|
|
|
* @date 2025-07-08
|
|
|
*/
|
|
|
+@Slf4j
|
|
|
@Service
|
|
|
public class LiveAfterSalesServiceImpl implements ILiveAfterSalesService {
|
|
|
|
|
|
@@ -150,6 +153,7 @@ public class LiveAfterSalesServiceImpl implements ILiveAfterSalesService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ @Transactional(rollbackFor = Exception.class,propagation = Propagation.REQUIRED)
|
|
|
public R cancel(LiveAfterSalesCancelParam param) {
|
|
|
LiveAfterSales storeAfterSales = baseMapper.selectLiveAfterSalesById(param.getSalesId());
|
|
|
if (storeAfterSales == null) {
|
|
|
@@ -193,7 +197,7 @@ public class LiveAfterSalesServiceImpl implements ILiveAfterSalesService {
|
|
|
// 如果未发货,重新推送
|
|
|
else {
|
|
|
//创建新的OMS订单
|
|
|
- if (storeAfterSales.getOrderStatus().equals(OrderInfoEnum.STATUS_1.getValue()) ) {
|
|
|
+ if (storeAfterSales.getOrderStatus().equals(2) ) {
|
|
|
if(StringUtils.isNotEmpty(order.getExtendOrderId())){
|
|
|
//更新订单code
|
|
|
String orderSn = SnowflakeUtils.nextId();
|
|
|
@@ -207,7 +211,7 @@ public class LiveAfterSalesServiceImpl implements ILiveAfterSalesService {
|
|
|
try {
|
|
|
liveOrderService.createOmsOrder(order.getOrderId());
|
|
|
} catch (Exception e) {
|
|
|
- TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
+ log.error("创建订单失败!",e);
|
|
|
throw new CustomException("创建订单失败");
|
|
|
}
|
|
|
}
|