...
|
...
|
@@ -6,6 +6,7 @@ import com.yoho.core.dal.datasource.annotation.Database; |
|
|
import com.yoho.error.ServiceError;
|
|
|
import com.yoho.error.exception.ServiceException;
|
|
|
import com.yoho.tools.common.beans.ApiResponse;
|
|
|
import com.yohobuy.ufo.model.order.bo.MerchantOrderAttachInfo;
|
|
|
import com.yohobuy.ufo.model.order.bo.OrderInfo;
|
|
|
import com.yohobuy.ufo.model.order.common.OrderCodeType;
|
|
|
import com.yohobuy.ufo.model.order.constants.OrderConstant;
|
...
|
...
|
@@ -40,6 +41,7 @@ import com.yohoufo.order.service.pay.weixin.WeixinPayUFORealAppService; |
|
|
import com.yohoufo.order.service.support.codegenerator.OrderCodeGenerator;
|
|
|
import com.yohoufo.order.service.support.codegenerator.bean.CodeMeta;
|
|
|
import com.yohoufo.order.utils.LoggerUtils;
|
|
|
import com.yohoufo.order.utils.PaymentHelper;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
...
|
...
|
@@ -50,6 +52,7 @@ import org.springframework.stereotype.Service; |
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.Date;
|
|
|
import java.util.Objects;
|
|
|
|
|
|
import javax.annotation.PostConstruct;
|
|
|
|
...
|
...
|
@@ -442,7 +445,18 @@ public class PaymentServiceImpl implements IPaymentService { |
|
|
|
|
|
}
|
|
|
|
|
|
private void punishEarnest(SellerWalletDetail.Type swdType, SellerOrder sellerOrder){
|
|
|
Integer sellerUid = sellerOrder.getUid();
|
|
|
Long sellerOrderCode = sellerOrder.getOrderCode();
|
|
|
Integer skup = sellerOrder.getSkup();
|
|
|
if (Objects.nonNull(swdType) && PaymentHelper.isWallet(sellerOrder.getPayment())){
|
|
|
|
|
|
MerchantOrderAttachInfo moai = MerchantOrderAttachInfo.builder().uid(sellerUid)
|
|
|
.orderCode(sellerOrderCode).skup(skup).earnestMoney(sellerOrder.getEarnestMoney())
|
|
|
.type(swdType.getValue()).build();
|
|
|
merchantOrderPaymentService.punishEarnest( moai, swdType);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* <pre>
|
...
|
...
|
@@ -488,17 +502,19 @@ public class PaymentServiceImpl implements IPaymentService { |
|
|
}
|
|
|
|
|
|
// 卖家订单检查
|
|
|
SellerOrder sellerOrder = sellerOrderMapper.selectBySkup(buyerOrderGoods.getSkup());
|
|
|
Integer skup = buyerOrderGoods.getSkup();
|
|
|
SellerOrder sellerOrder = sellerOrderMapper.selectBySkup(skup);
|
|
|
if (sellerOrder == null){
|
|
|
logger.warn("transferMonErr getOrderInfo seller order not exist, skup is {}", buyerOrderGoods.getSkup());
|
|
|
throw new ServiceException(ServiceError.ORDER_NULL);
|
|
|
}
|
|
|
|
|
|
long sellerOrderCode = sellerOrder.getOrderCode();
|
|
|
Integer sellerUid = sellerOrder.getUid();
|
|
|
long sellerOrderCode = sellerOrder.getOrderCode();
|
|
|
punishEarnest(request.getSwdType(), sellerOrder);
|
|
|
TargetUserType targetUserType = (transferType == TransferCase.APPRAISE_FAIL.getCode()
|
|
|
|| transferType == TransferCase.SELLER_PLAY_BUYER.getCode()) ? TargetUserType.buyer : TargetUserType.seller;
|
|
|
//Integer targetUserType = (transferType == 2 || transferType == 3) ? 1 : 2;
|
|
|
Integer targetUid = targetUserType == TargetUserType.buyer ? buyerOrder.getUid() : sellerOrder.getUid();
|
|
|
Integer targetUid = targetUserType == TargetUserType.buyer ? buyerOrder.getUid() : sellerUid;
|
|
|
|
|
|
if (targetUid == null || targetUid < 1) {
|
|
|
logger.warn("transferMonErr uid {} 不合法", targetUid);
|
...
|
...
|
|