PC-202304251453\Administrator před 2 měsíci
rodič
revize
a5b0f68062
1 změnil soubory, kde provedl 4 přidání a 4 odebrání
  1. 4 4
      app/v1/logic/customer/SdkOrderLogic.php

+ 4 - 4
app/v1/logic/customer/SdkOrderLogic.php

@@ -18,7 +18,7 @@ class SdkOrderLogic extends BaseLogic
      */
      */
     public function __construct()
     public function __construct()
     {
     {
-        
+
     }
     }
 
 
     /**
     /**
@@ -33,7 +33,7 @@ class SdkOrderLogic extends BaseLogic
             throw new ApiException('请选择时间范围');
             throw new ApiException('请选择时间范围');
         }
         }
         // 获取年月
         // 获取年月
-        $monthRange = getMonthRange($params['pay_time'][0], $params['pay_time'][1]);
+        $yearRange = getYearRange($params['pay_time'][0], $params['pay_time'][1]);
 
 
         $eqWhere = ["game_id", "user_name", "order_id", "trade_id", "role_id", "role_name"];
         $eqWhere = ["game_id", "user_name", "order_id", "trade_id", "role_id", "role_name"];
         $where = [];
         $where = [];
@@ -56,8 +56,8 @@ class SdkOrderLogic extends BaseLogic
 
 
         $db = Db::connect('db_game_log');
         $db = Db::connect('db_game_log');
         $unionQuery = [];
         $unionQuery = [];
-        foreach ($monthRange as $month){
-            $tableName = 'sdk_order_' . $month;
+        foreach ($yearRange as $year){
+            $tableName = 'sdk_order_' . $year;
             $unionQuery[] = $db->table($tableName)->where($where)->buildSql();
             $unionQuery[] = $db->table($tableName)->where($where)->buildSql();
         }
         }
         $fullSql = "(" . implode(' UNION ALL ', $unionQuery) . ") as unTable";
         $fullSql = "(" . implode(' UNION ALL ', $unionQuery) . ") as unTable";