Authored by qinchao

瑕疵等级扣费

package com.yohoufo.order.service.impl;
import com.yohoufo.common.alarm.EventBusPublisher;
import com.yohoufo.dal.order.model.SellerWalletDetail;
import com.yohoufo.order.common.BillTradeStatus;
import com.yohoufo.order.common.RefundCase;
import com.yohoufo.order.constants.RefundContant;
... ... @@ -27,9 +28,21 @@ public class PayRefundService {
public PayRefundBo refund(PaymentRequest refundReq, BillLogEvent.BillLogEventBuilder bleBuilder){
logger.info("in pay refund, refundReq {}", refundReq);
boolean toSeller = refundReq.getRefundCase() !=null && RefundCase.SELLER_EARNEST_MONEY == refundReq.getRefundCase();
if(refundReq.isSuper() && toSeller){
boolean miniFaultRejectFlag=false;
if(null!=refundReq.getRefundattch()&&refundReq.getRefundattch().getType()!=null){
if(SellerWalletDetail.Type.MINI_FAULT_REJECT.getValue()== refundReq.getRefundattch().getType().intValue() ){
miniFaultRejectFlag=true;
}
}
//瑕疵确认不通过,超级卖家需要扣保证金
//if(refundReq.isSuper() && toSeller){
if(refundReq.isSuper() && toSeller && !miniFaultRejectFlag){
logger.info("in pay refund refund return , miniFaultRejectFlag {} ,refundReq {}", miniFaultRejectFlag ,refundReq);
return null;
}
logger.info("in pay refund refund enter , miniFaultRejectFlag {} ,refundReq {}", miniFaultRejectFlag ,refundReq);
PayRefundBo refundResp = paymentService.refund(refundReq);
... ...