feat: 修改统计逻辑以计算总金额

This commit is contained in:
mkm 2024-06-22 09:47:11 +08:00
parent f2c9bbdb7b
commit e25fe49941

View File

@ -512,7 +512,7 @@ class TradeStatisticLogic extends BaseLogic
})->sum($orderSumField);
break;
case "group":
$totalMoney = $storeOrder->getCurveData($whereOrder, $where, 'count(pay_price)');
$totalMoney = $storeOrder->getCurveData($whereOrder, $where, 'sum(pay_price)');
break;
default:
throw new \Exception('getOrderRefundTotalMoney:selectType参数错误');
@ -546,7 +546,7 @@ class TradeStatisticLogic extends BaseLogic
})->sum($orderSumField);
break;
case "group":
$totalMoney = $UserSign->getCurveData($whereUserSign, $where, 'count(number)');
$totalMoney = $UserSign->getCurveData($whereUserSign, $where, 'sum(number)');
break;
default:
throw new \Exception('getUserSign:selectType参数错误');
@ -579,7 +579,7 @@ class TradeStatisticLogic extends BaseLogic
})->sum('number');
break;
case "group":
$totalMoney = $store_finance_flow->getCurveData($where, $time, 'count(number)');
$totalMoney = $store_finance_flow->getCurveData($where, $time, 'sum(number)');
break;
default:
throw new \Exception('getFinanceFlow:selectType参数错误');
@ -615,7 +615,7 @@ class TradeStatisticLogic extends BaseLogic
})->sum('pay_price');
break;
case "group":
$totalMoney = $storeOrder->getCurveData($where, $time, 'count(pay_price)', $group);
$totalMoney = $storeOrder->getCurveData($where, $time, 'sum(pay_price)', $group);
break;
default:
throw new \Exception('getOrderTotalMoney:selectType参数错误');
@ -654,7 +654,7 @@ class TradeStatisticLogic extends BaseLogic
->sum($rechargeSumField);
break;
case "group":
$totalMoney = $userRechage->getCurveData(['paid' => 1], $where, 'count(price)', $group);
$totalMoney = $userRechage->getCurveData(['paid' => 1], $where, 'sum(price)', $group);
break;
default:
$totalMoney = 0.00;
@ -749,7 +749,7 @@ class TradeStatisticLogic extends BaseLogic
})->sum($offlineSumField);
break;
case "group":
$totalMoney = $storeOrder->getCurveData(['pay_type' => 17], $where, 'count(pay_price)', $group);
$totalMoney = $storeOrder->getCurveData(['pay_type' => 17], $where, 'sum(pay_price)', $group);
break;
default:
throw new \Exception('getOfflineTotalMoney:selectType参数错误');