...
|
...
|
@@ -206,6 +206,33 @@ public class AppraiseService { |
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 直接退回商品,记录物流,不涉及状态更改
|
|
|
* @param expressCompanyId
|
|
|
* @param orderCode
|
|
|
* @param wayBillCode
|
|
|
* @return
|
|
|
*/
|
|
|
public ApiResponse returnBack(Integer expressCompanyId, Long orderCode, String wayBillCode, Integer depotNum){
|
|
|
ApiResponse apiResponse=new ApiResponse();
|
|
|
BuyerOrder buyerOrder = buyerOrderMapper.selectByOrderCode(orderCode);
|
|
|
|
|
|
if (buyerOrder == null){
|
|
|
LOGGER.warn("returnBack getOrderInfo order not exist, orderCode {}", orderCode);
|
|
|
throw new ServiceException(ServiceError.ORDER_NULL);
|
|
|
}
|
|
|
OrderStatus expectStatus = OrderStatus.BUYER_CANCEL_BEFORE_DEPOT_RECEIVE;
|
|
|
if (buyerOrder.getStatus() != expectStatus.getCode()){
|
|
|
LOGGER.warn("returnBack expectStatus {}, actual status {}, orderCode {}", expectStatus,
|
|
|
buyerOrder.getStatus(), orderCode);
|
|
|
throw new ServiceException(ServiceError.ORDER_STATUS_INVALIDATE);
|
|
|
}
|
|
|
|
|
|
//记录物流信息
|
|
|
int sellerUid = buyerOrder.getSellerUid();
|
|
|
expressInfoService.returnBack(sellerUid, expressCompanyId, orderCode, wayBillCode, depotNum);
|
|
|
return apiResponse;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 更新发到卖家的物流信息
|
...
|
...
|
@@ -226,7 +253,7 @@ public class AppraiseService { |
|
|
}
|
|
|
OrderStatus expectStatus = OrderStatus.PLATFORM_CHECKING;
|
|
|
if (buyerOrder.getStatus() != expectStatus.getCode()){
|
|
|
LOGGER.warn("appraiseFail expectStatus {}, actual status {}, ordercode {}", expectStatus,
|
|
|
LOGGER.warn("appraiseFail expectStatus {}, actual status {}, orderCode {}", expectStatus,
|
|
|
buyerOrder.getStatus(), orderCode);
|
|
|
throw new ServiceException(ServiceError.ORDER_STATUS_INVALIDATE);
|
|
|
}
|
...
|
...
|
|