...
|
...
|
@@ -23,6 +23,13 @@ public class SellerOrderComputeHandler { |
|
|
private double earnestmoney_max;
|
|
|
private BigDecimal[] EARNESTMONEYRANGE = new BigDecimal[2];
|
|
|
|
|
|
@Value("${order.seller.appraiseFee:5}")
|
|
|
private Double appraiseFee;
|
|
|
/**
|
|
|
* 有货包装费(暂定5元)
|
|
|
*/
|
|
|
@Value("${order.seller.packageFee:5}")
|
|
|
private Double packageFee ;
|
|
|
|
|
|
@PostConstruct
|
|
|
public void init(){
|
...
|
...
|
@@ -79,6 +86,14 @@ public class SellerOrderComputeHandler { |
|
|
).subtract(platformFee));
|
|
|
}
|
|
|
|
|
|
public Double getAppraiseFee() {
|
|
|
return appraiseFee;
|
|
|
}
|
|
|
|
|
|
public Double getPackageFee() {
|
|
|
return packageFee;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 通过相加得出的数据
|
|
|
* TODO 服务费参与计算后需要考虑精度问题(四舍五入)
|
...
|
...
|
@@ -86,8 +101,10 @@ public class SellerOrderComputeHandler { |
|
|
*/
|
|
|
private PlatformFeeDto calPlatformFee(){
|
|
|
PlatformFeeDto platformFee = new PlatformFeeDto();
|
|
|
BigDecimal appraiseFee = platformFee.getAppraiseFee();
|
|
|
BigDecimal packageFee = platformFee.getPackageFee();
|
|
|
BigDecimal appraiseFee = halfUp(new BigDecimal(getAppraiseFee()));
|
|
|
BigDecimal packageFee = halfUp(new BigDecimal(getPackageFee()));
|
|
|
platformFee.setAppraiseFee(appraiseFee);
|
|
|
platformFee.setPackageFee(packageFee);
|
|
|
BigDecimal total = appraiseFee.add(packageFee);
|
|
|
platformFee.setTotal(total);
|
|
|
return platformFee;
|
...
|
...
|
|