Authored by Lixiaodi

Merge branch 'test6.8.7' of http://git.yoho.cn/ufo/yohoufo-fore into test6.8.7

... ... @@ -14,11 +14,11 @@ public class PlatformFeeDto {
/**
* 有货鉴定费(暂定5元)
*/
BigDecimal appraiseFee = new BigDecimal(5);
BigDecimal appraiseFee;// = new BigDecimal(5);
/**
* 有货包装费(暂定5元)
*/
BigDecimal packageFee = new BigDecimal(5);
BigDecimal packageFee;// = new BigDecimal(5);
BigDecimal serviceFee;
}
... ...
... ... @@ -10,7 +10,7 @@ import java.math.BigDecimal;
@Data
public class ServiceFeeRate {
public String getPayChannelPercent(){
BigDecimal rate = payChannelRate;
BigDecimal rate = payChannelRate == null ? BigDecimal.ZERO : payChannelRate;
return rate.multiply(new BigDecimal(100)).setScale(2, BigDecimal.ROUND_HALF_UP) + "%";
}
/**
... ... @@ -20,17 +20,17 @@ public class ServiceFeeRate {
* 后期活动可根据活动进行减免,每个卖家可收费不一样
* )
*/
BigDecimal goodsPaymentRate = new BigDecimal(0.05D).setScale(2, BigDecimal.ROUND_HALF_UP);
BigDecimal goodsPaymentRate;// = new BigDecimal(0.05D).setScale(2, BigDecimal.ROUND_HALF_UP);
/**
* 保证金抽成(暂定20%,后期可调整)
*/
BigDecimal earnestMoneyRate = new BigDecimal(0.20D).setScale(2, BigDecimal.ROUND_HALF_UP);
BigDecimal earnestMoneyRate;// = new BigDecimal(0.20D).setScale(2, BigDecimal.ROUND_HALF_UP);
/**
* 支付渠道费,调用银联支付接口时实时扣款
* (支付宝0.55%、微信均为0.6%,统一对用户收取0.6%,前期优惠策略可暂定0)
*/
BigDecimal payChannelRate = new BigDecimal(0.006D).setScale(4, BigDecimal.ROUND_HALF_UP);
BigDecimal payChannelRate ;//= new BigDecimal(0.006D).setScale(4, BigDecimal.ROUND_HALF_UP);
public static ServiceFeeRate getServiceFeeRate(){
... ...
... ... @@ -44,6 +44,7 @@ public class SellerAdvanceOrderComputeHandler extends AbsSellerOrderComputeHandl
@Override
protected ServiceFeeRate buildServiceFeeRate() {
//TODO
ServiceFeeRate serviceFeeRate = orderDynamicConfig.getServiceFeeRate();
return serviceFeeRate;
}
... ...
package com.yohoufo.order.bo;
import com.alibaba.fastjson.JSONObject;
import com.yohoufo.order.BaseTest;
import com.yohoufo.order.model.dto.PlatformFeeDto;
import com.yohoufo.order.model.dto.SellerOrderComputeResult;
import com.yohoufo.order.model.dto.ServiceFeeRate;
import org.junit.Test;
/**
* Created by chao.chen on 2019/3/6.
*/
public class SellerOrderComputeResultTest extends BaseTest {
@Test
public void printDefaultVals(){
SellerOrderComputeResult socr = new SellerOrderComputeResult();
PlatformFeeDto platformFee = new PlatformFeeDto();
socr.setPlatformFee(platformFee);
ServiceFeeRate serviceFeeRate = new ServiceFeeRate();
socr.setServiceFeeRate(serviceFeeRate);
System.out.println(JSONObject.toJSONString(socr));
}
}
... ...