debug:渠道成本计算
This commit is contained in:
parent
6b1f38f07a
commit
73163e31f2
|
@ -18,6 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
|
||||
/**
|
||||
* @author wjh
|
||||
|
@ -68,11 +69,14 @@ public class PayBillConverterImpl implements PayBillConverter {
|
|||
return po;
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算渠道成本
|
||||
*/
|
||||
private BigDecimal calcChannelCost(ChannelVO channel, BigDecimal amount) {
|
||||
if (channel == null || amount == null) {
|
||||
return null;
|
||||
}
|
||||
return channel.getCostRate().multiply(amount);
|
||||
return channel.getCostRate().multiply(amount).divide(new BigDecimal(100), 2, RoundingMode.HALF_UP);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue
Block a user