wangchaoxu 1 year ago
commit d7dd2075f5

@ -7,7 +7,7 @@ import java.util.List;
@Data @Data
public class PurchaseOrderCancelMessageDTO extends DsMessageDTO { public class PurchaseOrderCancelMessageDTO extends DsMessageDTO {
private Long skuId; private String skuId;
private List<Item> items; private List<Item> items;
@Data @Data

@ -1177,6 +1177,7 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
throw new RuntimeException(response.getReason()); throw new RuntimeException(response.getReason());
} }
} }
log.info("cancelPurchaseOrder: " + skuIds);
if (skuIds.isEmpty()) { if (skuIds.isEmpty()) {
cancelPurchaseOrderByOrderId(shopId, orderId, source); cancelPurchaseOrderByOrderId(shopId, orderId, source);
} else { } else {
@ -1265,13 +1266,15 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
dataSourceTransactionManager.commit(transactionStatus); dataSourceTransactionManager.commit(transactionStatus);
} catch (Throwable e) { } catch (Throwable e) {
dataSourceTransactionManager.rollback(transactionStatus); dataSourceTransactionManager.rollback(transactionStatus);
log.error("doCancelPurchaseOrderItem transaction error: " + e.getMessage()); log.error("doCancelPurchaseOrderItem transaction", e);
throw new RuntimeException("处理异常"); throw new RuntimeException("处理异常");
} }
opOrderDsService.updateOpOrderDsFilterStatus(orderId, PurchaseOrderConst.PURCHASE_PLATFORM1688_D_S); opOrderDsService.updateOpOrderDsFilterStatus(orderId, PurchaseOrderConst.PURCHASE_PLATFORM1688_D_S);
} }
public void doCancelPurchaseOrderItem(String orderId, List<Long> needCancelPurchaseOrderIds, List<Long> needCancelPurchaseOrderItemIds, List<PurchaseOrderCancelLog> logs) { public void doCancelPurchaseOrderItem(String orderId, List<Long> needCancelPurchaseOrderIds, List<Long> needCancelPurchaseOrderItemIds, List<PurchaseOrderCancelLog> logs) {
log.info("doCancelPurchaseOrderItem_needCancelPurchaseOrderIds" + needCancelPurchaseOrderIds);
log.info("doCancelPurchaseOrderItem_needCancelPurchaseOrderItemIds" + needCancelPurchaseOrderItemIds);
if (!needCancelPurchaseOrderIds.isEmpty()) { if (!needCancelPurchaseOrderIds.isEmpty()) {
purchaseOrderService.updateStatusByIds(StatusConst.cancel, needCancelPurchaseOrderIds); purchaseOrderService.updateStatusByIds(StatusConst.cancel, needCancelPurchaseOrderIds);
} }

@ -160,6 +160,7 @@ public class OpOrderDsServiceImpl implements OpOrderDsService {
@Override @Override
public OpOrderDs save(OpOrderDs record) { public OpOrderDs save(OpOrderDs record) {
OpOrderDs oldRecord = getByOrderId(record.getOrderId()); OpOrderDs oldRecord = getByOrderId(record.getOrderId());
log.info("save oldRecord" + oldRecord);
if (oldRecord != null) { if (oldRecord != null) {
opOrderDsMapper.updateByPrimaryKeySelective(record); opOrderDsMapper.updateByPrimaryKeySelective(record);
} else { } else {

@ -588,7 +588,13 @@ public class OpOrderServiceImpl implements OpOrderService {
|| (dbOpOrderInfo.getOrderStatus().intValue() == OrderConst.ORDER_STATUS_WAIT_PAY) && order.getOrderStatus().intValue() != OrderConst.ORDER_STATUS_WAIT_PAY) { || (dbOpOrderInfo.getOrderStatus().intValue() == OrderConst.ORDER_STATUS_WAIT_PAY) && order.getOrderStatus().intValue() != OrderConst.ORDER_STATUS_WAIT_PAY) {
increaseNewPayingOrderToOrderStatRedis(); increaseNewPayingOrderToOrderStatRedis();
} }
processOpOrderDs(shopId, order, dbOpOrderInfo); try {
processOpOrderDs(shopId, order, dbOpOrderInfo);
} catch (Throwable e) {
log.error("processOpOrderDs", e);
throw new RuntimeException("处理分销异常: " + e.getMessage());
}
// op_order_last_express // op_order_last_express
// $this->orderPrintDao->setOrderDefaultExpressTpl($order); // $this->orderPrintDao->setOrderDefaultExpressTpl($order);
// op_order_area_abnormal // op_order_area_abnormal
@ -1429,7 +1435,9 @@ public class OpOrderServiceImpl implements OpOrderService {
record.setDsPurchaseStatus(dsPurchaseStatus); record.setDsPurchaseStatus(dsPurchaseStatus);
} }
record.setGmtCreate(new Date()); record.setGmtCreate(new Date());
log.info("insertUpdateOpOrderDs record1" + record);
opOrderDsService.save(record); opOrderDsService.save(record);
log.info("insertUpdateOpOrderDs record2" + record);
return true; return true;
} }

@ -33,7 +33,7 @@ public class ManualRsyncDdOrdersService extends SPIBaseService implements Extens
} }
return R.ok(Ret.success()); return R.ok(Ret.success());
} catch (Throwable e) { } catch (Throwable e) {
e.printStackTrace(); log.error("manualRsyncDdOrders: ", e);
return R.ok(Ret.fail(e.getMessage())); return R.ok(Ret.fail(e.getMessage()));
} }
} }

Loading…
Cancel
Save