xielin 6 anni fa
parent
commit
9774349ffe
2 ha cambiato i file con 8 aggiunte e 7 eliminazioni
  1. 7 7
      app/Repositories/StatisticsRepository.php
  2. 1 0
      config/customer.tpl

+ 7 - 7
app/Repositories/StatisticsRepository.php

@@ -21,7 +21,7 @@ class StatisticsRepository
     public function getOrderPayInfo($start = '', $end = '', $shopId = '')
     {
         $params = [
-            "index" => "platform_order_statistics",
+            "index" => config('customer.order_statistics_index_name'),
             "type" => "_doc",
             "body" => [
                 "size" => 0,
@@ -89,7 +89,7 @@ class StatisticsRepository
     public function getDfhOrder($start = '', $end = '', $shopId = '')
     {
         $params = [
-            "index" => "platform_order_statistics",
+            "index" => config('customer.order_statistics_index_name'),
             "type" => "_doc",
             "body" => [
                 "size" => 0,
@@ -147,7 +147,7 @@ class StatisticsRepository
     public function getFinishOrder($start = '', $end = '', $shopId = '')
     {
         $params = [
-            "index" => "platform_order_statistics",
+            "index" => config('customer.order_statistics_index_name'),
             "type" => "_doc",
             "body" => [
                 "size" => 0,
@@ -209,7 +209,7 @@ class StatisticsRepository
     public function getOrderNum($start = '', $end = '', $shopId = '')
     {
         $params = [
-            "index" => "platform_order_statistics",
+            "index" => config('customer.order_statistics_index_name'),
             "type" => "_doc",
             "body" => [
                 "size" => 0,
@@ -260,7 +260,7 @@ class StatisticsRepository
     public function getRefundOrderNum($start = '', $end = '', $shopId = '')
     {
         $params = [
-            "index" => "platform_order_statistics",
+            "index" => config('customer.order_statistics_index_name'),
             "type" => "_doc",
             "body" => [
                 "size" => 0,
@@ -316,7 +316,7 @@ class StatisticsRepository
     public function getFeedBackOrderNum($start = '', $end = '', $shopId = '')
     {
         $params = [
-            "index" => "platform_order_statistics",
+            "index" => config('customer.order_statistics_index_name'),
             "type" => "_doc",
             "body" => [
                 "size" => 0,
@@ -372,7 +372,7 @@ class StatisticsRepository
     public function getSaleMoney($start = '', $end = '', $shopId = '')
     {
         $params = [
-            "index" => "platform_order_statistics",
+            "index" => config('customer.order_statistics_index_name'),
             "type" => "_doc",
             "body" => [
                 "size" => 0,

+ 1 - 0
config/customer.tpl

@@ -3,4 +3,5 @@
 return [
     'jwt_secret' => '{jwt_secret}',
     'manage_service_url' => '{manage_service_url}',
+    'order_statistics_index_name' => '{order_statistics_index_name}',
 ];