|
|
package com.yohoufo.order.service.impl;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import com.yoho.error.ServiceError;
|
|
|
import com.yoho.error.exception.ServiceException;
|
|
|
import com.yohobuy.ufo.model.order.bo.AppraiseExpressInfoBo;
|
...
|
...
|
@@ -36,6 +37,7 @@ import com.yohoufo.order.service.proxy.OrderOperateRecordService; |
|
|
import com.yohoufo.order.service.proxy.OrderStatusFlowService;
|
|
|
import com.yohoufo.order.utils.PaymentHelper;
|
|
|
import com.yohoufo.order.utils.PubThreadFactory;
|
|
|
import lombok.Data;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
...
|
...
|
@@ -45,6 +47,7 @@ import org.springframework.stereotype.Service; |
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
import java.util.Objects;
|
|
|
import java.util.concurrent.ArrayBlockingQueue;
|
|
|
import java.util.concurrent.ExecutorService;
|
...
|
...
|
@@ -169,7 +172,7 @@ public class AppraiseService { |
|
|
/**
|
|
|
* 鉴定不通过退回
|
|
|
* (1)记录物流
|
|
|
* (2)消息 :寄回有三种情形: 质检不通过的而商品、瑕疵不接受的 、瑕疵不接受(超时)的
|
|
|
* (2)消息 :寄回有4种情形: 鉴定不通过、质检不通过的商品、瑕疵不接受的 、瑕疵不接受(超时)的
|
|
|
*/
|
|
|
public void returnBackOrderCauseOfJudgeFailure(AppraiseExpressInfoBo appraiseExpressInfoBo){
|
|
|
Integer expressCompanyId = appraiseExpressInfoBo.getExpressCompanyId();
|
...
|
...
|
@@ -185,12 +188,46 @@ public class AppraiseService { |
|
|
throw new ServiceException(ServiceError.ORDER_NULL);
|
|
|
}
|
|
|
|
|
|
OrderStatus expectStatus = OrderStatus.CHECKING_FAKE;
|
|
|
if (buyerOrder.getStatus() != expectStatus.getCode()){
|
|
|
LOGGER.warn("returnBackOrderCauseOfJudgeFailure expectStatus {}, actual status {}, orderCode {}", expectStatus,
|
|
|
OrderStatus expectStatus ;
|
|
|
|
|
|
int type = 0 ;//鉴定不通过
|
|
|
if (buyerOrder.getStatus() == OrderStatus.CHECKING_FAKE.getCode()){
|
|
|
expectStatus = OrderStatus.CHECKING_FAKE;
|
|
|
|
|
|
//TODO 新版本6.8.7以后,判断type可直接根据状态,而不再需要根据qualityCheck,可去掉以下if判断
|
|
|
//TODO 现在6.8.6.5手机质检版本上线,还需要保留,存在过度订单,鉴定不通过都是类型:13
|
|
|
QualityCheck qualityCheck = qualityCheckMapper.selectByOrderCode(orderCode);
|
|
|
if(qualityCheck!=null&&qualityCheck.getType()!=null){
|
|
|
if(EnumQualityCheckType.CHECK_NOT_PASS.getCode().intValue()==qualityCheck.getType().intValue()){
|
|
|
type = 1;//质检不通过
|
|
|
}else if(EnumQualityCheckType.MINI_FAULT.getCode().intValue()==qualityCheck.getType().intValue()){
|
|
|
if(qualityCheck.getStatus()!=null){
|
|
|
if(EnumQualityCheckStatus.REJECT_BY_BUYER.getCode().intValue()==qualityCheck.getStatus().intValue()){
|
|
|
type = 2;//用户不接受瑕疵
|
|
|
}else if(EnumQualityCheckStatus.REJECT_BY_OUTER_TIME.getCode().intValue()==qualityCheck.getStatus().intValue()){
|
|
|
type = 3;//用户不接受超时
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}else if(buyerOrder.getStatus() == OrderStatus.QUALITY_CHECK_FAKE.getCode()){
|
|
|
type = 1;//质检不通过
|
|
|
expectStatus = OrderStatus.QUALITY_CHECK_FAKE;
|
|
|
}else if(buyerOrder.getStatus() == OrderStatus.MINI_FAULT_REJECT.getCode()){
|
|
|
type = 2;//用户不接受瑕疵
|
|
|
expectStatus = OrderStatus.MINI_FAULT_REJECT;
|
|
|
}else if(buyerOrder.getStatus() == OrderStatus.MINI_FAULT_OUT_TIME_REJECT.getCode()){
|
|
|
type = 3;//用户不接受超时
|
|
|
expectStatus = OrderStatus.MINI_FAULT_OUT_TIME_REJECT;
|
|
|
}else{
|
|
|
//if (buyerOrder.getStatus() != expectStatus.getCode()){
|
|
|
LOGGER.warn("returnBackOrderCauseOfJudgeFailure expectStatus CHECKING_FAKE QUALITY_CHECK_FAKE MINI_FAULT_REJECT or MINI_FAULT_OUT_TIME_REJECT, actual status {}, orderCode {}",
|
|
|
buyerOrder.getStatus(), orderCode);
|
|
|
throw new ServiceException(ServiceError.ORDER_STATUS_INVALIDATE);
|
|
|
}
|
|
|
LOGGER.info("returnBackOrderCauseOfJudgeFailure check status ok expectStatus {}, actual status {}, orderCode {}",expectStatus,
|
|
|
buyerOrder.getStatus(), orderCode);
|
|
|
|
|
|
|
|
|
//更新物流信息
|
|
|
int sellerUid = buyerOrder.getSellerUid();
|
...
|
...
|
@@ -199,6 +236,7 @@ public class AppraiseService { |
|
|
//清缓存
|
|
|
SellerOrderGoods sellerOrderGoods = cleanCacheAfterUpdateStatus(buyerOrder.getOrderCode(),buyerOrder.getUid(),buyerOrder.getSellerUid());
|
|
|
|
|
|
/*
|
|
|
//发消息给卖家
|
|
|
QualityCheck qualityCheck = qualityCheckMapper.selectByOrderCode(orderCode);
|
|
|
int type = 1 ;//鉴定不通过
|
...
|
...
|
@@ -211,6 +249,7 @@ public class AppraiseService { |
|
|
}
|
|
|
|
|
|
}
|
|
|
*/
|
|
|
inBoxFacade.sellerQualityCheckNotPass_send_back(sellerOrderGoods,orderCode,wayBillCode, type);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -271,9 +310,12 @@ public class AppraiseService { |
|
|
* @outTimeFlag 超时
|
|
|
* @return
|
|
|
*/
|
|
|
public ApiResponse miniFaultReject(Long orderCode,boolean outTimeFlag){
|
|
|
LOGGER.info("miniFaultReject enter , orderCode {} ,outTimeFlag {}", orderCode ,outTimeFlag);
|
|
|
OrderStatus expectStatus = OrderStatus.PLATFORM_RECEIVE;
|
|
|
public ApiResponse miniFaultReject(Long orderCode,OrderStatus targetStatus,boolean outTimeFlag){
|
|
|
LOGGER.info("miniFaultReject enter , orderCode {} ,targetStatus {},outTimeFlag {}", orderCode ,targetStatus ,outTimeFlag);
|
|
|
OrderStatus expectStatusNew = OrderStatus.MINI_FAULT_WAITING;
|
|
|
//拆分状态,版本升级之后存在的特殊订单
|
|
|
OrderStatus expectStatusAnother = OrderStatus.PLATFORM_RECEIVE;
|
|
|
List<Integer> expectStatusList= Lists.newArrayList(expectStatusNew.getCode(),expectStatusAnother.getCode());
|
|
|
ApiResponse apiResponse=new ApiResponse();
|
|
|
BuyerOrder buyerOrder = buyerOrderMapper.selectOnlyByOrderCode(orderCode);
|
|
|
|
...
|
...
|
@@ -282,16 +324,18 @@ public class AppraiseService { |
|
|
throw new ServiceException(ServiceError.ORDER_NULL);
|
|
|
}
|
|
|
|
|
|
if (buyerOrder.getStatus() != expectStatus.getCode()){
|
|
|
LOGGER.warn("miniFaultReject expectStatus {}, actual status {}, orderCode {}", expectStatus,
|
|
|
//if (buyerOrder.getStatus() != expectStatus.getCode()){
|
|
|
if (!expectStatusList.contains(buyerOrder.getStatus())){
|
|
|
LOGGER.warn("miniFaultReject expectStatus {}, actual status {}, orderCode {}", expectStatusList,
|
|
|
buyerOrder.getStatus(), orderCode);
|
|
|
throw new ServiceException(ServiceError.ORDER_STATUS_INVALIDATE);
|
|
|
}
|
|
|
// 更新买家订单状态 为鉴定不通过
|
|
|
// 更新买家订单状态
|
|
|
int buyerUid = buyerOrder.getUid();
|
|
|
OrderStatus targetStatus = OrderStatus.CHECKING_FAKE;
|
|
|
LOGGER.info("miniFaultReject update buyer order {} ", buyerOrder);
|
|
|
int rows = buyerOrderMapper.updateStatusByOrderCode(orderCode, buyerUid, expectStatus.getCode(), targetStatus.getCode(),
|
|
|
/* int rows = buyerOrderMapper.updateStatusByOrderCode(orderCode, buyerUid, expectStatus.getCode(), targetStatus.getCode(),
|
|
|
DateUtil.getCurrentTimeSecond());*/
|
|
|
int rows = buyerOrderMapper.updateStatusByOrderCodeMoreExpectStatus(orderCode, buyerUid, expectStatusList, targetStatus.getCode(),
|
|
|
DateUtil.getCurrentTimeSecond());
|
|
|
|
|
|
if (rows > 0){
|
...
|
...
|
@@ -383,7 +427,7 @@ public class AppraiseService { |
|
|
|
|
|
}else{
|
|
|
LOGGER.warn("in miniFaultReject, buyer Order now status {}, expect expectStatus {}",
|
|
|
buyerOrder.getStatus(), expectStatus);
|
|
|
buyerOrder.getStatus(), expectStatusList);
|
|
|
apiResponse.setCode(400);
|
|
|
apiResponse.setMessage("订单状态发生变化");
|
|
|
}
|
...
|
...
|
@@ -418,11 +462,12 @@ public class AppraiseService { |
|
|
* 更新发到卖家的物流信息
|
|
|
* 将卖家的保证金分账给平台和买家
|
|
|
* 更新买家订单状态
|
|
|
* appraiseFlag 鉴定标志,//true 鉴定不通过 ;false 质检不通过 ;
|
|
|
* @return
|
|
|
*/
|
|
|
public ApiResponse appraiseFail(AppraiseExpressInfoBo appraiseExpressInfoBo,OrderStatus expectStatus,boolean appraiseNotPassFlag){
|
|
|
LOGGER.info("appraiseFail enter , appraiseExpressInfoBo {} ,appraiseNotPassFlag {}", appraiseExpressInfoBo ,appraiseNotPassFlag);
|
|
|
public ApiResponse appraiseFailAndDelivery(AppraiseExpressInfoBo appraiseExpressInfoBo){
|
|
|
LOGGER.info("appraiseFail enter , appraiseExpressInfoBo {} ,appraiseNotPassFlag {}", appraiseExpressInfoBo );
|
|
|
OrderStatus expectStatus = OrderStatus.PLATFORM_CHECKING;
|
|
|
OrderStatus targetStatus = OrderStatus.CHECKING_FAKE;
|
|
|
Long orderCode = appraiseExpressInfoBo.getOrderCode();
|
|
|
Integer expressCompanyId = appraiseExpressInfoBo.getExpressCompanyId();
|
|
|
String wayBillCode = appraiseExpressInfoBo.getWayBillCode();
|
...
|
...
|
@@ -444,18 +489,19 @@ public class AppraiseService { |
|
|
}
|
|
|
// 更新买家订单状态 为鉴定不通过
|
|
|
int buyerUid = buyerOrder.getUid();
|
|
|
OrderStatus targetStatus = OrderStatus.CHECKING_FAKE;
|
|
|
int sellerUid = buyerOrder.getSellerUid();
|
|
|
LOGGER.info("appraiseFail update buyer order {} ", buyerOrder);
|
|
|
int rows = buyerOrderMapper.updateStatusByOrderCode(orderCode, buyerUid, expectStatus.getCode(), targetStatus.getCode(),
|
|
|
DateUtil.getCurrentTimeSecond());
|
|
|
|
|
|
if (rows > 0){
|
|
|
/*
|
|
|
//refund coupons of buyer
|
|
|
BuyerRefundCouponEvent brce = BuyerRefundCouponEvent.builder().bizCase(BuyerRefundCouponEvent.BizCase.APPRAISE_FAIL)
|
|
|
.uid(buyerUid).orderCode(orderCode).build();
|
|
|
EventBusPublisher.publishEvent(brce);
|
|
|
//
|
|
|
int sellerUid = buyerOrder.getSellerUid();
|
|
|
|
|
|
BuyerOrderGoods bog = buyerOrderGoodsMapper.selectByOrderCode(buyerUid, orderCode);
|
|
|
int skup = bog.getSkup();
|
|
|
|
...
|
...
|
@@ -512,6 +558,11 @@ public class AppraiseService { |
|
|
.loadRefundAction(payRefundService::refund)
|
|
|
.loadLogger(LOGGER)
|
|
|
.refund();
|
|
|
*/
|
|
|
RefundMoneyResultModel refundMoneyResultModel= operateMoneyWhenCheckFail(buyerOrder,orderCode,targetStatus);
|
|
|
boolean refundGoodsMoneyFlag = refundMoneyResultModel.isRefundGoodsMoneyFlag();
|
|
|
SellerOrderGoods sellerOrderGoods = refundMoneyResultModel.getSellerOrderGoods();
|
|
|
|
|
|
if (!refundGoodsMoneyFlag){
|
|
|
apiResponse.setCode(400);
|
|
|
String content = "鉴定不通过时,退用户" + sellerUid + "货款订单"+ orderCode +"失败";
|
...
|
...
|
@@ -524,15 +575,9 @@ public class AppraiseService { |
|
|
orderStatusFlowService.addAsy(buyerOrder.getOrderCode(), targetStatus.getCode());
|
|
|
|
|
|
//TODO 消息
|
|
|
if(appraiseNotPassFlag){
|
|
|
//鉴定不通过 ,其余的情况不发消息,改成寄回的时候再发消息
|
|
|
inBoxFacade.noticeSellerWhenAppraiseFail(sellerOrderGoods, orderCode, wayBillCode);
|
|
|
inBoxFacade.buyerGetEarnestMoneyWhenAppraiseFail(buyerUid, buyerOrder.getOrderCode(), sellerOrderGoods.getProductName());
|
|
|
}else {
|
|
|
//质检不通过
|
|
|
inBoxFacade.noticeBuyerWhenQualityCheckNotPass(buyerUid, buyerOrder.getOrderCode(), sellerOrderGoods.getProductName());
|
|
|
inBoxFacade.sellerQualityCheckNotPass(sellerOrderGoods,orderCode);
|
|
|
}
|
|
|
//鉴定不通过 ,其余的情况不发消息,改成寄回的时候再发消息
|
|
|
inBoxFacade.noticeSellerWhenAppraiseFail(sellerOrderGoods, orderCode, wayBillCode);
|
|
|
inBoxFacade.buyerGetEarnestMoneyWhenAppraiseFail(buyerUid, buyerOrder.getOrderCode(), sellerOrderGoods.getProductName());
|
|
|
|
|
|
}catch(Exception ex) {
|
|
|
LOGGER.warn("in appraiseFail orderStatusFlowService or notice fail orderCode {}", orderCode, ex);
|
...
|
...
|
@@ -541,30 +586,15 @@ public class AppraiseService { |
|
|
executorService.execute(()->{
|
|
|
//更新物流信息,写到最后
|
|
|
//鉴定不通过,发物流
|
|
|
if(appraiseNotPassFlag){
|
|
|
//补:鉴定不通过
|
|
|
EnumExpressType expressType = EnumExpressType.EXPRESS_TYPE_JUDGE_CENTER;
|
|
|
EnumExpressDataType expressDataType = EnumExpressDataType.operate_transfer;
|
|
|
EnumExpressDataOperateTransferCode operateTransferCode = EnumExpressDataOperateTransferCode.judge_reject;
|
|
|
expressInfoService.saveOperateTransferExpressInfo(sellerUid,orderCode,expressType.getCode(),expressDataType,operateTransferCode);
|
|
|
//补:鉴定不通过
|
|
|
EnumExpressType expressType = EnumExpressType.EXPRESS_TYPE_JUDGE_CENTER;
|
|
|
EnumExpressDataType expressDataType = EnumExpressDataType.operate_transfer;
|
|
|
EnumExpressDataOperateTransferCode operateTransferCode = EnumExpressDataOperateTransferCode.judge_reject;
|
|
|
expressInfoService.saveOperateTransferExpressInfo(sellerUid,orderCode,expressType.getCode(),expressDataType,operateTransferCode);
|
|
|
|
|
|
//发货物流(平台已发货)
|
|
|
expressInfoService.returnBackOrderCauseOfJudgeFailure(sellerUid, expressCompanyId, orderCode, wayBillCode, depotNum,mobile);
|
|
|
}else {
|
|
|
//质检不通过,不发物流
|
|
|
//发货物流(平台已发货)
|
|
|
expressInfoService.returnBackOrderCauseOfJudgeFailure(sellerUid, expressCompanyId, orderCode, wayBillCode, depotNum,mobile);
|
|
|
|
|
|
//先补加一条鉴定中物流
|
|
|
EnumExpressType expressType = EnumExpressType.EXPRESS_TYPE_JUDGE_CENTER;
|
|
|
EnumExpressDataType expressDataType = EnumExpressDataType.operate_transfer;
|
|
|
EnumExpressDataOperateTransferCode operateTransferCode = EnumExpressDataOperateTransferCode.judging;
|
|
|
expressInfoService.saveOperateTransferExpressInfo(sellerUid,orderCode,expressType.getCode(),expressDataType,operateTransferCode);
|
|
|
|
|
|
//再加一个鉴定不通过的物流
|
|
|
operateTransferCode = EnumExpressDataOperateTransferCode.quality_check_reject;
|
|
|
expressType = EnumExpressType.EXPRESS_TYPE_JUDGE_CENTER;
|
|
|
expressDataType = EnumExpressDataType.operate_transfer;
|
|
|
expressInfoService.saveOperateTransferExpressInfo(sellerUid,orderCode,expressType.getCode(),expressDataType,operateTransferCode);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
...
|
...
|
@@ -648,7 +678,418 @@ public class AppraiseService { |
|
|
}
|
|
|
}
|
|
|
|
|
|
public ApiResponse appraiseSuccess(Integer expressCompanyId, Long orderCode, String wayBillCode,Integer depotNum,String mobile){
|
|
|
@Data
|
|
|
class RefundMoneyResultModel{
|
|
|
boolean refundGoodsMoneyFlag;
|
|
|
SellerOrderGoods sellerOrderGoods;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 鉴定不通或者质检不通过
|
|
|
* 操作钱
|
|
|
*/
|
|
|
private RefundMoneyResultModel operateMoneyWhenCheckFail(BuyerOrder buyerOrder, Long orderCode, OrderStatus targetStatus){
|
|
|
LOGGER.info("operateMoney enter , orderCode {},targetStatus {} ", orderCode ,targetStatus);
|
|
|
RefundMoneyResultModel model = new RefundMoneyResultModel();
|
|
|
int buyerUid = buyerOrder.getUid();
|
|
|
int sellerUid = buyerOrder.getSellerUid();
|
|
|
|
|
|
//refund coupons of buyer
|
|
|
BuyerRefundCouponEvent brce = BuyerRefundCouponEvent.builder().bizCase(BuyerRefundCouponEvent.BizCase.APPRAISE_FAIL)
|
|
|
.uid(buyerUid).orderCode(orderCode).build();
|
|
|
EventBusPublisher.publishEvent(brce);
|
|
|
//
|
|
|
|
|
|
BuyerOrderGoods bog = buyerOrderGoodsMapper.selectByOrderCode(buyerUid, orderCode);
|
|
|
int skup = bog.getSkup();
|
|
|
|
|
|
SellerOrder sellerOrder = sellerOrderMapper.selectBySkup(skup);
|
|
|
long sellerOrderCode = sellerOrder.getOrderCode();
|
|
|
|
|
|
final SellerOrderStatus expectSOStatus = SellerOrderStatus.HAS_PAYED;
|
|
|
final SellerOrderStatus targetSoStatus = SellerOrderStatus.APPRAISAL_FAIL_COMPENSATE;
|
|
|
|
|
|
SellerOrderGoods sellerOrderGoods = updateSellerOrderStatusAndCleanCache(sellerUid ,sellerOrderCode,expectSOStatus,targetSoStatus,
|
|
|
skup, orderCode, buyerUid);
|
|
|
|
|
|
//将卖家的保证金分账给平台和买家
|
|
|
PenaltyResult penaltyResult = SellerEarnestMoney2BuyerPenaltyCalculator.from(sellerOrderMetaMapper.selectByMetaKey(sellerUid, skup, "fee"))
|
|
|
.calculate()
|
|
|
.orElse(null);
|
|
|
if(Objects.nonNull(penaltyResult)){
|
|
|
TransferCase transferCase = TransferCase.EARNEST_MONEY_TO_BUYER;
|
|
|
TranseferCellNode transeferCellNode = new TranseferCellNode();
|
|
|
transeferCellNode.setUid(buyerUid);
|
|
|
transeferCellNode.setAmount(penaltyResult.getPenaltyAmountWithoutYhServiceAmount());
|
|
|
TransferMoneyRequest tmReq = TransferMoneyRequest.builder()
|
|
|
.sellerUid(sellerUid)
|
|
|
.buyerOrderCode(orderCode)
|
|
|
.type(transferCase.getCode())
|
|
|
.transferCase(transferCase)
|
|
|
.transeferCellNode(transeferCellNode)
|
|
|
.swdType(SellerWalletDetail.Type.APPRAISE_FAIL)
|
|
|
.alarmConfig(AlarmConfig.APPRAISE_FAIL)
|
|
|
.build();
|
|
|
|
|
|
//先校验,提前把错误抛出
|
|
|
paymentService.transferMonCheck(tmReq);
|
|
|
//再分账
|
|
|
|
|
|
//改成异步的分账,不关心分账执行结果
|
|
|
executorService.execute(()->{
|
|
|
LOGGER.info("in appraiseFail,begin transfer async");
|
|
|
transferService.transfer(tmReq);
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
//退钱给买家
|
|
|
BigDecimal goodsMoney = buyerOrder.getAmount();
|
|
|
BillLogEvent.BillLogEventBuilder bleb = BillLogEvent.builder()
|
|
|
.buyerUid(buyerUid).sellerUid(sellerUid).orderCode(orderCode)
|
|
|
.payType(buyerOrder.getPayment()).refundCase(RefundCase.BUYER_GOODS_MONEY)
|
|
|
.amount(goodsMoney)
|
|
|
.skup(skup);
|
|
|
boolean refundGoodsMoneyFlag = new RefundGoodsMoneyHandler().loadPaymentRequest(buyerUid,orderCode,goodsMoney)
|
|
|
.loadBillLogEventBuilder(bleb)
|
|
|
.loadTargetOrderStatus(targetStatus)
|
|
|
.loadRefundAction(payRefundService::refund)
|
|
|
.loadLogger(LOGGER)
|
|
|
.refund();
|
|
|
|
|
|
model.setRefundGoodsMoneyFlag(refundGoodsMoneyFlag);
|
|
|
model.setSellerOrderGoods(sellerOrderGoods);
|
|
|
return model;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 鉴定不通过 3->13 或者 MINI_FAULT_ACCEPT ->13
|
|
|
* 不发物流
|
|
|
*/
|
|
|
public ApiResponse judgeCenterNotPass(AppraiseExpressInfoBo appraiseExpressInfoBo){
|
|
|
LOGGER.info("judgeCenterNotPass enter , appraiseExpressInfoBo {} ", appraiseExpressInfoBo );
|
|
|
OrderStatus expectStatus ;
|
|
|
OrderStatus targetStatus = OrderStatus.CHECKING_FAKE;
|
|
|
Long orderCode = appraiseExpressInfoBo.getOrderCode();
|
|
|
|
|
|
ApiResponse apiResponse=new ApiResponse();
|
|
|
BuyerOrder buyerOrder = buyerOrderMapper.selectOnlyByOrderCode(orderCode);
|
|
|
|
|
|
if (buyerOrder == null){
|
|
|
LOGGER.warn("judgeCenterNotPass getOrderInfo order not exist, orderCode {}", orderCode);
|
|
|
throw new ServiceException(ServiceError.ORDER_NULL);
|
|
|
}
|
|
|
|
|
|
if(buyerOrder.getStatus() == OrderStatus.PLATFORM_CHECKING.getCode()){
|
|
|
expectStatus = OrderStatus.PLATFORM_CHECKING;
|
|
|
}else if(buyerOrder.getStatus() == OrderStatus.MINI_FAULT_ACCEPT.getCode()){
|
|
|
expectStatus = OrderStatus.MINI_FAULT_ACCEPT;
|
|
|
}else{
|
|
|
LOGGER.warn("judgeCenterNotPass expectStatus PLATFORM_CHECKING or MINI_FAULT_ACCEPT, actual status {}, orderCode {}",
|
|
|
buyerOrder.getStatus(), orderCode);
|
|
|
throw new ServiceException(ServiceError.ORDER_STATUS_INVALIDATE);
|
|
|
}
|
|
|
// 更新买家订单状态
|
|
|
int buyerUid = buyerOrder.getUid();
|
|
|
int sellerUid = buyerOrder.getSellerUid();
|
|
|
LOGGER.info("judgeCenterNotPass update buyer order {} ", buyerOrder);
|
|
|
int rows = buyerOrderMapper.updateStatusByOrderCode(orderCode, buyerUid, expectStatus.getCode(), targetStatus.getCode(),
|
|
|
DateUtil.getCurrentTimeSecond());
|
|
|
|
|
|
if (rows > 0){
|
|
|
RefundMoneyResultModel refundMoneyResultModel= operateMoneyWhenCheckFail(buyerOrder,orderCode,targetStatus);
|
|
|
boolean refundGoodsMoneyFlag = refundMoneyResultModel.isRefundGoodsMoneyFlag();
|
|
|
SellerOrderGoods sellerOrderGoods = refundMoneyResultModel.getSellerOrderGoods();
|
|
|
if (!refundGoodsMoneyFlag){
|
|
|
apiResponse.setCode(400);
|
|
|
String content = "后台鉴定商品不通过,退用户" + sellerUid + "货款订单"+ orderCode +"失败";
|
|
|
apiResponse.setMessage(content);
|
|
|
}
|
|
|
|
|
|
//记录订单的状态变更信息
|
|
|
LOGGER.info("in judgeCenterNotPass record status change, orderCode {},uid {} ,sellerUid {}", orderCode,buyerUid,sellerUid);
|
|
|
try {
|
|
|
orderStatusFlowService.addAsy(buyerOrder.getOrderCode(), targetStatus.getCode());
|
|
|
|
|
|
//鉴定不通过
|
|
|
inBoxFacade.noticeBuyerWhenQualityCheckNotPass(buyerUid, buyerOrder.getOrderCode(), sellerOrderGoods.getProductName());
|
|
|
inBoxFacade.sellerQualityCheckNotPass(sellerOrderGoods,orderCode);
|
|
|
|
|
|
}catch(Exception ex) {
|
|
|
LOGGER.warn("in judgeCenterNotPass orderStatusFlowService or notice fail orderCode {}", orderCode, ex);
|
|
|
}finally {
|
|
|
/// 物流信息异步执行
|
|
|
executorService.execute(()->{
|
|
|
//鉴定通过,不发物流
|
|
|
EnumExpressType expressType = EnumExpressType.EXPRESS_TYPE_JUDGE_CENTER;
|
|
|
EnumExpressDataType expressDataType = EnumExpressDataType.operate_transfer;
|
|
|
EnumExpressDataOperateTransferCode operateTransferCode = EnumExpressDataOperateTransferCode.judge_reject;
|
|
|
expressInfoService.saveOperateTransferExpressInfo(sellerUid,orderCode,expressType.getCode(),expressDataType,operateTransferCode);
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
}else{
|
|
|
LOGGER.warn("in judgeCenterNotPass, buyer Order now status {}, expect expectStatus {}",
|
|
|
buyerOrder.getStatus(), expectStatus);
|
|
|
apiResponse.setCode(400);
|
|
|
apiResponse.setMessage("订单状态发生变化");
|
|
|
}
|
|
|
return apiResponse;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 质检不通过 31->20
|
|
|
* 不发物流
|
|
|
*/
|
|
|
public ApiResponse qualityCheckReject(AppraiseExpressInfoBo appraiseExpressInfoBo){
|
|
|
LOGGER.info("qualityCheckReject enter , appraiseExpressInfoBo {} ", appraiseExpressInfoBo );
|
|
|
OrderStatus expectStatus = OrderStatus.PLATFORM_RECEIVE;
|
|
|
OrderStatus targetStatus = OrderStatus.QUALITY_CHECK_FAKE;
|
|
|
Long orderCode = appraiseExpressInfoBo.getOrderCode();
|
|
|
|
|
|
ApiResponse apiResponse=new ApiResponse();
|
|
|
BuyerOrder buyerOrder = buyerOrderMapper.selectOnlyByOrderCode(orderCode);
|
|
|
|
|
|
if (buyerOrder == null){
|
|
|
LOGGER.warn("qualityCheckReject getOrderInfo order not exist, orderCode {}", orderCode);
|
|
|
throw new ServiceException(ServiceError.ORDER_NULL);
|
|
|
}
|
|
|
|
|
|
if (buyerOrder.getStatus() != expectStatus.getCode()){
|
|
|
LOGGER.warn("qualityCheckReject expectStatus {}, actual status {}, orderCode {}", expectStatus,
|
|
|
buyerOrder.getStatus(), orderCode);
|
|
|
throw new ServiceException(ServiceError.ORDER_STATUS_INVALIDATE);
|
|
|
}
|
|
|
// 更新买家订单状态
|
|
|
int buyerUid = buyerOrder.getUid();
|
|
|
int sellerUid = buyerOrder.getSellerUid();
|
|
|
LOGGER.info("qualityCheckReject update buyer order {} ", buyerOrder);
|
|
|
int rows = buyerOrderMapper.updateStatusByOrderCode(orderCode, buyerUid, expectStatus.getCode(), targetStatus.getCode(),
|
|
|
DateUtil.getCurrentTimeSecond());
|
|
|
|
|
|
if (rows > 0){
|
|
|
RefundMoneyResultModel refundMoneyResultModel= operateMoneyWhenCheckFail(buyerOrder,orderCode,targetStatus);
|
|
|
boolean refundGoodsMoneyFlag = refundMoneyResultModel.isRefundGoodsMoneyFlag();
|
|
|
SellerOrderGoods sellerOrderGoods = refundMoneyResultModel.getSellerOrderGoods();
|
|
|
if (!refundGoodsMoneyFlag){
|
|
|
apiResponse.setCode(400);
|
|
|
String content = "后台质检不通过时,退用户" + sellerUid + "货款订单"+ orderCode +"失败";
|
|
|
apiResponse.setMessage(content);
|
|
|
}
|
|
|
|
|
|
//记录订单的状态变更信息
|
|
|
LOGGER.info("in qualityCheckReject record status change, orderCode {},uid {} ,sellerUid {}", orderCode,buyerUid,sellerUid);
|
|
|
try {
|
|
|
orderStatusFlowService.addAsy(buyerOrder.getOrderCode(), targetStatus.getCode());
|
|
|
|
|
|
//质检不通过
|
|
|
inBoxFacade.noticeBuyerWhenQualityCheckNotPass(buyerUid, buyerOrder.getOrderCode(), sellerOrderGoods.getProductName());
|
|
|
inBoxFacade.sellerQualityCheckNotPass(sellerOrderGoods,orderCode);
|
|
|
|
|
|
}catch(Exception ex) {
|
|
|
LOGGER.warn("in qualityCheckReject orderStatusFlowService or notice fail orderCode {}", orderCode, ex);
|
|
|
}finally {
|
|
|
/// 物流信息异步执行
|
|
|
executorService.execute(()->{
|
|
|
//质检不通过,不发物流
|
|
|
//先补加一条鉴定中物流
|
|
|
EnumExpressType expressType = EnumExpressType.EXPRESS_TYPE_JUDGE_CENTER;
|
|
|
EnumExpressDataType expressDataType = EnumExpressDataType.operate_transfer;
|
|
|
EnumExpressDataOperateTransferCode operateTransferCode = EnumExpressDataOperateTransferCode.judging;
|
|
|
expressInfoService.saveOperateTransferExpressInfo(sellerUid,orderCode,expressType.getCode(),expressDataType,operateTransferCode);
|
|
|
|
|
|
//再加一个鉴定不通过的物流
|
|
|
operateTransferCode = EnumExpressDataOperateTransferCode.quality_check_reject;
|
|
|
expressType = EnumExpressType.EXPRESS_TYPE_JUDGE_CENTER;
|
|
|
expressDataType = EnumExpressDataType.operate_transfer;
|
|
|
expressInfoService.saveOperateTransferExpressInfo(sellerUid,orderCode,expressType.getCode(),expressDataType,operateTransferCode);
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
}else{
|
|
|
LOGGER.warn("in qualityCheckReject, buyer Order now status {}, expect expectStatus {}",
|
|
|
buyerOrder.getStatus(), expectStatus);
|
|
|
apiResponse.setCode(400);
|
|
|
apiResponse.setMessage("订单状态发生变化");
|
|
|
}
|
|
|
return apiResponse;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 正常发货
|
|
|
* 鉴定通过 -- 待收货
|
|
|
*/
|
|
|
public void deliveryGoodsToBuyer(AppraiseExpressInfoBo appraiseExpressInfoBo){
|
|
|
LOGGER.info("deliveryGoodsToBuyer enter req {}", appraiseExpressInfoBo);
|
|
|
final OrderStatus expectOrderStatus = OrderStatus.JUDGE_PASS;
|
|
|
final OrderStatus targetOrderStatus = OrderStatus.WAITING_RECEIVE;
|
|
|
Long orderCode = appraiseExpressInfoBo.getOrderCode();
|
|
|
BuyerOrder buyerOrder = buyerOrderMapper.selectOnlyByOrderCode(orderCode);
|
|
|
|
|
|
if (buyerOrder == null){
|
|
|
LOGGER.warn("deliveryGoodsToBuyer getOrderInfo order not exist, orderCode is {}", orderCode);
|
|
|
throw new ServiceException(ServiceError.ORDER_NULL);
|
|
|
}
|
|
|
|
|
|
if (expectOrderStatus.getCode() != buyerOrder.getStatus().intValue()){
|
|
|
LOGGER.warn("in deliveryGoodsToBuyer, buyer Order orderCode {} pstatus {}, expect Order Status {}",
|
|
|
orderCode, buyerOrder.getStatus(), expectOrderStatus);
|
|
|
throw new ServiceException(ServiceError.ORDER_STATUS_INVALIDATE);
|
|
|
}
|
|
|
|
|
|
Integer buyerUid = buyerOrder.getUid();
|
|
|
int updateBuyerCnt = buyerOrderMapper.updateStatusByOrderCode(orderCode, buyerUid,
|
|
|
expectOrderStatus.getCode(), targetOrderStatus.getCode(), DateUtil.getCurrentTimeSecond());
|
|
|
if (updateBuyerCnt == 1){
|
|
|
//发货,这个时候产生:买家确认收货的mq
|
|
|
BuyerConfirmEvent buyerConfirmEvent = BuyerConfirmEvent.builder().uid(buyerUid).orderCode(orderCode).build();
|
|
|
EventBusPublisher.publishEvent(buyerConfirmEvent);
|
|
|
|
|
|
//记录物流信息
|
|
|
//发物流
|
|
|
expressInfoService.deliverGoods(buyerUid, appraiseExpressInfoBo.getExpressCompanyId(), orderCode, appraiseExpressInfoBo.getWayBillCode(), appraiseExpressInfoBo.getDepotNum(),appraiseExpressInfoBo.getMobile());
|
|
|
|
|
|
//记录订单的状态变更信息
|
|
|
orderStatusFlowService.addAsy(buyerOrder.getOrderCode(),targetOrderStatus.getCode());
|
|
|
|
|
|
//TODO 平台已发货给买家
|
|
|
|
|
|
//清缓存
|
|
|
cleanCacheAfterUpdateStatus(buyerOrder.getOrderCode(),buyerOrder.getUid(),buyerOrder.getSellerUid());
|
|
|
}else{
|
|
|
LOGGER.warn("in deliveryGoodsToBuyer update status number zero, buyer Order orderCode {} pstatus {}, expect Order Status {}",
|
|
|
orderCode, buyerOrder.getStatus(), expectOrderStatus);
|
|
|
throw new ServiceException(ServiceError.ORDER_STATUS_INVALIDATE);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 鉴定通过,但是不发货
|
|
|
* @return
|
|
|
*/
|
|
|
public ApiResponse judgeCenterPass(Long orderCode){
|
|
|
LOGGER.info("judgeCenterPass enter orderCode {}", orderCode);
|
|
|
ApiResponse apiResponse=new ApiResponse();
|
|
|
BuyerOrder buyerOrder = buyerOrderMapper.selectOnlyByOrderCode(orderCode);
|
|
|
|
|
|
if (buyerOrder == null){
|
|
|
LOGGER.warn("judgeCenterPass getOrderInfo order not exist, orderCode is {}", orderCode);
|
|
|
throw new ServiceException(ServiceError.ORDER_NULL);
|
|
|
}
|
|
|
final OrderStatus expectOrderStatus ;
|
|
|
final OrderStatus targetOrderStatus = OrderStatus.JUDGE_PASS;
|
|
|
if( OrderStatus.PLATFORM_CHECKING.getCode() == buyerOrder.getStatus().intValue()){
|
|
|
expectOrderStatus = OrderStatus.PLATFORM_CHECKING;
|
|
|
}else if(OrderStatus.MINI_FAULT_ACCEPT.getCode() == buyerOrder.getStatus().intValue()){
|
|
|
expectOrderStatus = OrderStatus.MINI_FAULT_ACCEPT;
|
|
|
}else{
|
|
|
LOGGER.warn("in judgeCenterPass, buyer Order orderCode {} status {}, expect Order Status is OrderStatus.PLATFORM_CHECKING or OrderStatus.MINI_FAULT_ACCEPT ",
|
|
|
orderCode, buyerOrder.getStatus());
|
|
|
throw new ServiceException(ServiceError.ORDER_STATUS_INVALIDATE);
|
|
|
}
|
|
|
LOGGER.info("judgeCenterPass enter orderCode {} ,expectOrderStatus {}", orderCode ,expectOrderStatus);
|
|
|
|
|
|
Integer buyerUid = buyerOrder.getUid();
|
|
|
BuyerOrderGoods bog = buyerOrderGoodsMapper.selectByOrderCode(buyerUid, orderCode);
|
|
|
int skup = bog.getSkup();
|
|
|
SellerOrder sellerOrder = sellerOrderMapper.selectBySkup(skup);
|
|
|
|
|
|
|
|
|
int updateBuyerCnt = buyerOrderMapper.updateStatusByOrderCode(orderCode, buyerUid,
|
|
|
expectOrderStatus.getCode(), targetOrderStatus.getCode(), DateUtil.getCurrentTimeSecond());
|
|
|
|
|
|
if (updateBuyerCnt == 1){
|
|
|
final Integer sellerUid = sellerOrder.getUid();
|
|
|
final Long sellerOrderCode = sellerOrder.getOrderCode();
|
|
|
final SellerOrderStatus expectSOStatus = SellerOrderStatus.HAS_PAYED;
|
|
|
final SellerOrderStatus targetSoStatus = SellerOrderStatus.FINISH;
|
|
|
|
|
|
/**
|
|
|
* 更新卖家订单状态,
|
|
|
*/
|
|
|
SellerOrderGoods sellerOrderGoods = updateSellerOrderStatusAndCleanCache(sellerUid ,sellerOrderCode,expectSOStatus,targetSoStatus,
|
|
|
skup, orderCode, buyerUid);
|
|
|
|
|
|
|
|
|
//退款给卖家(仅退一次)
|
|
|
PaymentRequest refundReqOfSeller = operateMoneyWhenOk(buyerUid,orderCode,skup,sellerOrder,targetSoStatus);
|
|
|
|
|
|
try {
|
|
|
//记录订单的状态变更信息
|
|
|
LOGGER.info("in judgeCenterPass record status change, orderCode {},uid {} ,sellerUid {}", orderCode,buyerUid,sellerUid);
|
|
|
orderStatusFlowService.addAsy(buyerOrder.getOrderCode(),targetOrderStatus.getCode());
|
|
|
|
|
|
//TODO 鉴定通过,等待发货,消息
|
|
|
//inBoxFacade.appraisePassNotice(buyerUid, orderCode, sellerOrderGoods);
|
|
|
}catch (Exception ex){
|
|
|
LOGGER.warn("in judgeCenterPass,refund fail, refundReqOfSeller {}", refundReqOfSeller, ex);
|
|
|
String content = "后台鉴定通过商品,订单"+ orderCode + "退还保证金失败";
|
|
|
apiResponse.setCode(400);
|
|
|
apiResponse.setMessage(content);
|
|
|
}finally {
|
|
|
//记录调拨信息
|
|
|
EnumExpressType expressType = EnumExpressType.EXPRESS_TYPE_JUDGE_CENTER;
|
|
|
EnumExpressDataType expressDataType = EnumExpressDataType.operate_transfer;
|
|
|
EnumExpressDataOperateTransferCode operateTransferCode = EnumExpressDataOperateTransferCode.judge_pass;
|
|
|
expressInfoService.saveOperateTransferExpressInfo(sellerUid,orderCode,expressType.getCode(),expressDataType,operateTransferCode);
|
|
|
}
|
|
|
|
|
|
LOGGER.info("in judgeCenterPass, refund earnestMoney finish, seller {}, order code {}, skup {}, earnestMoney {}",
|
|
|
sellerUid, sellerOrderCode, skup, sellerOrder.getEarnestMoney() );
|
|
|
|
|
|
|
|
|
}else{
|
|
|
LOGGER.warn("in judgeCenterPass, buyer Order pstatus {}, expect expectOrderStatus {}",
|
|
|
buyerOrder.getStatus(), expectOrderStatus);
|
|
|
apiResponse.setCode(400);
|
|
|
apiResponse.setMessage("订单状态发生变化");
|
|
|
}
|
|
|
|
|
|
return apiResponse;
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 通过时 ,操作钱
|
|
|
*/
|
|
|
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;
|
|
|
TranseferCellNode transeferCellNode = new TranseferCellNode();
|
|
|
transeferCellNode.setUid(sellerUid);
|
|
|
transeferCellNode.setAmount(saleIncome);
|
|
|
TransferMoneyRequest tmReq = TransferMoneyRequest.builder()
|
|
|
.buyerOrderCode(orderCode)
|
|
|
.type(transferCase.getCode())
|
|
|
.transferCase(transferCase)
|
|
|
.transeferCellNode(transeferCellNode)
|
|
|
.alarmConfig(AlarmConfig.APPRAISE_SUCCESS)
|
|
|
.build();
|
|
|
|
|
|
//先校验,提前把错误抛出
|
|
|
paymentService.transferMonCheck(tmReq);
|
|
|
|
|
|
//改成异步的分账,不关心分账执行结果
|
|
|
executorService.execute(()->{
|
|
|
LOGGER.info("in appraiseSuccess,begin transfer async");
|
|
|
transferService.transfer(tmReq);
|
|
|
});
|
|
|
|
|
|
//退保证金给卖家
|
|
|
//refund earnestMoney
|
|
|
BigDecimal earnestMoney = sellerOrder.getEarnestMoney();
|
|
|
PaymentRequest refundReqOfSeller = refundEarnestMoney(SellerWalletDetail.Type.APPRAISE_OK,orderCode,sellerUid ,sellerOrder,skup,buyerUid,targetSoStatus,earnestMoney.doubleValue());
|
|
|
LOGGER.info("in appraiseSuccess,refund ok, refundReqOfSeller {}", refundReqOfSeller);
|
|
|
return refundReqOfSeller;
|
|
|
}
|
|
|
|
|
|
public ApiResponse appraiseSuccessAndDelivery(Integer expressCompanyId, Long orderCode, String wayBillCode,Integer depotNum,String mobile){
|
|
|
ApiResponse apiResponse=new ApiResponse();
|
|
|
BuyerOrder buyerOrder = buyerOrderMapper.selectOnlyByOrderCode(orderCode);
|
|
|
|
...
|
...
|
@@ -683,6 +1124,7 @@ public class AppraiseService { |
|
|
* 退款给卖家(仅退一次)
|
|
|
*
|
|
|
*/
|
|
|
/*
|
|
|
SellerOrder tso = new SellerOrder();
|
|
|
tso.setUid(sellerUid);
|
|
|
tso.setOrderCode(sellerOrderCode);
|
...
|
...
|
@@ -690,6 +1132,15 @@ public class AppraiseService { |
|
|
tso.setUpdateTime(DateUtil.getCurrentTimeSecond());
|
|
|
tso.setExceptStatus(expectSOStatus.getCode());
|
|
|
int soCnt = sellerOrderMapper.updateByOrderCode(tso);
|
|
|
*/
|
|
|
//更新卖家订单状态
|
|
|
SellerOrderGoods sellerOrderGoods = updateSellerOrderStatusAndCleanCache(sellerUid ,sellerOrderCode,expectSOStatus,targetSoStatus,
|
|
|
skup, orderCode, buyerUid);
|
|
|
//退款给卖家(仅退一次)
|
|
|
PaymentRequest refundReqOfSeller = operateMoneyWhenOk(buyerUid,orderCode,skup,sellerOrder,targetSoStatus);
|
|
|
|
|
|
|
|
|
/*
|
|
|
BigDecimal saleIncome = getSaleIncome(sellerUid, skup);
|
|
|
|
|
|
TransferCase transferCase = TransferCase.ALL_GOODS_MONEY_TO_SELLER;
|
...
|
...
|
@@ -713,15 +1164,14 @@ public class AppraiseService { |
|
|
transferService.transfer(tmReq);
|
|
|
});
|
|
|
|
|
|
/**
|
|
|
* 退保证金给卖家
|
|
|
*/
|
|
|
//退保证金给卖家
|
|
|
//refund earnestMoney
|
|
|
BigDecimal earnestMoney = sellerOrder.getEarnestMoney();
|
|
|
PaymentRequest refundReqOfSeller = refundEarnestMoney(SellerWalletDetail.Type.APPRAISE_OK,orderCode,sellerUid ,sellerOrder,skup,buyerUid,targetSoStatus,earnestMoney.doubleValue());
|
|
|
LOGGER.info("in appraiseSuccess,refund ok, refundReqOfSeller {}", refundReqOfSeller);
|
|
|
|
|
|
SellerOrderGoods sellerOrderGoods = sellerOrderGoodsMapper.selectByPrimaryKey(skup);
|
|
|
*/
|
|
|
try {
|
|
|
//鉴定通过后自动发货,这个时候产生:买家确认收货的mq
|
|
|
BuyerConfirmEvent buyerConfirmEvent = BuyerConfirmEvent.builder().uid(buyerUid).orderCode(orderCode).build();
|
...
|
...
|
@@ -749,6 +1199,7 @@ public class AppraiseService { |
|
|
expressInfoService.saveOperateTransferExpressInfo(sellerUid,orderCode,expressType.getCode(),expressDataType,operateTransferCode);
|
|
|
}
|
|
|
|
|
|
/*
|
|
|
cacheCleaner.delete(Arrays.asList(CacheKeyBuilder.orderListKey(sellerUid, TabType.SELL.getValue()),
|
|
|
CacheKeyBuilder.orderListKey(buyerUid, TabType.BUY.getValue()),
|
|
|
CacheKeyBuilder.sellerOrderDetailKey(sellerOrderGoods),
|
...
|
...
|
@@ -758,9 +1209,10 @@ public class AppraiseService { |
|
|
|
|
|
ErpBuyerOrderEvent event = new ErpBuyerOrderEvent(buyerUid);
|
|
|
EventBusPublisher.publishEvent(event);
|
|
|
*/
|
|
|
|
|
|
LOGGER.info("in appraiseSuccess, refund earnestMoney finish, seller {}, order code {}, skup {}, earnestMoney {}",
|
|
|
sellerUid, sellerOrderCode, skup, earnestMoney );
|
|
|
sellerUid, sellerOrderCode, skup, sellerOrder.getEarnestMoney() );
|
|
|
|
|
|
|
|
|
}else{
|
...
|
...
|
|