/** * 计算两个价钱之差 price - reprice 得到真实价格 * * @param price * @param reprice * @return BigDecimal : 差值 */private final BigDecimal getRealPrice(BigDecimal price, BigDecimal reprice) { // 计算实际金额 if (price == null) { price = new BigDecimal(0); } if (reprice == null) { reprice = new BigDecimal(0); } BigDecimal toprice = price.subtract(reprice); return toprice;}复制代码