空值
This commit is contained in:
@@ -158,6 +158,9 @@ public class ShopOrderStatisticServiceImpl extends ServiceImpl<ShopOrderStatisti
|
||||
.add(creditPayAmount);
|
||||
result.setPayAmount(totalPayAmount);
|
||||
//毛利润(订单实付金额-商品成本)
|
||||
if (productCostAmount == null) {
|
||||
productCostAmount = BigDecimal.ZERO;
|
||||
}
|
||||
result.setProfitAmount(result.getPayAmount().subtract(productCostAmount));
|
||||
//毛利率(订单实付金额-商品成本)/订单实付金额*100%
|
||||
if (result.getPayAmount().compareTo(BigDecimal.ZERO) > 0) {
|
||||
|
||||
Reference in New Issue
Block a user