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