...
|
...
|
@@ -410,6 +410,8 @@ public class AppraiseService { |
|
|
inBoxFacade.sellerQualityCheckNotPass_send_back(sellerOrderGoods, orderCode, wayBillCode, type);
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private SellerOrderGoods cleanCacheAfterUpdateStatus(long orderCode, int uid, int sellerUid) {
|
|
|
BuyerOrderGoods bog = buyerOrderGoodsMapper.selectByOrderCode(uid, orderCode);
|
|
|
SellerOrderGoods sellerOrderGoods = sellerOrderGoodsMapper.selectByPrimaryKey(bog.getSkup());
|
...
|
...
|
@@ -770,8 +772,12 @@ public class AppraiseService { |
|
|
}
|
|
|
|
|
|
//更新卖家订单的状态,并清缓存
|
|
|
private SellerOrderGoods updateSellerOrderStatusAndCleanCache(int sellerUid, long sellerOrderCode, SellerOrderStatus expectSOStatus, SellerOrderStatus targetSoStatus,
|
|
|
int skup, Long orderCode, int buyerUid) {
|
|
|
private SellerOrderGoods updateSellerOrderStatusAndCleanCache(int sellerUid,
|
|
|
long sellerOrderCode,
|
|
|
SellerOrderStatus expectSOStatus,
|
|
|
SellerOrderStatus targetSoStatus,
|
|
|
int skup,
|
|
|
Long orderCode, int buyerUid) {
|
|
|
SellerOrder tso = new SellerOrder();
|
|
|
tso.setUid(sellerUid);
|
|
|
tso.setOrderCode(sellerOrderCode);
|
...
|
...
|
@@ -780,19 +786,12 @@ public class AppraiseService { |
|
|
tso.setUpdateTime(DateUtil.getCurrentTimeSecond());
|
|
|
int soCnt = sellerOrderMapper.updateByOrderCode(tso);
|
|
|
SellerOrderGoods sellerOrderGoods = sellerOrderGoodsMapper.selectByPrimaryKey(skup);
|
|
|
cacheCleaner.delete(Arrays.asList(CacheKeyBuilder.orderListKey(sellerUid, TabType.SELL.getValue()),
|
|
|
CacheKeyBuilder.orderListKey(buyerUid, TabType.BUY.getValue()),
|
|
|
CacheKeyBuilder.sellerOrderDetailKey(sellerOrderGoods),
|
|
|
CacheKeyBuilder.orderDetailKey(sellerUid, TabType.SELL.getValue(), orderCode),
|
|
|
CacheKeyBuilder.orderDetailKey(buyerUid, TabType.BUY.getValue(), orderCode),
|
|
|
CacheKeyBuilder.buyerOrderNums(buyerUid)));
|
|
|
|
|
|
|
|
|
ErpBuyerOrderEvent event = new ErpBuyerOrderEvent(buyerUid);
|
|
|
EventBusPublisher.publishEvent(event);
|
|
|
cleanCacheAfterUpdateStatus(orderCode, buyerUid, sellerUid);
|
|
|
return sellerOrderGoods;
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 更新发到卖家的物流信息
|
|
|
* 将卖家的保证金分账给平台和买家
|
...
|
...
|
@@ -1035,6 +1034,7 @@ public class AppraiseService { |
|
|
return model;
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 手机质检端的鉴定不通过
|
|
|
* <p>
|
...
|
...
|
@@ -1287,12 +1287,8 @@ public class AppraiseService { |
|
|
return apiResponse;
|
|
|
}
|
|
|
|
|
|
private void transferGoodsMoneyWhenPass(Integer sellerUid, Integer skup, Long orderCode){
|
|
|
|
|
|
/**
|
|
|
* 通过时 ,操作钱
|
|
|
*/
|
|
|
private PaymentRequest operateMoneyWhenOk(Integer buyerUid, Long orderCode, int skup, SellerOrder sellerOrder, SellerOrderStatus targetSoStatus) {
|
|
|
final Integer sellerUid = sellerOrder.getUid();
|
|
|
BigDecimal saleIncome = getSaleIncome(sellerUid, skup);
|
|
|
|
|
|
TransferCase transferCase = TransferCase.ALL_GOODS_MONEY_TO_SELLER;
|
...
|
...
|
@@ -1315,6 +1311,21 @@ public class AppraiseService { |
|
|
LOGGER.info("in appraiseSuccess,begin transfer async");
|
|
|
transferService.transfer(tmReq);
|
|
|
});
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 通过时 ,操作钱
|
|
|
*/
|
|
|
private PaymentRequest operateMoneyWhenOk(Integer buyerUid, Long orderCode, int skup, SellerOrder sellerOrder, SellerOrderStatus targetSoStatus) {
|
|
|
final Integer sellerUid = sellerOrder.getUid();
|
|
|
BigDecimal saleIncome = getSaleIncome(sellerUid, skup);
|
|
|
|
|
|
TranseferCellNode transeferCellNode = new TranseferCellNode();
|
|
|
transeferCellNode.setUid(sellerUid);
|
|
|
transeferCellNode.setAmount(saleIncome);
|
|
|
|
|
|
|
|
|
transferGoodsMoneyWhenPass(sellerUid, skup, orderCode);
|
|
|
|
|
|
//退保证金给卖家
|
|
|
//refund earnestMoney
|
...
|
...
|
@@ -1539,4 +1550,16 @@ public class AppraiseService { |
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public void processQuickDeliverOrderAfterPaid(long orderCode,int uid){
|
|
|
BuyerOrderGoods pbog = buyerOrderGoodsMapper.selectOnlyByOrderCode(orderCode);
|
|
|
BuyerOrder pbo = buyerOrderMapper.selectOnlyByOrderCode(orderCode);
|
|
|
try {
|
|
|
transferGoodsMoneyWhenPass(pbo.getSellerUid(), pbog.getSkup(), orderCode);
|
|
|
}catch (Exception ex){
|
|
|
LOGGER.warn("in processQuickDeliverOrderAfterPaid transferGoodsMoneyWhenPass fail orderCode {} uid {}",
|
|
|
orderCode, uid, ex);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
} |
...
|
...
|
|