|
|
@@ -54,9 +54,10 @@ class RechargeController extends Controller
|
|
|
$type_list = DB::table(DB::raw('agent.dbo.admin_configs WITH (NOLOCK)'))->where('type', 'pay')
|
|
|
->pluck('name');
|
|
|
// $type_list[] = 'TestPay';
|
|
|
- $table = 'order as o';
|
|
|
+ // [order]:SQL Server 保留字 order,FROM 中必须加方括号
|
|
|
+ $table = 'agent.dbo.[order] as o';
|
|
|
if ($history) {
|
|
|
- $table = 'order_back as o';
|
|
|
+ $table = 'agent.dbo.[order_back] as o';
|
|
|
}
|
|
|
|
|
|
$build_sql = DB::connection('write')->table(DB::raw($table . ' WITH (NOLOCK)'))
|
|
|
@@ -512,7 +513,7 @@ class RechargeController extends Controller
|
|
|
downloadExcel($cellData, $title, '充值排行榜');
|
|
|
} else {
|
|
|
|
|
|
- $sql = DB::connection('write')->table(DB::raw('agent.dbo.order as o WITH (NOLOCK)'))
|
|
|
+ $sql = DB::connection('write')->table(DB::raw('agent.dbo.[order] as o WITH (NOLOCK)'))
|
|
|
->leftjoin(DB::raw('QPAccountsDB.dbo.AccountsInfo as a WITH (NOLOCK)'), 'o.user_id', '=', 'a.UserID')
|
|
|
->leftjoin(DB::raw('QPAccountsDB.dbo.AccountPhone as i WITH (NOLOCK)'), 'o.user_id', '=', 'i.UserID')
|
|
|
->leftjoin(DB::raw('QPAccountsDB.dbo.YN_VIPAccount as vip WITH (NOLOCK)'), 'o.user_id', '=', 'vip.UserID')
|
|
|
@@ -539,7 +540,7 @@ class RechargeController extends Controller
|
|
|
}
|
|
|
|
|
|
|
|
|
- $todayPay = DB::connection('write')->table(DB::raw('agent.dbo.order WITH (NOLOCK)'))
|
|
|
+ $todayPay = DB::connection('write')->table(DB::raw('agent.dbo.[order] WITH (NOLOCK)'))
|
|
|
->whereIn('user_id', $UserIDs)
|
|
|
->where('pay_at', '>=', $pay_at_start_time . ' 00:00:00')
|
|
|
->where('pay_at', '<=', $pay_at_end_time . ' 23:59:59')
|