|
|
|
@ -38,7 +38,7 @@ class OrderStatisticsService implements OrderStatisticsServiceInterface |
|
|
|
->selectRaw('COUNT(DISTINCT '.$mainTable.'.id) AS count') |
|
|
|
->join($childTable, ''.$childTable.'.order_main_id', '=', ''.$mainTable.'.global_order_id') |
|
|
|
->where([''.$childTable.'.store_id' => $storeId, ''.$mainTable.'.type' => $type]) |
|
|
|
->whereIn(''.$mainTable.'.state', array_merge(OrderState::FINISH, [OrderState::REFUNDED,OrderState::REFUND_REFUSE])); |
|
|
|
->whereIn(''.$mainTable.'.state', array_merge(OrderState::FINISH, [OrderState::REFUNDED_DIRECT,OrderState::REFUND_REFUSE])); |
|
|
|
|
|
|
|
if ($type == OrderType::ONLINE) { |
|
|
|
$builder = $builder->join($goodsTable, ''.$goodsTable.'.order_id', '=', ''.$childTable.'.id') |
|
|
|
|