修改bug

20230922-ljl-fixBug
ljl 1 year ago
parent 316b95d580
commit 549bb1107f

@ -42,5 +42,5 @@ public interface OpOrderDsService {
void updateOpOrderDsFilterStatus(String orderId, String purchasePlatform);
void updateOpOrderDsOrderStatus(OpOrder opOrder);
void updateOpOrderDsOrderStatus(String opOrderId);
}

@ -31,6 +31,9 @@ public class OpOrderDsServiceImpl implements OpOrderDsService {
@Autowired
private OpOrderDsMapper opOrderDsMapper;
@Autowired
private OpOrderMapper opOrderMapper;
@Autowired
private PurchaseOrderMapper purchaseOrderMapper;
@ -155,11 +158,15 @@ public class OpOrderDsServiceImpl implements OpOrderDsService {
}
@Override
public void updateOpOrderDsOrderStatus(OpOrder opOrder) {
public void updateOpOrderDsOrderStatus(String orderId) {
OpOrder opOrder = opOrderMapper.selectByOrderId(orderId);
OpOrderDs opOrderDs = getByOrderId(opOrder.getOrderId());
if (opOrderDs == null) {
throw new RuntimeException("分销订单不存在");
}
opOrderDs.setOrderStatus(opOrder.getOrderStatus());
opOrderDs.setGmtModified(new Date());
opOrderDsMapper.updateByPrimaryKeySelective(opOrderDs);
updateOpOrderDsFilterStatus(opOrder.getOrderId(), PurchaseOrderConst.PURCHASE_PLATFORM1688_D_S);
}
@ -270,6 +277,7 @@ public class OpOrderDsServiceImpl implements OpOrderDsService {
dsPurchaseStatus = DsOrderConst.DS_PURCHASE_STATUS_PART_PURCHASE;
dsWaitPayStatus = null;
}
log.info("getOrderStatus: " + opOrderDs.getOrderStatus());
if (Objects.equals(opOrderDs.getOrderStatus(), OrderConst.ORDER_STATUS_WAIT_BUYER_CONFIRM_GOODS)) {
dsPurchaseStatus = DsOrderConst.DS_PURCHASE_STATUS_HAS_SEND;
}

@ -292,7 +292,7 @@ public class OutstorageServiceImpl implements OutstorageService {
ResultDTO result = orderMultiPackageOutstorage(shopBO, opOrder, orderPackageInfoDTO.getPackageList(), LogisticsConst.outstorageSourceDsAuto);
log.info("dsOrderOutStorage[result]: " + result);
if (result.isSuccess()) {
opOrderDsService.updateOpOrderDsOrderStatus(opOrder);
opOrderDsService.updateOpOrderDsOrderStatus(opOrder.getOrderId());
}
}
@ -376,7 +376,7 @@ public class OutstorageServiceImpl implements OutstorageService {
ResultDTO result = orderMultiPackageOutstorage(shopBO, opOrder, new ArrayList<>(newPackages.values()), LogisticsConst.outstorageSourceDsAuto);
log.info("dsOrderOutStorageOrUpdateOutStorageLogistics[result]: " + result);
if (result.isSuccess()) {
opOrderDsService.updateOpOrderDsOrderStatus(opOrder);
opOrderDsService.updateOpOrderDsOrderStatus(opOrder.getOrderId());
} else {
errorMessages.add(result.getMessage());
}

Loading…
Cancel
Save