This commit is contained in:
2025-11-22 14:54:49 +08:00
parent f8d8f50c66
commit bcba0784dc

View File

@@ -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) {