...
|
...
|
@@ -7,8 +7,9 @@ import com.yohoufo.common.utils.PriceFormater; |
|
|
import com.yohoufo.order.model.dto.EarnestMoney;
|
|
|
import com.yohoufo.order.model.dto.PlatformFeeDto;
|
|
|
import com.yohoufo.order.model.dto.SellerOrderComputeResult;
|
|
|
import com.yohoufo.order.model.dto.ServiceFeeRate;
|
|
|
import com.yohoufo.order.service.proxy.ResourcesProxyService;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import com.yohoufo.order.utils.MathUtils;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.Map;
|
...
|
...
|
@@ -24,9 +25,6 @@ public final class SellerOrderConvertor { |
|
|
BigDecimal earnestMoney = earnestMoneyDTO.getEarnestMoney();
|
|
|
PlatformFeeDto platformFeeDto = computeResult.getPlatformFee();
|
|
|
BigDecimal income = computeResult.getIncome();
|
|
|
//service tips
|
|
|
String serviceTipsDesc = null;
|
|
|
String serviceTipsSummary = null;
|
|
|
//
|
|
|
String payPersent = computeResult.getServiceFeeRate() != null ? computeResult.getServiceFeeRate().getPayChannelPercent() : "";
|
|
|
PlatformFee platformFeeWrapper = PlatformFee.builder()
|
...
|
...
|
@@ -47,8 +45,6 @@ public final class SellerOrderConvertor { |
|
|
.platformFee(platformFeeWrapper)
|
|
|
.bankTransferFee(buildSubtractFee(bankTransferFeeStr))
|
|
|
.income(incomeStr)
|
|
|
.serviceTipsDesc(serviceTipsDesc)
|
|
|
.serviceTipsSummary(serviceTipsSummary)
|
|
|
.build();
|
|
|
return computeBo;
|
|
|
|
...
|
...
|
@@ -66,9 +62,12 @@ public final class SellerOrderConvertor { |
|
|
String serviceTipsDesc = null;
|
|
|
String serviceTipsSummary = null;
|
|
|
//
|
|
|
String payPersent = computeResult.getServiceFeeRate() != null ? computeResult.getServiceFeeRate().getPayChannelPercent() : "";
|
|
|
if (StringUtils.isNotBlank(payPersent)){
|
|
|
serviceTipsSummary = String.format("(%s)", payPersent);
|
|
|
boolean feeRateExists;
|
|
|
ServiceFeeRate serviceFeeRate;
|
|
|
String payPercent = (feeRateExists = ((serviceFeeRate=computeResult.getServiceFeeRate()) != null)) ? serviceFeeRate.getPayChannelPercent() : "";
|
|
|
BigDecimal goodsPaymentRate;
|
|
|
if (feeRateExists && (goodsPaymentRate=serviceFeeRate.getGoodsPaymentRate()) != null){
|
|
|
serviceTipsSummary = String.format("(%s)", MathUtils.convert2Percent(goodsPaymentRate));
|
|
|
}else{
|
|
|
if(tipsConfig!=null){
|
|
|
serviceTipsDesc = tipsConfig.get(ResourcesProxyService.KEY_SERVICETIPSDESC);
|
...
|
...
|
@@ -81,7 +80,7 @@ public final class SellerOrderConvertor { |
|
|
.appraiseFee(formatFee(platformFeeDto.getAppraiseFee()))
|
|
|
.packageFee(formatFee(platformFeeDto.getPackageFee()))
|
|
|
.serviceFee(formatFee(platformFeeDto.getServiceFee()))
|
|
|
.payChannelPercentage(payPersent)
|
|
|
.payChannelPercentage(payPercent)
|
|
|
.build();
|
|
|
//
|
|
|
String incomeStr = formatFee(income);
|
...
|
...
|
|