Authored by chenchao

optimized

... ... @@ -67,6 +67,7 @@ public class ActionStatusHold {
selfCancel = Arrays.asList(OrderStatus.BUYER_CANCEL_BEFORE_SELLER_DELIVER.getCode(),
OrderStatus.BUYER_CANCEL_BEFORE_DEPOT_RECEIVE.getCode());
}
}
public static boolean isBuyerSelfCancel(Integer status){
return BuyerASH.selfCancel.contains(status);
... ...
... ... @@ -884,11 +884,23 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi
}
if (OrderCodeType.BUYER_TYPE.equals(codeType)){
String confirmDesc = "您确定取消出售吗?取消后将根据《卖家须知》"+ FLAG_PRE +"扣除对应保证金"+ FLAG_SUFFIX + "作为赔偿打入卖家账户";
String confirmDesc = getConfirmDesc4BuyerOrder(orderCode);
occr.setConfirmDesc(confirmDesc);
}
return occr;
}
private String getConfirmDesc4BuyerOrder(long orderCode){
String confirmDesc = null;
BuyerOrder buyerOrder = buyerOrderMapper.selectOnlyByOrderCode(orderCode);
if (buyerOrder == null){
return "订单不存在";
}
if (ActionStatusHold.sellerCanCancelBuyerOrder(buyerOrder.getStatus())) {
confirmDesc = "您确定取消出售吗?取消后将根据《卖家须知》" + FLAG_PRE + "扣除对应保证金" + FLAG_SUFFIX + "作为赔偿打入卖家账户";
}else {
confirmDesc = "无法取消,请刷新后查看订单最新状态";
}
return confirmDesc;
}
}
... ...