Authored by LUOXC

Merge branch 'test6.9.8' of http://git.yoho.cn/ufo/yohoufo-fore into test6.9.8

... ... @@ -102,6 +102,9 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService {
@Autowired
private IExpressInfoService expressInfoService;
@Autowired
private DepositService depositService;
private boolean isDepositWithQuickDeliverGoods(int uid, long orderCode, Integer oa){
BuyerOrderGoods pbog = buyerOrderGoodsMapper.selectOnlyByOrderCode(orderCode);
SellerOrderGoods psog = sellerOrderGoodsMapper.selectByPrimaryKey(pbog.getSkup());
... ... @@ -125,7 +128,8 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService {
OrderStatus targetOrderStatus = OrderStatus.HAS_PAYED;
boolean isQuickDeliver = false;
boolean isDepositWithQuickDeliverGoods = false;
boolean isDerectPass = false;
//是否直接鉴定通过
boolean isDirectPass = false;
//门店订单支付后直接完成
if (BuyerOrderUtils.isOffline(orderInfo)) {
... ... @@ -134,11 +138,12 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService {
// 闪购发货
else if (isQuickDeliver = BuyerOrderUtils.isQuickDeliver(orderInfo.getAttributes())) {
targetOrderStatus = OrderStatus.JUDGE_PASS;
isDirectPass = true;
}
// 闪购寄存
else if ((isDepositWithQuickDeliverGoods = isDepositWithQuickDeliverGoods(uid, orderCode, orderInfo.getAttributes()))) {
targetOrderStatus = OrderStatus.DONE;
isDerectPass = true;
isDirectPass = true;
}
logger.info("after paid updateOrderStatusPaid uid {} orderCode {} isQuickDeliver {} isDepositWithQuickDeliverGoods {} ",
uid, orderCode, isQuickDeliver, isDepositWithQuickDeliverGoods);
... ... @@ -156,7 +161,8 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService {
logger.info("in updateOrderStatusPaid record status change, orderCode {}, status: {}",
orderCode, orderStatusCode);
orderStatusFlowService.addAsy(orderCode, orderStatusCode);
if (isDerectPass){
//打货款, 物权转移
if (isDirectPass){
boolean isDepositRequired = isDepositWithQuickDeliverGoods;
appraiseService.processQuickDeliverOrderAfterPaid(orderCode, uid, isDepositRequired);
}
... ... @@ -253,12 +259,13 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService {
* @param sellerOrderGoods
*/
private void processQuickDeliverOrder(BuyerOrder buyerOrder, SellerOrderGoods sellerOrderGoods){
// notice
inBoxFacade.noticeWhenQuickDeliverOrderPaid(buyerOrder.getUid(), buyerOrder.getOrderCode(), sellerOrderGoods);
Integer sellerUid = buyerOrder.getSellerUid();
Integer buyerUid = buyerOrder.getUid();
Long orderCode = buyerOrder.getOrderCode();
Integer skup = sellerOrderGoods.getId();
// notice
inBoxFacade.noticeWhenQuickDeliverOrderPaid(buyerOrder.getUid(), buyerOrder.getOrderCode(), sellerOrderGoods);
try {
// 插入物流调拨信息
expressInfoService.saveOperateTransferExpressInfo(OperateTransferExpressInfo.builder()
... ...
... ... @@ -194,6 +194,9 @@ public class AppraiseService {
@Autowired
private YhProducer yhProducer;
@Autowired
private DepositService depositService;
/**
* 触发物流
*/
... ... @@ -1570,8 +1573,14 @@ public class AppraiseService {
}
}
}
@Autowired
private DepositService depositService;
/**
* 1. 货款-> seller
* 2. 寄存-> 物权转移
* @param orderCode
* @param uid
* @param isDeposit
*/
public void processQuickDeliverOrderAfterPaid(long orderCode,int uid, boolean isDeposit){
BuyerOrderGoods pbog = buyerOrderGoodsMapper.selectOnlyByOrderCode(orderCode);
BuyerOrder pbo = buyerOrderMapper.selectOnlyByOrderCode(orderCode);
... ...
... ... @@ -351,6 +351,8 @@ public class DepositServiceImpl implements DepositService {
}
public void clearCache(Integer uid, Integer productId, Integer storageId) {
LOGGER.info("clearCache execute in, uid is {}, productId is {}, storageId is {}", uid, productId, storageId);
if (uid == null) {
return;
}
... ...
... ... @@ -214,6 +214,8 @@ public class ShoppingSupport {
}else if (SellerGoodsHelper.isImperfectGoods(skupType)){
damagesDesc =
new String(OrderDetailDesc.PaymentTips.DAMAGES_DESC_OF_IMPERFECT.toCharArray());
}else if(SellerGoodsHelper.isQuickDeliver(skupType)){
damagesDesc = new String(OrderDetailDesc.PaymentTips.DAMAGES_DESC_OF_QUICK_DELIVER.toCharArray());
}else {
damagesDesc =
new String(OrderDetailDesc.PaymentTips.DAMAGES_DESC.toCharArray());
... ...