|
|
@@ -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";
|