Authored by chenchao

Merge branch 'dev_order' into test6.8.2

... ... @@ -180,6 +180,8 @@ public class BuyerOrderCancelService {
PayRefundBo prb = null;
try {
SellerOrder sellerOrder = sellerOrderMapper.selectByOrderCode(orderCode);
logger.info("in BuyerCancelAfterProcessTask call sellerOrderMapper.selectByOrderCode, buyerUid {}, orderCode {}, skup {}",
buyerUid, orderCode, skup );
int sellerUid = sellerOrder.getUid();
long sellerOrderCode = sellerOrder.getOrderCode();
BigDecimal earnestMoney = sellerOrder.getEarnestMoney();
... ... @@ -190,19 +192,26 @@ public class BuyerOrderCancelService {
.buyerUid(buyerUid).sellerUid(sellerUid).orderCode(sellerOrder.getOrderCode())
.payType(sellerOrder.getPayment()).refundCase(RefundCase.SELLER_EARNEST_MONEY)
.skup(skup);
logger.info("in BuyerCancelAfterProcessTask call begin payRefundService.refund seller, buyerUid {}, orderCode {}, skup {} req {}",
buyerUid, orderCode, skup, req );
prb = payRefundService.refund(req, bleb);
logger.info("in BuyerCancelAfterProcessTask call after payRefundService.refund seller, buyerUid {}, orderCode {}, skup {} req {}",
buyerUid, orderCode, skup, req );
//(转账)瓜分指定赔偿款给卖家和平台
TransferMoneyRequest tmReq = TransferMoneyRequest.builder().buyerOrderCode(orderCode)
.type(transferCase.getCode()).transferCase(transferCase).build();
logger.info("in BuyerCancelAfterProcessTask call begin paymentService.transferMon, buyerUid {}, orderCode {}, skup {} req {}",
buyerUid, orderCode, skup, tmReq );
paymentService.transferMon(tmReq);
logger.info("in BuyerCancelAfterProcessTask call after paymentService.transferMon, buyerUid {}, orderCode {}, skup {} req {}",
buyerUid, orderCode, skup, tmReq );
//(退费)扣除赔偿款,计算剩余的货款,退给买家
BigDecimal compensateMoney = compensate.getBuyerCompensateMoney();
BuyerOrder buyerOrder = buyerOrderMapper.selectByOrderCode(orderCode);
logger.info("in BuyerCancelAfterProcessTask call begin buyerOrderMapper.selectByOrderCode, buyerUid {}, orderCode {}, skup {} buyerOrder {}",
buyerUid, orderCode, skup, buyerOrder );
BigDecimal leftBuyerMoney = buyerOrder.getAmount().subtract(compensateMoney);
PaymentRequest rprOfBuyer = PaymentRequest.builder().uid(buyerUid)
.orderCode(orderCode).refundAmount(leftBuyerMoney.doubleValue())
... ... @@ -211,7 +220,12 @@ public class BuyerOrderCancelService {
.buyerUid(buyerUid).sellerUid(sellerUid).orderCode(orderCode)
.payType(buyerOrder.getPayment()).refundCase(RefundCase.BUYER_GOODS_MONEY)
.skup(skup);
logger.info("in BuyerCancelAfterProcessTask call begin payRefundService.refund buyer, buyerUid {}, orderCode {}, skup {} req {}",
buyerUid, orderCode, skup, rprOfBuyer );
payRefundService.refund(rprOfBuyer, blebOfBuyer);
logger.info("in BuyerCancelAfterProcessTask call after payRefundService.refund buyer, buyerUid {}, orderCode {}, skup {} req {}",
buyerUid, orderCode, skup, rprOfBuyer );
logger.info("out BuyerCancelAfterProcessTask call buyerUid {}, orderCode {}, skup {}, transferCase {}, compensate {}",
buyerUid, orderCode, skup, transferCase, compensate);
}catch (Exception ex){
... ...