diff --git a/app/admin/logic/statistic/TradeStatisticLogic.php b/app/admin/logic/statistic/TradeStatisticLogic.php index e9fc6a7b0..456a0d25d 100644 --- a/app/admin/logic/statistic/TradeStatisticLogic.php +++ b/app/admin/logic/statistic/TradeStatisticLogic.php @@ -754,12 +754,12 @@ class TradeStatisticLogic extends BaseLogic // } switch ($selectType) { case "sum": - $totalMoney = $storeOrder->where('pay_type', 17)->when(isset($where['timeKey']), function ($query) use ($where) { + $totalMoney = $storeOrder->where(['pay_type'=>17,'paid'=>1,'refund_status',0])->when(isset($where['timeKey']), function ($query) use ($where) { $query->whereBetweenTime('create_time', strtotime($where['timeKey']['start_time']), strtotime($where['timeKey']['end_time'])); })->sum($offlineSumField); break; case "group": - $totalMoney = $storeOrder->getCurveData(['pay_type' => 17], $where, 'sum(pay_price)', $group); + $totalMoney = $storeOrder->getCurveData(['pay_type'=>17,'paid'=>1,'refund_status',0], $where, 'sum(pay_price)', $group); break; default: throw new \Exception('getOfflineTotalMoney:selectType参数错误');