Authored by LUOXC

fixbug

... ... @@ -314,7 +314,7 @@ public class AppraiseService {
}
// 买家接受瑕疵,走非寄存流程
else if (buyerOrder.getStatus() == OrderStatus.MINI_FAULT_ACCEPT.getCode()) {
deliveryNonDepositGoodsToBuyerAndRun(appraiseExpressInfoBo,buyerOrder,sog -> {
deliveryGoodsToBuyerAndRun(appraiseExpressInfoBo,buyerOrder, sog -> {
// 通知买家已发货
buyerNoticeFacade.deliveryDepositGoodsToBuyer(buyerOrder.getUid(), appraiseExpressInfoBo.getWayBillCode(), sog,
sellerOrderGoods -> Optional.ofNullable(sellerOrderGoods).map(SellerOrderGoods::getProductId).map(productMapper::selectByPrimaryKey).orElse(null));
... ... @@ -325,7 +325,7 @@ public class AppraiseService {
}
}
private void deliveryNonDepositGoodsToBuyerAndRun(AppraiseExpressInfoBo appraiseExpressInfoBo, BuyerOrder buyerOrder, Consumer<SellerOrderGoods> run) {
private void deliveryGoodsToBuyerAndRun(AppraiseExpressInfoBo appraiseExpressInfoBo, BuyerOrder buyerOrder, Consumer<SellerOrderGoods> run) {
final Long orderCode = buyerOrder.getOrderCode();
final OrderStatus expectOrderStatus;
final OrderStatus targetOrderStatus = OrderStatus.WAITING_RECEIVE;
... ... @@ -373,7 +373,7 @@ public class AppraiseService {
}
private void deliveryNonDepositGoodsToBuyer(AppraiseExpressInfoBo appraiseExpressInfoBo, BuyerOrder buyerOrder) {
deliveryNonDepositGoodsToBuyerAndRun(appraiseExpressInfoBo, buyerOrder, sellerOrderGoods -> {
deliveryGoodsToBuyerAndRun(appraiseExpressInfoBo, buyerOrder, sellerOrderGoods -> {
Product product = Optional.ofNullable(sellerOrderGoods).map(SellerOrderGoods::getProductId).map(productMapper::selectByPrimaryKey).orElse(null);
buyerNoticeFacade.deliveryGoodsToBuyer(buyerOrder, sellerOrderGoods, product);
});
... ...
... ... @@ -114,9 +114,15 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
// 参数检查 ![待收货] 不合法
DataNode node = checkBase(orderRequest);
BuyerOrder buyerOrder = node.buyerOrderInDB;
// 待寄存或待收货
OrderStatus expectStatus = BuyerOrderUtils.isDeposit(buyerOrder) ?
OrderStatus.JUDGE_PASS_WAIT_WAREHOUSE : OrderStatus.WAITING_RECEIVE;
OrderStatus buyerOrderStatus = OrderStatus.getOrderStatus(buyerOrder.getStatus());
OrderStatus expectStatus;
// 如果当前订单状态为待寄存或待收货
if(buyerOrderStatus == OrderStatus.JUDGE_PASS_WAIT_WAREHOUSE
|| buyerOrderStatus == OrderStatus.WAITING_RECEIVE){
expectStatus = buyerOrderStatus;
} else {
expectStatus = OrderStatus.WAITING_RECEIVE;
}
checkStatus(node,orderRequest, expectStatus);
int uid = buyerOrder.getUid();
long orderCode = buyerOrder.getOrderCode();
... ...