PC-202304251453\Administrator 2 tháng trước cách đây
mục cha
commit
a5b0f68062
1 tập tin đã thay đổi với 4 bổ sung4 xóa
  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()
     {
-        
+
     }
 
     /**
@@ -33,7 +33,7 @@ class SdkOrderLogic extends BaseLogic
             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"];
         $where = [];
@@ -56,8 +56,8 @@ class SdkOrderLogic extends BaseLogic
 
         $db = Db::connect('db_game_log');
         $unionQuery = [];
-        foreach ($monthRange as $month){
-            $tableName = 'sdk_order_' . $month;
+        foreach ($yearRange as $year){
+            $tableName = 'sdk_order_' . $year;
             $unionQuery[] = $db->table($tableName)->where($where)->buildSql();
         }
         $fullSql = "(" . implode(' UNION ALL ', $unionQuery) . ") as unTable";