Commit 06ad79c7 by 周晓航

修改需求:传递kg 保留三位小数 后续尾数直接舍弃

parent 79001388
...@@ -97,7 +97,7 @@ public class DeliverySdkAdapter { ...@@ -97,7 +97,7 @@ public class DeliverySdkAdapter {
if (result.compareTo(BigDecimal.ZERO) <= 0) { if (result.compareTo(BigDecimal.ZERO) <= 0) {
return new BigDecimal("0.5"); return new BigDecimal("0.5");
} }
// 这里 计算的结果是 g 需要变成 kg 给接口 保留2位小数 后面多余直接舍弃 // 这里 计算的结果是 g 需要变成 kg 给接口 保留3位小数 后面多余直接舍弃
return result.divide(new BigDecimal("1000"), 2, BigDecimal.ROUND_DOWN); return result.divide(new BigDecimal("1000"), 3, BigDecimal.ROUND_DOWN);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment