|
@@ -94,7 +94,7 @@ class GlobalController extends Controller
|
|
|
$pay_sum = isset($order->pay_sum) ? number_float($order->pay_sum / NumConfig::NUM_VALUE) : 0;
|
|
$pay_sum = isset($order->pay_sum) ? number_float($order->pay_sum / NumConfig::NUM_VALUE) : 0;
|
|
|
|
|
|
|
|
// 签到总奖励
|
|
// 签到总奖励
|
|
|
- $totalSignIn = DB::connection('read')->table('QPAccountsDB.dbo.UserSignInInfo')
|
|
|
|
|
|
|
+ $totalSignIn = DB::connection('read')->table(DB::raw('QPAccountsDB.dbo.UserSignInInfo WITH (NOLOCK)'))
|
|
|
->selectRaw('IsNull(sum(TotalReward),0) TotalReward')
|
|
->selectRaw('IsNull(sum(TotalReward),0) TotalReward')
|
|
|
->first()->TotalReward / 100 ?? 0;
|
|
->first()->TotalReward / 100 ?? 0;
|
|
|
|
|
|
|
@@ -103,7 +103,7 @@ class GlobalController extends Controller
|
|
|
|
|
|
|
|
|
|
|
|
|
// 历史流水和税收
|
|
// 历史流水和税收
|
|
|
- $gameInfo = DB::connection('read')->table('QPRecordDB.dbo.RecordUserTotalStatistics')
|
|
|
|
|
|
|
+ $gameInfo = DB::connection('read')->table(DB::raw('QPRecordDB.dbo.RecordUserTotalStatistics WITH (NOLOCK)'))
|
|
|
->selectRaw('IsNull((abs(sum(LostScore)) + sum(WinScore)),0) flowing_water,Isnull(sum(Revenue),0) as Revenue,IsNull((sum(LostScore) + sum(WinScore)),0) Score,IsNull(sum(Withdraw),0) WithDraw,Isnull(SUM(Handsel),0) as ChangeScore')
|
|
->selectRaw('IsNull((abs(sum(LostScore)) + sum(WinScore)),0) flowing_water,Isnull(sum(Revenue),0) as Revenue,IsNull((sum(LostScore) + sum(WinScore)),0) Score,IsNull(sum(Withdraw),0) WithDraw,Isnull(SUM(Handsel),0) as ChangeScore')
|
|
|
->first();
|
|
->first();
|
|
|
|
|
|
|
@@ -111,7 +111,7 @@ class GlobalController extends Controller
|
|
|
$txAmount = $gameInfo->WithDraw / 100 ?? 0;
|
|
$txAmount = $gameInfo->WithDraw / 100 ?? 0;
|
|
|
|
|
|
|
|
// 累计提现回收金额
|
|
// 累计提现回收金额
|
|
|
- $WithDrawRecovery = DB::connection('read')->table('QPAccountsDB.dbo.OrderWithDraw as ow')
|
|
|
|
|
|
|
+ $WithDrawRecovery = DB::connection('read')->table(DB::raw('QPAccountsDB.dbo.OrderWithDraw as ow WITH (NOLOCK)'))
|
|
|
->where('State', 4)
|
|
->where('State', 4)
|
|
|
->selectRaw('sum(WithDraw+ServiceFee) as WithDraw')
|
|
->selectRaw('sum(WithDraw+ServiceFee) as WithDraw')
|
|
|
->first()->WithDraw ?? 0;
|
|
->first()->WithDraw ?? 0;
|
|
@@ -172,7 +172,7 @@ class GlobalController extends Controller
|
|
|
// 用户彩金
|
|
// 用户彩金
|
|
|
$ScoreType = [21, 33, 36, 37, 42, 44, 45, 49, 51, 52, 53, 59, 70];
|
|
$ScoreType = [21, 33, 36, 37, 42, 44, 45, 49, 51, 52, 53, 59, 70];
|
|
|
// 21、绑定手机赠送 33、注册赠送 36、推广赚金(彩金) 37、人工增加金币 42、邮件附件(充值彩金) 45、充值彩金 49、月卡彩金 51、首充礼包(彩金) 52、邮件附件(群发彩金) 53、推广赚金(佣金)
|
|
// 21、绑定手机赠送 33、注册赠送 36、推广赚金(彩金) 37、人工增加金币 42、邮件附件(充值彩金) 45、充值彩金 49、月卡彩金 51、首充礼包(彩金) 52、邮件附件(群发彩金) 53、推广赚金(佣金)
|
|
|
- $RecordUserScoreStatistics = DB::connection('read')->table('QPRecordDB.dbo.RecordUserScoreStatisticsNew')
|
|
|
|
|
|
|
+ $RecordUserScoreStatistics = DB::connection('read')->table(DB::raw('QPRecordDB.dbo.RecordUserScoreStatisticsNew WITH (NOLOCK)'))
|
|
|
->whereBetween('DateID', [date('Ymd', strtotime($start_time)), date('Ymd', strtotime($end_time))])
|
|
->whereBetween('DateID', [date('Ymd', strtotime($start_time)), date('Ymd', strtotime($end_time))])
|
|
|
->whereIn('ScoreType', $ScoreType)
|
|
->whereIn('ScoreType', $ScoreType)
|
|
|
->select('ScoreType')
|
|
->select('ScoreType')
|
|
@@ -195,7 +195,7 @@ class GlobalController extends Controller
|
|
|
|
|
|
|
|
|
|
|
|
|
// 签到
|
|
// 签到
|
|
|
- $signIn = DB::connection('read')->table('QPRecordDB.dbo.RecordSignIn')
|
|
|
|
|
|
|
+ $signIn = DB::connection('read')->table(DB::raw('QPRecordDB.dbo.RecordSignIn WITH (NOLOCK)'))
|
|
|
->where('SignInDate', '>=', date("Y-m-d 00:00:00", strtotime("$start_time")))
|
|
->where('SignInDate', '>=', date("Y-m-d 00:00:00", strtotime("$start_time")))
|
|
|
->where('SignInDate', '<=', date("Y-m-d 23:59:59", strtotime("$end_time")))
|
|
->where('SignInDate', '<=', date("Y-m-d 23:59:59", strtotime("$end_time")))
|
|
|
->selectRaw('IsNull(sum(RewardScore),0) RewardScore')
|
|
->selectRaw('IsNull(sum(RewardScore),0) RewardScore')
|
|
@@ -203,15 +203,15 @@ class GlobalController extends Controller
|
|
|
|
|
|
|
|
|
|
|
|
|
// 推广总奖励
|
|
// 推广总奖励
|
|
|
- $TotalReward = DB::connection('read')->table('QPAccountsDB.dbo.SystemAgentReward')->select('TotalReward')->first()->TotalReward;
|
|
|
|
|
|
|
+ $TotalReward = DB::connection('read')->table(DB::raw('QPAccountsDB.dbo.SystemAgentReward WITH (NOLOCK)'))->select('TotalReward')->first()->TotalReward;
|
|
|
|
|
|
|
|
|
|
|
|
|
$data['TotalReward'] = number_float($TotalReward / 100);
|
|
$data['TotalReward'] = number_float($TotalReward / 100);
|
|
|
|
|
|
|
|
|
|
|
|
|
// 非正式会员的彩金
|
|
// 非正式会员的彩金
|
|
|
- $notMemberProfit = DB::connection('read')->table('QPRecordDB.dbo.RecordUserScoreStatisticsNew as rs')
|
|
|
|
|
- ->join('QPAccountsDB.dbo.AccountsInfo as ai', 'ai.UserID', 'rs.UserID')
|
|
|
|
|
|
|
+ $notMemberProfit = DB::connection('read')->table(DB::raw('QPRecordDB.dbo.RecordUserScoreStatisticsNew as rs WITH (NOLOCK)'))
|
|
|
|
|
+ ->join(DB::raw('QPAccountsDB.dbo.AccountsInfo as ai WITH (NOLOCK)'), 'ai.UserID', 'rs.UserID')
|
|
|
->where('Channel', 100)
|
|
->where('Channel', 100)
|
|
|
->whereIn('ScoreType', $ScoreType)
|
|
->whereIn('ScoreType', $ScoreType)
|
|
|
->whereBetween('DateID', [date('Ymd', strtotime($start_time)), date('Ymd', strtotime($end_time))])
|
|
->whereBetween('DateID', [date('Ymd', strtotime($start_time)), date('Ymd', strtotime($end_time))])
|
|
@@ -219,8 +219,8 @@ class GlobalController extends Controller
|
|
|
->first()->Score;
|
|
->first()->Score;
|
|
|
|
|
|
|
|
// 正式会员彩金
|
|
// 正式会员彩金
|
|
|
- $MemberProfit = DB::connection('read')->table('QPRecordDB.dbo.RecordUserScoreStatisticsNew as rs')
|
|
|
|
|
- ->join('QPAccountsDB.dbo.AccountsInfo as ai', 'ai.UserID', 'rs.UserID')
|
|
|
|
|
|
|
+ $MemberProfit = DB::connection('read')->table(DB::raw('QPRecordDB.dbo.RecordUserScoreStatisticsNew as rs WITH (NOLOCK)'))
|
|
|
|
|
+ ->join(DB::raw('QPAccountsDB.dbo.AccountsInfo as ai WITH (NOLOCK)'), 'ai.UserID', 'rs.UserID')
|
|
|
->whereIn('ScoreType', $ScoreType)
|
|
->whereIn('ScoreType', $ScoreType)
|
|
|
->where('Channel', '<>', 100)
|
|
->where('Channel', '<>', 100)
|
|
|
->whereBetween('DateID', [date('Ymd', strtotime($start_time)), date('Ymd', strtotime($end_time))])
|
|
->whereBetween('DateID', [date('Ymd', strtotime($start_time)), date('Ymd', strtotime($end_time))])
|
|
@@ -232,8 +232,8 @@ class GlobalController extends Controller
|
|
|
|
|
|
|
|
// 非正式会员人数-- 进入TP试玩场人数
|
|
// 非正式会员人数-- 进入TP试玩场人数
|
|
|
|
|
|
|
|
- $notMemberNum = DB::connection('read')->table('QPTreasureDB.dbo.RecordUserInout as ri')
|
|
|
|
|
- ->join('QPPlatformDB.dbo.GameRoomInfo as gi', 'ri.ServerID', 'gi.ServerID')
|
|
|
|
|
|
|
+ $notMemberNum = DB::connection('read')->table(DB::raw('QPTreasureDB.dbo.RecordUserInout as ri WITH (NOLOCK)'))
|
|
|
|
|
+ ->join(DB::raw('QPPlatformDB.dbo.GameRoomInfo as gi WITH (NOLOCK)'), 'ri.ServerID', 'gi.ServerID')
|
|
|
->where('gi.ServerType', 2)
|
|
->where('gi.ServerType', 2)
|
|
|
->where('GameID', 1005)
|
|
->where('GameID', 1005)
|
|
|
->where('ri.EnterTime', '>=', date("Y-m-d 00:00:00", strtotime("$start_time")))
|
|
->where('ri.EnterTime', '>=', date("Y-m-d 00:00:00", strtotime("$start_time")))
|
|
@@ -242,8 +242,8 @@ class GlobalController extends Controller
|
|
|
->first()->count_u ?? 0;
|
|
->first()->count_u ?? 0;
|
|
|
|
|
|
|
|
// 谷歌渠道--付费人数--付费金额
|
|
// 谷歌渠道--付费人数--付费金额
|
|
|
- $google_pay = DB::connection('read')->table('agent.dbo.order as o')
|
|
|
|
|
- ->join('QPAccountsDB.dbo.AccountsInfo as ai', 'o.user_id', '=', 'ai.UserID')
|
|
|
|
|
|
|
+ $google_pay = DB::connection('read')->table(DB::raw('agent.dbo.order as o WITH (NOLOCK)'))
|
|
|
|
|
+ ->join(DB::raw('QPAccountsDB.dbo.AccountsInfo as ai WITH (NOLOCK)'), 'o.user_id', '=', 'ai.UserID')
|
|
|
->where('Channel', 100)
|
|
->where('Channel', 100)
|
|
|
->where('o.pay_at', '>=', "$start_time")
|
|
->where('o.pay_at', '>=', "$start_time")
|
|
|
->where('o.pay_at', '<=', "$end_time")
|
|
->where('o.pay_at', '<=', "$end_time")
|
|
@@ -254,7 +254,7 @@ class GlobalController extends Controller
|
|
|
/* 用户数据 */
|
|
/* 用户数据 */
|
|
|
|
|
|
|
|
//注册用户
|
|
//注册用户
|
|
|
- $data['today_register'] = DB::connection('read')->table('QPAccountsDB.dbo.AccountsInfo')
|
|
|
|
|
|
|
+ $data['today_register'] = DB::connection('read')->table(DB::raw('QPAccountsDB.dbo.AccountsInfo WITH (NOLOCK)'))
|
|
|
->selectRaw('count(*) as today_register')
|
|
->selectRaw('count(*) as today_register')
|
|
|
->where('IsAndroid', 0)
|
|
->where('IsAndroid', 0)
|
|
|
->where('RegisterDate', '>=', "$start_time")
|
|
->where('RegisterDate', '>=', "$start_time")
|
|
@@ -262,14 +262,14 @@ class GlobalController extends Controller
|
|
|
->first()->today_register;
|
|
->first()->today_register;
|
|
|
|
|
|
|
|
//充值人数
|
|
//充值人数
|
|
|
- $pay_count = DB::connection('read')->table('agent.dbo.order')
|
|
|
|
|
|
|
+ $pay_count = DB::connection('read')->table(DB::raw('agent.dbo.order WITH (NOLOCK)'))
|
|
|
->where('pay_at', '>=', "$start_time")
|
|
->where('pay_at', '>=', "$start_time")
|
|
|
->where('pay_at', '<=', "$end_time")
|
|
->where('pay_at', '<=', "$end_time")
|
|
|
->selectRaw('count(DISTINCT user_id) as today_pay_count,cast(sum(amount) as int) as today_pay_sum')
|
|
->selectRaw('count(DISTINCT user_id) as today_pay_count,cast(sum(amount) as int) as today_pay_sum')
|
|
|
->first();
|
|
->first();
|
|
|
|
|
|
|
|
// 提现人数
|
|
// 提现人数
|
|
|
- $cash = DB::connection('read')->table('QPAccountsDB.dbo.OrderWithDraw')
|
|
|
|
|
|
|
+ $cash = DB::connection('read')->table(DB::raw('QPAccountsDB.dbo.OrderWithDraw WITH (NOLOCK)'))
|
|
|
->where('finishDate', '>=', "$start_time")
|
|
->where('finishDate', '>=', "$start_time")
|
|
|
->where('finishDate', '<=', "$end_time")
|
|
->where('finishDate', '<=', "$end_time")
|
|
|
->selectRaw('count(DISTINCT UserID) as cash_count,cast(sum(WithDraw) as int) as cash_sum,count(RecordID) cash_bi')
|
|
->selectRaw('count(DISTINCT UserID) as cash_count,cast(sum(WithDraw) as int) as cash_sum,count(RecordID) cash_bi')
|
|
@@ -277,14 +277,14 @@ class GlobalController extends Controller
|
|
|
|
|
|
|
|
$data['today_pay_count'] = $pay_count->today_pay_count;
|
|
$data['today_pay_count'] = $pay_count->today_pay_count;
|
|
|
//活跃用户数
|
|
//活跃用户数
|
|
|
- $data['lively_num'] = DB::connection('read')->table('QPRecordDB.dbo.RecordUserLogin')->selectRaw('count(distinct(UserID)) as lively_num')
|
|
|
|
|
|
|
+ $data['lively_num'] = DB::connection('read')->table(DB::raw('QPRecordDB.dbo.RecordUserLogin WITH (NOLOCK)'))->selectRaw('count(distinct(UserID)) as lively_num')
|
|
|
->where('DateID', '>=', date('Ymd', strtotime($start_time)))
|
|
->where('DateID', '>=', date('Ymd', strtotime($start_time)))
|
|
|
->where('DateID', '<=', date('Ymd', strtotime($start_time)))
|
|
->where('DateID', '<=', date('Ymd', strtotime($start_time)))
|
|
|
->first()->lively_num;
|
|
->first()->lively_num;
|
|
|
|
|
|
|
|
|
|
|
|
|
//ios 安卓新增用户
|
|
//ios 安卓新增用户
|
|
|
- $player_list = DB::connection('read')->table('QPAccountsDB.dbo.AccountsInfo')
|
|
|
|
|
|
|
+ $player_list = DB::connection('read')->table(DB::raw('QPAccountsDB.dbo.AccountsInfo WITH (NOLOCK)'))
|
|
|
->where('IsAndroid', 0)
|
|
->where('IsAndroid', 0)
|
|
|
->whereIn('LastLogonMobile', ['Android', 'IOS'])
|
|
->whereIn('LastLogonMobile', ['Android', 'IOS'])
|
|
|
->where('RegisterDate', '>=', "$start_time")
|
|
->where('RegisterDate', '>=', "$start_time")
|
|
@@ -311,10 +311,10 @@ class GlobalController extends Controller
|
|
|
$data['cash_count'] = $cash->cash_count;
|
|
$data['cash_count'] = $cash->cash_count;
|
|
|
$data['cash_bi'] = $cash->cash_bi;
|
|
$data['cash_bi'] = $cash->cash_bi;
|
|
|
|
|
|
|
|
- $pay = DB::table(TableName::QPRecordDB() . 'RecordUserDataStatisticsNew as rsn')
|
|
|
|
|
|
|
+ $pay = DB::table(DB::raw(TableName::QPRecordDB() . 'RecordUserDataStatisticsNew as rsn WITH (NOLOCK)'))
|
|
|
->where('DateID', '>=', date('Ymd', strtotime($start_time)))
|
|
->where('DateID', '>=', date('Ymd', strtotime($start_time)))
|
|
|
->where('DateID', '<=', date('Ymd', strtotime($end_time)))
|
|
->where('DateID', '<=', date('Ymd', strtotime($end_time)))
|
|
|
- ->join('QPAccountsDB.dbo.AccountsInfo as ai', 'rsn.UserID', 'ai.UserID')
|
|
|
|
|
|
|
+ ->join(DB::raw('QPAccountsDB.dbo.AccountsInfo as ai WITH (NOLOCK)'), 'rsn.UserID', 'ai.UserID')
|
|
|
->where('LastLogonMobile', 'Android')
|
|
->where('LastLogonMobile', 'Android')
|
|
|
->selectRaw('count(rsn.UserID) count_u,sum(Recharge) amount')
|
|
->selectRaw('count(rsn.UserID) count_u,sum(Recharge) amount')
|
|
|
->first();
|
|
->first();
|
|
@@ -323,7 +323,7 @@ class GlobalController extends Controller
|
|
|
|
|
|
|
|
|
|
|
|
|
// 游客人数
|
|
// 游客人数
|
|
|
- $tourist = DB::connection('read')->table('QPAccountsDB.dbo.AccountsInfo')
|
|
|
|
|
|
|
+ $tourist = DB::connection('read')->table(DB::raw('QPAccountsDB.dbo.AccountsInfo WITH (NOLOCK)'))
|
|
|
->where('WebLogonTimes', 1)
|
|
->where('WebLogonTimes', 1)
|
|
|
->where('IsAndroid', 0)
|
|
->where('IsAndroid', 0)
|
|
|
->where('RegisterDate', '>=', $start_time)
|
|
->where('RegisterDate', '>=', $start_time)
|
|
@@ -331,13 +331,13 @@ class GlobalController extends Controller
|
|
|
->count();
|
|
->count();
|
|
|
|
|
|
|
|
// 手机账号人数-包括游客升级来的
|
|
// 手机账号人数-包括游客升级来的
|
|
|
- $phoneNum = DB::connection('read')->table('QPAccountsDB.dbo.AccountPhone')
|
|
|
|
|
|
|
+ $phoneNum = DB::connection('read')->table(DB::raw('QPAccountsDB.dbo.AccountPhone WITH (NOLOCK)'))
|
|
|
->where('BindDate', '>=', $start_time)
|
|
->where('BindDate', '>=', $start_time)
|
|
|
->where('BindDate', '<=', $end_time)
|
|
->where('BindDate', '<=', $end_time)
|
|
|
->count();
|
|
->count();
|
|
|
|
|
|
|
|
// Facebook 人数
|
|
// Facebook 人数
|
|
|
- $facebookNum = DB::connection('read')->table('QPAccountsDB.dbo.AccountsInfo')
|
|
|
|
|
|
|
+ $facebookNum = DB::connection('read')->table(DB::raw('QPAccountsDB.dbo.AccountsInfo WITH (NOLOCK)'))
|
|
|
->where('RegisterDate', '>=', $start_time)
|
|
->where('RegisterDate', '>=', $start_time)
|
|
|
->where('RegisterDate', '<=', $end_time)
|
|
->where('RegisterDate', '<=', $end_time)
|
|
|
->where('IsAndroid', 0)
|
|
->where('IsAndroid', 0)
|
|
@@ -374,7 +374,7 @@ class GlobalController extends Controller
|
|
|
$WeeklyCard = $logic->WeeklyCard();
|
|
$WeeklyCard = $logic->WeeklyCard();
|
|
|
|
|
|
|
|
/* 游戏房间数据 */
|
|
/* 游戏房间数据 */
|
|
|
- $gameRoomInfo = DB::connection('read')->table('QPRecordDB.dbo.RecordServerDataStatistics')
|
|
|
|
|
|
|
+ $gameRoomInfo = DB::connection('read')->table(DB::raw('QPRecordDB.dbo.RecordServerDataStatistics WITH (NOLOCK)'))
|
|
|
->where('DateID', '>=', date('Ymd', strtotime($start_time)))
|
|
->where('DateID', '>=', date('Ymd', strtotime($start_time)))
|
|
|
->where('DateID', '<=', date('Ymd', strtotime($start_time)))
|
|
->where('DateID', '<=', date('Ymd', strtotime($start_time)))
|
|
|
->selectRaw('Isnull((sum(WinScore) + abs(sum(LostScore))),0) as flowing_water,Isnull(sum(Revenue),0) as Revenue,Isnull((sum(WinScore) + sum(LostScore)),0) as win_lose')
|
|
->selectRaw('Isnull((sum(WinScore) + abs(sum(LostScore))),0) as flowing_water,Isnull(sum(Revenue),0) as Revenue,Isnull((sum(WinScore) + sum(LostScore)),0) as win_lose')
|
|
@@ -387,14 +387,14 @@ class GlobalController extends Controller
|
|
|
//税收
|
|
//税收
|
|
|
$gameRoomInfo->Revenue = isset($gameRoomInfo->Revenue) ? number_float($gameRoomInfo->Revenue / NumConfig::NUM_VALUE) : 0;
|
|
$gameRoomInfo->Revenue = isset($gameRoomInfo->Revenue) ? number_float($gameRoomInfo->Revenue / NumConfig::NUM_VALUE) : 0;
|
|
|
// 累计玩游戏人数
|
|
// 累计玩游戏人数
|
|
|
- $gameRoomInfo->GameCountUser = DB::connection('read')->table('QPRecordDB.dbo.PD_RecordScoreInfo')
|
|
|
|
|
|
|
+ $gameRoomInfo->GameCountUser = DB::connection('read')->table(DB::raw('QPRecordDB.dbo.PD_RecordScoreInfo WITH (NOLOCK)'))
|
|
|
->where('AtDate', '>=', date('Ymd', strtotime($start_time)))
|
|
->where('AtDate', '>=', date('Ymd', strtotime($start_time)))
|
|
|
->where('AtDate', '<=', date('Ymd', strtotime($end_time)))
|
|
->where('AtDate', '<=', date('Ymd', strtotime($end_time)))
|
|
|
->count(DB::raw('DISTINCT UserID'));
|
|
->count(DB::raw('DISTINCT UserID'));
|
|
|
|
|
|
|
|
|
|
|
|
|
- $game_list = DB::connection('read')->table('QPPlatformDB.dbo.GameRoomInfo as gi')
|
|
|
|
|
- ->leftJoin('QPRecordDB.dbo.RecordServerDataStatistics as rds', 'rds.ServerID', 'gi.ServerID')
|
|
|
|
|
|
|
+ $game_list = DB::connection('read')->table(DB::raw('QPPlatformDB.dbo.GameRoomInfo as gi WITH (NOLOCK)'))
|
|
|
|
|
+ ->leftJoin(DB::raw('QPRecordDB.dbo.RecordServerDataStatistics as rds WITH (NOLOCK)'), 'rds.ServerID', 'gi.ServerID')
|
|
|
->where('DateID', '>=', date('Ymd', strtotime($start_time)))
|
|
->where('DateID', '>=', date('Ymd', strtotime($start_time)))
|
|
|
->where('DateID', '<=', date('Ymd', strtotime($start_time)))
|
|
->where('DateID', '<=', date('Ymd', strtotime($start_time)))
|
|
|
->select('gi.GameID', 'gi.ServerName', 'gi.ServerID')
|
|
->select('gi.GameID', 'gi.ServerName', 'gi.ServerID')
|
|
@@ -403,7 +403,7 @@ class GlobalController extends Controller
|
|
|
->orderByDesc('flowing_water')
|
|
->orderByDesc('flowing_water')
|
|
|
->get();
|
|
->get();
|
|
|
// 玩过游戏的人
|
|
// 玩过游戏的人
|
|
|
- $playGameUser = DB::connection('write')->table(TableName::QPRecordDB() . 'RecordUserGameCount')
|
|
|
|
|
|
|
+ $playGameUser = DB::connection('write')->table(DB::raw(TableName::QPRecordDB() . 'RecordUserGameCount WITH (NOLOCK)'))
|
|
|
->where('AtDate', '>=', date('Ymd', strtotime($start_time)))
|
|
->where('AtDate', '>=', date('Ymd', strtotime($start_time)))
|
|
|
->where('AtDate', '<=', date('Ymd', strtotime($end_time)))
|
|
->where('AtDate', '<=', date('Ymd', strtotime($end_time)))
|
|
|
->selectRaw('count(distinct(UserID)) as count_u,ServerID')
|
|
->selectRaw('count(distinct(UserID)) as count_u,ServerID')
|
|
@@ -459,10 +459,10 @@ class GlobalController extends Controller
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
$field = ['LostUserCount', 'WinUserCount', 'gi.GameID', 'gi.Nullity', 'gi.SortID', 'gi.ServerName', 'gi.ServerID', 'gi.RoomStock', 'WinInning', 'LostInning', 'TotalInning', 'Revenue', 'LostScore', 'WinScore'];
|
|
$field = ['LostUserCount', 'WinUserCount', 'gi.GameID', 'gi.Nullity', 'gi.SortID', 'gi.ServerName', 'gi.ServerID', 'gi.RoomStock', 'WinInning', 'LostInning', 'TotalInning', 'Revenue', 'LostScore', 'WinScore'];
|
|
|
- $list = DB::connection('read')->table('QPPlatformDB.dbo.GameRoomInfo as gi')
|
|
|
|
|
|
|
+ $list = DB::connection('read')->table(DB::raw('QPPlatformDB.dbo.GameRoomInfo as gi WITH (NOLOCK)'))
|
|
|
->whereIn('GameID', config('games.openKGame'))
|
|
->whereIn('GameID', config('games.openKGame'))
|
|
|
- ->leftJoin('QPRecordDB.dbo.RecordServerDataStatistics as rds', 'gi.ServerID', '=', 'rds.ServerID')
|
|
|
|
|
- ->leftJoin('QPTreasureDB.dbo.GameScoreLocker as gl', function ($query) {
|
|
|
|
|
|
|
+ ->leftJoin(DB::raw('QPRecordDB.dbo.RecordServerDataStatistics as rds WITH (NOLOCK)'), 'gi.ServerID', '=', 'rds.ServerID')
|
|
|
|
|
+ ->leftJoin(DB::raw('QPTreasureDB.dbo.GameScoreLocker as gl WITH (NOLOCK)'), function ($query) {
|
|
|
$query->on('gl.ServerID', 'gi.ServerID')->selectRaw('gl.ServerID')->groupBy('ServerID')->whereRaw('datediff(hh,gl.CollectDate,getdate())<=5');
|
|
$query->on('gl.ServerID', 'gi.ServerID')->selectRaw('gl.ServerID')->groupBy('ServerID')->whereRaw('datediff(hh,gl.CollectDate,getdate())<=5');
|
|
|
})
|
|
})
|
|
|
->where('rds.DateID', date('Ymd'))
|
|
->where('rds.DateID', date('Ymd'))
|
|
@@ -480,7 +480,7 @@ class GlobalController extends Controller
|
|
|
// ->selectRaw('count(DISTINCT UserID) as game_count')
|
|
// ->selectRaw('count(DISTINCT UserID) as game_count')
|
|
|
// ->whereDate('CollectDate', date('Y-m-d'))
|
|
// ->whereDate('CollectDate', date('Y-m-d'))
|
|
|
// ->first()->game_count;
|
|
// ->first()->game_count;
|
|
|
- $line = DB::connection('read')->table('QPTreasureDB.dbo.GameScoreLocker')
|
|
|
|
|
|
|
+ $line = DB::connection('read')->table(DB::raw('QPTreasureDB.dbo.GameScoreLocker WITH (NOLOCK)'))
|
|
|
->selectRaw('count(DISTINCT UserID) as game_count')
|
|
->selectRaw('count(DISTINCT UserID) as game_count')
|
|
|
->whereRaw('datediff(hh,CollectDate,getdate())<=5')
|
|
->whereRaw('datediff(hh,CollectDate,getdate())<=5')
|
|
|
->first()->game_count;
|
|
->first()->game_count;
|
|
@@ -615,14 +615,14 @@ class GlobalController extends Controller
|
|
|
//用户列表
|
|
//用户列表
|
|
|
public function userlist1(Request $request)
|
|
public function userlist1(Request $request)
|
|
|
{
|
|
{
|
|
|
- $list = DB::connection('read')->table('QPAccountsDB.dbo.AccountsInfo as ai')
|
|
|
|
|
- ->leftJoin('QPAccountsDB.dbo.AccountsInfo as ai1', 'ai.SpreaderID', '=', 'ai1.UserID')
|
|
|
|
|
- ->leftJoin('QPTreasureDB.dbo.GameScoreInfo as gi', 'ai.UserID', '=', 'gi.UserID')
|
|
|
|
|
- ->leftJoin('QPTreasureDB.dbo.GameScoreLocker as gsl', 'gsl.UserID', '=', 'ai.UserID')
|
|
|
|
|
- ->leftJoin('QPPlatformDB.dbo.GameRoomInfo as gri', 'gsl.ServerID', '=', 'gri.ServerID')
|
|
|
|
|
- ->leftJoin('QPAccountsDB.dbo.AccountPhone as ap', 'ai.UserID', 'ap.UserID')
|
|
|
|
|
- ->leftJoin('QPAccountsDB.dbo.IDWhiteUser as iu', 'ai.UserID', 'iu.UserID')
|
|
|
|
|
- ->leftJoin('QPRecordDB.dbo.RecordPackageName as rn', 'ai.UserID', 'rn.UserID')
|
|
|
|
|
|
|
+ $list = DB::connection('read')->table(DB::raw('QPAccountsDB.dbo.AccountsInfo as ai WITH (NOLOCK)'))
|
|
|
|
|
+ ->leftJoin(DB::raw('QPAccountsDB.dbo.AccountsInfo as ai1 WITH (NOLOCK)'), 'ai.SpreaderID', '=', 'ai1.UserID')
|
|
|
|
|
+ ->leftJoin(DB::raw('QPTreasureDB.dbo.GameScoreInfo as gi WITH (NOLOCK)'), 'ai.UserID', '=', 'gi.UserID')
|
|
|
|
|
+ ->leftJoin(DB::raw('QPTreasureDB.dbo.GameScoreLocker as gsl WITH (NOLOCK)'), 'gsl.UserID', '=', 'ai.UserID')
|
|
|
|
|
+ ->leftJoin(DB::raw('QPPlatformDB.dbo.GameRoomInfo as gri WITH (NOLOCK)'), 'gsl.ServerID', '=', 'gri.ServerID')
|
|
|
|
|
+ ->leftJoin(DB::raw('QPAccountsDB.dbo.AccountPhone as ap WITH (NOLOCK)'), 'ai.UserID', 'ap.UserID')
|
|
|
|
|
+ ->leftJoin(DB::raw('QPAccountsDB.dbo.IDWhiteUser as iu WITH (NOLOCK)'), 'ai.UserID', 'iu.UserID')
|
|
|
|
|
+ ->leftJoin(DB::raw('QPRecordDB.dbo.RecordPackageName as rn WITH (NOLOCK)'), 'ai.UserID', 'rn.UserID')
|
|
|
->where('ai.IsAndroid', 0);
|
|
->where('ai.IsAndroid', 0);
|
|
|
|
|
|
|
|
$UserID = (int)$request->UserID ?: "";
|
|
$UserID = (int)$request->UserID ?: "";
|
|
@@ -758,7 +758,7 @@ class GlobalController extends Controller
|
|
|
|
|
|
|
|
// 游戏中用户
|
|
// 游戏中用户
|
|
|
|
|
|
|
|
- $query_UserID = DB::connection('read')->table('QPAccountsDB.dbo.IDWhiteUser')->whereIn('UserID', $userID)->pluck('UserID')->toArray();
|
|
|
|
|
|
|
+ $query_UserID = DB::connection('read')->table(DB::raw('QPAccountsDB.dbo.IDWhiteUser WITH (NOLOCK)'))->whereIn('UserID', $userID)->pluck('UserID')->toArray();
|
|
|
|
|
|
|
|
// 禁止查看敏感信息
|
|
// 禁止查看敏感信息
|
|
|
$helper = new Helper();
|
|
$helper = new Helper();
|
|
@@ -799,7 +799,7 @@ class GlobalController extends Controller
|
|
|
|
|
|
|
|
$WebLogonTimes = [1 => 'facebook', 2 => '游客', 3 => '手机号'];
|
|
$WebLogonTimes = [1 => 'facebook', 2 => '游客', 3 => '手机号'];
|
|
|
|
|
|
|
|
- $channels = DB::connection('read')->table('QPAccountsDB.dbo.AccountsInfo')->where('IsAndroid', 0)->groupBy('Channel')->pluck('Channel');
|
|
|
|
|
|
|
+ $channels = DB::connection('read')->table(DB::raw('QPAccountsDB.dbo.AccountsInfo WITH (NOLOCK)'))->where('IsAndroid', 0)->groupBy('Channel')->pluck('Channel');
|
|
|
return view('admin.global.userlist', [
|
|
return view('admin.global.userlist', [
|
|
|
'list' => $list,
|
|
'list' => $list,
|
|
|
'UserID' => $UserID,
|
|
'UserID' => $UserID,
|
|
@@ -830,12 +830,12 @@ class GlobalController extends Controller
|
|
|
{
|
|
{
|
|
|
if ($request->isMethod('get')) {
|
|
if ($request->isMethod('get')) {
|
|
|
$userID = $request->id;
|
|
$userID = $request->id;
|
|
|
- $list = DB::connection('read')->table('QPAccountsDB.dbo.AccountsInfo as ai')
|
|
|
|
|
- ->leftJoin('QPAccountsDB.dbo.AccountsInfo as ain', 'ai.SpreaderID', '=', 'ain.UserID')
|
|
|
|
|
|
|
+ $list = DB::connection('read')->table(DB::raw('QPAccountsDB.dbo.AccountsInfo as ai WITH (NOLOCK)'))
|
|
|
|
|
+ ->leftJoin(DB::raw('QPAccountsDB.dbo.AccountsInfo as ain WITH (NOLOCK)'), 'ai.SpreaderID', '=', 'ain.UserID')
|
|
|
->where('ai.UserID', $userID)
|
|
->where('ai.UserID', $userID)
|
|
|
->selectRaw('ai.UserID,ai.NickName,ai.Nullity,ai.Compellation,ai.SpreaderID,ai.GameID as ai_GameID,IsNull(ain.GameID,0) as GameID')
|
|
->selectRaw('ai.UserID,ai.NickName,ai.Nullity,ai.Compellation,ai.SpreaderID,ai.GameID as ai_GameID,IsNull(ain.GameID,0) as GameID')
|
|
|
->first();
|
|
->first();
|
|
|
- $IDWhiteUser = DB::connection('read')->table('QPAccountsDB.dbo.IDWhiteUser')->where('UserID', $userID)->first();
|
|
|
|
|
|
|
+ $IDWhiteUser = DB::connection('read')->table(DB::raw('QPAccountsDB.dbo.IDWhiteUser WITH (NOLOCK)'))->where('UserID', $userID)->first();
|
|
|
return view('admin.global.user_update', ['list' => $list, 'IDWhiteUser' => $IDWhiteUser]);
|
|
return view('admin.global.user_update', ['list' => $list, 'IDWhiteUser' => $IDWhiteUser]);
|
|
|
|
|
|
|
|
} elseif ($request->isMethod('post')) {
|
|
} elseif ($request->isMethod('post')) {
|
|
@@ -846,13 +846,13 @@ class GlobalController extends Controller
|
|
|
|
|
|
|
|
$official = $request->post('official');
|
|
$official = $request->post('official');
|
|
|
|
|
|
|
|
- $query = $IDWhiteUser = DB::connection('read')->table('QPAccountsDB.dbo.IDWhiteUser')->where('UserID', $UserID)->first();
|
|
|
|
|
|
|
+ $query = $IDWhiteUser = DB::connection('read')->table(DB::raw('QPAccountsDB.dbo.IDWhiteUser WITH (NOLOCK)'))->where('UserID', $UserID)->first();
|
|
|
|
|
|
|
|
|
|
|
|
|
$arr = [];
|
|
$arr = [];
|
|
|
|
|
|
|
|
if (!empty(trim($SpreaderID))) {
|
|
if (!empty(trim($SpreaderID))) {
|
|
|
- $account = DB::connection('read')->table('QPAccountsDB.dbo.AccountsInfo')->where('GameID', $SpreaderID)->selectRaw('UserID')->first();
|
|
|
|
|
|
|
+ $account = DB::connection('read')->table(DB::raw('QPAccountsDB.dbo.AccountsInfo WITH (NOLOCK)'))->where('GameID', $SpreaderID)->selectRaw('UserID')->first();
|
|
|
|
|
|
|
|
$arr['SpreaderID'] = $account->UserID;
|
|
$arr['SpreaderID'] = $account->UserID;
|
|
|
}
|
|
}
|
|
@@ -889,7 +889,7 @@ class GlobalController extends Controller
|
|
|
DB::table('QPAccountsDB.dbo.AccountsInfo')->whereIn('UserID', $id)->update(['Nullity' => 1]);
|
|
DB::table('QPAccountsDB.dbo.AccountsInfo')->whereIn('UserID', $id)->update(['Nullity' => 1]);
|
|
|
|
|
|
|
|
// 查询用户gameId
|
|
// 查询用户gameId
|
|
|
- $gameID = DB::connection('read')->table('QPAccountsDB.dbo.AccountsInfo')->whereIn('UserID', $id)->select('GameID')->get();
|
|
|
|
|
|
|
+ $gameID = DB::connection('read')->table(DB::raw('QPAccountsDB.dbo.AccountsInfo WITH (NOLOCK)'))->whereIn('UserID', $id)->select('GameID')->get();
|
|
|
$data = [];
|
|
$data = [];
|
|
|
|
|
|
|
|
|
|
|
|
@@ -958,7 +958,7 @@ class GlobalController extends Controller
|
|
|
|
|
|
|
|
if ($id == 1) {
|
|
if ($id == 1) {
|
|
|
$ip = $request->RegisterIP;
|
|
$ip = $request->RegisterIP;
|
|
|
- $list = DB::connection('read')->table('QPAccountsDB.dbo.AccountsInfo')
|
|
|
|
|
|
|
+ $list = DB::connection('read')->table(DB::raw('QPAccountsDB.dbo.AccountsInfo WITH (NOLOCK)'))
|
|
|
->where('RegisterIP', $ip)
|
|
->where('RegisterIP', $ip)
|
|
|
->where('IsAndroid', 0)
|
|
->where('IsAndroid', 0)
|
|
|
->selectRaw('RegisterDate,LastLogonDate,GameID,Compellation,Channel,NickName,UserID')
|
|
->selectRaw('RegisterDate,LastLogonDate,GameID,Compellation,Channel,NickName,UserID')
|
|
@@ -983,7 +983,7 @@ class GlobalController extends Controller
|
|
|
} elseif ($id == 2) {
|
|
} elseif ($id == 2) {
|
|
|
$userid = $request->UserID;
|
|
$userid = $request->UserID;
|
|
|
|
|
|
|
|
- $mac = DB::connection('read')->table('QPRecordDB.dbo.RecordUserLogonStatistics')
|
|
|
|
|
|
|
+ $mac = DB::connection('read')->table(DB::raw('QPRecordDB.dbo.RecordUserLogonStatistics WITH (NOLOCK)'))
|
|
|
->where('UserID', $userid)
|
|
->where('UserID', $userid)
|
|
|
->where('mac', '<>','')
|
|
->where('mac', '<>','')
|
|
|
->pluck('mac')->toArray();
|
|
->pluck('mac')->toArray();
|
|
@@ -992,12 +992,12 @@ class GlobalController extends Controller
|
|
|
|
|
|
|
|
$list=[];
|
|
$list=[];
|
|
|
if($mac) {
|
|
if($mac) {
|
|
|
- $userids= DB::connection('read')->table('QPRecordDB.dbo.RecordUserLogonStatistics')
|
|
|
|
|
|
|
+ $userids= DB::connection('read')->table(DB::raw('QPRecordDB.dbo.RecordUserLogonStatistics WITH (NOLOCK)'))
|
|
|
->whereIn('mac', $mac)
|
|
->whereIn('mac', $mac)
|
|
|
->pluck('UserID')
|
|
->pluck('UserID')
|
|
|
->toArray();
|
|
->toArray();
|
|
|
$userids=array_unique($userids);
|
|
$userids=array_unique($userids);
|
|
|
- $list = DB::connection('read')->table('QPAccountsDB.dbo.AccountsInfo')
|
|
|
|
|
|
|
+ $list = DB::connection('read')->table(DB::raw('QPAccountsDB.dbo.AccountsInfo WITH (NOLOCK)'))
|
|
|
->whereIn('UserID', $userids)
|
|
->whereIn('UserID', $userids)
|
|
|
->selectRaw('RegisterDate,LastLogonDate,GameID,Compellation,Channel,NickName,UserID')
|
|
->selectRaw('RegisterDate,LastLogonDate,GameID,Compellation,Channel,NickName,UserID')
|
|
|
->paginate(100);
|
|
->paginate(100);
|
|
@@ -1006,7 +1006,7 @@ class GlobalController extends Controller
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach ($list as &$value) {
|
|
foreach ($list as &$value) {
|
|
|
- $value->login_count = DB::table('QPRecordDB.dbo.RecordUserLogin')->where('UserID', $value->UserID)->count();
|
|
|
|
|
|
|
+ $value->login_count = DB::table(DB::raw('QPRecordDB.dbo.RecordUserLogin WITH (NOLOCK)'))->where('UserID', $value->UserID)->count();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 获取总充值和总提现
|
|
// 获取总充值和总提现
|
|
@@ -1028,8 +1028,8 @@ class GlobalController extends Controller
|
|
|
} elseif ($id == 3) {
|
|
} elseif ($id == 3) {
|
|
|
|
|
|
|
|
$BankNo = $request->Phone;
|
|
$BankNo = $request->Phone;
|
|
|
- $list = DB::connection('read')->table('QPAccountsDB.dbo.AccountPhone as di')
|
|
|
|
|
- ->join('QPAccountsDB.dbo.AccountsInfo as ai', 'di.UserID', 'ai.UserID')
|
|
|
|
|
|
|
+ $list = DB::connection('read')->table(DB::raw('QPAccountsDB.dbo.AccountPhone as di WITH (NOLOCK)'))
|
|
|
|
|
+ ->join(DB::raw('QPAccountsDB.dbo.AccountsInfo as ai WITH (NOLOCK)'), 'di.UserID', 'ai.UserID')
|
|
|
->where('di.PhoneNum', $BankNo)
|
|
->where('di.PhoneNum', $BankNo)
|
|
|
->selectRaw('RegisterDate,LastLogonDate,ai.GameID,Compellation,ai.Channel,ai.NickName,ai.UserID')
|
|
->selectRaw('RegisterDate,LastLogonDate,ai.GameID,Compellation,ai.Channel,ai.NickName,ai.UserID')
|
|
|
->paginate(10);
|
|
->paginate(10);
|
|
@@ -1052,8 +1052,8 @@ class GlobalController extends Controller
|
|
|
return view('admin.global.join_bankNo', ['list' => $list, 'id' => $id, 'BankNo' => $BankNo]);
|
|
return view('admin.global.join_bankNo', ['list' => $list, 'id' => $id, 'BankNo' => $BankNo]);
|
|
|
} elseif ($id == 4) {
|
|
} elseif ($id == 4) {
|
|
|
$BankNo = $request->BankUserName;
|
|
$BankNo = $request->BankUserName;
|
|
|
- $list = DB::connection('read')->table('QPAccountsDB.dbo.AccountWithDrawInfo as di')
|
|
|
|
|
- ->join('QPAccountsDB.dbo.AccountsInfo as ai', 'di.UserID', 'ai.UserID')
|
|
|
|
|
|
|
+ $list = DB::connection('read')->table(DB::raw('QPAccountsDB.dbo.AccountWithDrawInfo as di WITH (NOLOCK)'))
|
|
|
|
|
+ ->join(DB::raw('QPAccountsDB.dbo.AccountsInfo as ai WITH (NOLOCK)'), 'di.UserID', 'ai.UserID')
|
|
|
->where('di.BankUserName', $BankNo)
|
|
->where('di.BankUserName', $BankNo)
|
|
|
->selectRaw('RegisterDate,LastLogonDate,ai.GameID,Compellation,Channel,ai.NickName,ai.UserID')
|
|
->selectRaw('RegisterDate,LastLogonDate,ai.GameID,Compellation,Channel,ai.NickName,ai.UserID')
|
|
|
->paginate(10);
|
|
->paginate(10);
|
|
@@ -1076,8 +1076,8 @@ class GlobalController extends Controller
|
|
|
return view('admin.global.join_bankNo', ['list' => $list, 'id' => $id, 'BankNo' => $BankNo]);
|
|
return view('admin.global.join_bankNo', ['list' => $list, 'id' => $id, 'BankNo' => $BankNo]);
|
|
|
} elseif ($id == 5) {
|
|
} elseif ($id == 5) {
|
|
|
$BankNo = $request->EmailAddress;
|
|
$BankNo = $request->EmailAddress;
|
|
|
- $list = DB::connection('read')->table('QPAccountsDB.dbo.AccountWithDrawInfo as di')
|
|
|
|
|
- ->join('QPAccountsDB.dbo.AccountsInfo as ai', 'di.UserID', 'ai.UserID')
|
|
|
|
|
|
|
+ $list = DB::connection('read')->table(DB::raw('QPAccountsDB.dbo.AccountWithDrawInfo as di WITH (NOLOCK)'))
|
|
|
|
|
+ ->join(DB::raw('QPAccountsDB.dbo.AccountsInfo as ai WITH (NOLOCK)'), 'di.UserID', 'ai.UserID')
|
|
|
->where('di.EmailAddress', $BankNo)
|
|
->where('di.EmailAddress', $BankNo)
|
|
|
->selectRaw('RegisterDate,LastLogonDate,ai.GameID,Compellation,Channel,ai.NickName,ai.UserID')
|
|
->selectRaw('RegisterDate,LastLogonDate,ai.GameID,Compellation,Channel,ai.NickName,ai.UserID')
|
|
|
->paginate(100);
|
|
->paginate(100);
|
|
@@ -1102,8 +1102,8 @@ class GlobalController extends Controller
|
|
|
|
|
|
|
|
$UserID = $request->UserID;
|
|
$UserID = $request->UserID;
|
|
|
|
|
|
|
|
- $UserIDs = DB::connection('read')->table('QPRecordDB.dbo.RecordUserLogonStatistics as rs')
|
|
|
|
|
- ->join('QPRecordDB.dbo.RecordUserLogonStatistics as rs1', function ($join) {
|
|
|
|
|
|
|
+ $UserIDs = DB::connection('read')->table(DB::raw('QPRecordDB.dbo.RecordUserLogonStatistics as rs WITH (NOLOCK)'))
|
|
|
|
|
+ ->join(DB::raw('QPRecordDB.dbo.RecordUserLogonStatistics as rs1 WITH (NOLOCK)'), function ($join) {
|
|
|
$join->on('rs.LogonIP', 'rs1.LogonIP');
|
|
$join->on('rs.LogonIP', 'rs1.LogonIP');
|
|
|
})
|
|
})
|
|
|
->where('rs.UserID', $UserID)
|
|
->where('rs.UserID', $UserID)
|
|
@@ -1112,7 +1112,7 @@ class GlobalController extends Controller
|
|
|
->limit(2000)
|
|
->limit(2000)
|
|
|
->pluck('rs1.UserID');
|
|
->pluck('rs1.UserID');
|
|
|
|
|
|
|
|
- $list = DB::connection('read')->table('QPAccountsDB.dbo.AccountsInfo as ai')
|
|
|
|
|
|
|
+ $list = DB::connection('read')->table(DB::raw('QPAccountsDB.dbo.AccountsInfo as ai WITH (NOLOCK)'))
|
|
|
->whereIn('ai.UserID', $UserIDs)
|
|
->whereIn('ai.UserID', $UserIDs)
|
|
|
->where('IsAndroid', 0)
|
|
->where('IsAndroid', 0)
|
|
|
->selectRaw('RegisterDate,LastLogonDate,GameID,Compellation,Channel,NickName,ai.UserID')
|
|
->selectRaw('RegisterDate,LastLogonDate,GameID,Compellation,Channel,NickName,ai.UserID')
|
|
@@ -1137,8 +1137,8 @@ class GlobalController extends Controller
|
|
|
} elseif ($id == 7) { // 登录IP记录
|
|
} elseif ($id == 7) { // 登录IP记录
|
|
|
$UserID = $request->UserID;
|
|
$UserID = $request->UserID;
|
|
|
|
|
|
|
|
- $list = DB::connection('read')->table('QPRecordDB.dbo.RecordUserLogonStatistics as rls')
|
|
|
|
|
- ->join('QPAccountsDB.dbo.AccountsInfo as ai', 'rls.UserID', 'ai.UserID')
|
|
|
|
|
|
|
+ $list = DB::connection('read')->table(DB::raw('QPRecordDB.dbo.RecordUserLogonStatistics as rls WITH (NOLOCK)'))
|
|
|
|
|
+ ->join(DB::raw('QPAccountsDB.dbo.AccountsInfo as ai WITH (NOLOCK)'), 'rls.UserID', 'ai.UserID')
|
|
|
->where('rls.UserID', $UserID)
|
|
->where('rls.UserID', $UserID)
|
|
|
->where('IsAndroid', 0)
|
|
->where('IsAndroid', 0)
|
|
|
->select('rls.UserID','LastLogonDate', 'LogonIP', 'LastDate', 'ai.GameID', 'NickName', 'Channel')
|
|
->select('rls.UserID','LastLogonDate', 'LogonIP', 'LastDate', 'ai.GameID', 'NickName', 'Channel')
|
|
@@ -1149,7 +1149,7 @@ class GlobalController extends Controller
|
|
|
} elseif ($id == 8) { // 关联cpf
|
|
} elseif ($id == 8) { // 关联cpf
|
|
|
$UserID = $request->UserID;
|
|
$UserID = $request->UserID;
|
|
|
$cpf=Cpf::getCpf($UserID,1);
|
|
$cpf=Cpf::getCpf($UserID,1);
|
|
|
- $list = DB::connection('read')->table('QPAccountsDB.dbo.AccountsInfo as ai')
|
|
|
|
|
|
|
+ $list = DB::connection('read')->table(DB::raw('QPAccountsDB.dbo.AccountsInfo as ai WITH (NOLOCK)'))
|
|
|
->whereIn('ai.UserID', Cpf::getCpf($UserID))
|
|
->whereIn('ai.UserID', Cpf::getCpf($UserID))
|
|
|
->where('IsAndroid', 0)
|
|
->where('IsAndroid', 0)
|
|
|
->selectRaw('RegisterDate,LastLogonDate,GameID,Compellation,Channel,NickName,ai.UserID')
|
|
->selectRaw('RegisterDate,LastLogonDate,GameID,Compellation,Channel,NickName,ai.UserID')
|
|
@@ -1211,8 +1211,8 @@ class GlobalController extends Controller
|
|
|
$end_time = str_replace('T', ' ', $end_time);
|
|
$end_time = str_replace('T', ' ', $end_time);
|
|
|
|
|
|
|
|
$list = (new GlobalUser())->dk_userlist($GameID, $SpreaderID, $NickName, $start_time, $end_time, $user_label, $is_line, $game_room, $UserScoreControl, $ScoreSort, $amountSort, $sort_tx, $sort_date, $ChangeScoreSort, $Channel, $label_sort, $ServerNameSort);
|
|
$list = (new GlobalUser())->dk_userlist($GameID, $SpreaderID, $NickName, $start_time, $end_time, $user_label, $is_line, $game_room, $UserScoreControl, $ScoreSort, $amountSort, $sort_tx, $sort_date, $ChangeScoreSort, $Channel, $label_sort, $ServerNameSort);
|
|
|
- $game_room_line = DB::connection('read')->table(TableName::QPPlatformDB() . 'GameRoomInfo')->select('ServerName', 'ServerID')->get();
|
|
|
|
|
- $allChannel = DB::connection('read')->table(TableName::QPPlatformDB() . 'ChannelPackageName')->pluck('Channel');
|
|
|
|
|
|
|
+ $game_room_line = DB::connection('read')->table(DB::raw(TableName::QPPlatformDB() . 'GameRoomInfo WITH (NOLOCK)'))->select('ServerName', 'ServerID')->get();
|
|
|
|
|
+ $allChannel = DB::connection('read')->table(DB::raw(TableName::QPPlatformDB() . 'ChannelPackageName WITH (NOLOCK)'))->pluck('Channel');
|
|
|
$page = Paginator::resolveCurrentPage('page');
|
|
$page = Paginator::resolveCurrentPage('page');
|
|
|
|
|
|
|
|
$start_time = \App\Http\helper\Helper::timeChange($start_time);
|
|
$start_time = \App\Http\helper\Helper::timeChange($start_time);
|
|
@@ -1245,7 +1245,7 @@ class GlobalController extends Controller
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
$admin_id = session('admin')->id;
|
|
$admin_id = session('admin')->id;
|
|
|
- $admin_user = DB::connection('read')->table('agent.dbo.admin_users')->where('id', $admin_id)->first();
|
|
|
|
|
|
|
+ $admin_user = DB::connection('read')->table(DB::raw('agent.dbo.admin_users WITH (NOLOCK)'))->where('id', $admin_id)->first();
|
|
|
/*管理员彩金控制*/
|
|
/*管理员彩金控制*/
|
|
|
if ($ControlScore > 0) {
|
|
if ($ControlScore > 0) {
|
|
|
if ($admin_user->recharge_amount < $ControlScore) return apiReturnFail('管理员彩金额度不足!');
|
|
if ($admin_user->recharge_amount < $ControlScore) return apiReturnFail('管理员彩金额度不足!');
|
|
@@ -1255,7 +1255,7 @@ class GlobalController extends Controller
|
|
|
// 记录单控操作(只记金额和总体概率)
|
|
// 记录单控操作(只记金额和总体概率)
|
|
|
$prefix = $ControlScore < 0 ? '输' : '赢';
|
|
$prefix = $ControlScore < 0 ? '输' : '赢';
|
|
|
$content = $prefix . $ControlScore . '/ 概率:' . number_float($Probability) . '%';
|
|
$content = $prefix . $ControlScore . '/ 概率:' . number_float($Probability) . '%';
|
|
|
- $score = DB::connection('read')->table('QPTreasureDB.dbo.GameScoreInfo')->where('UserID', $UserID)->select('Score')->first()->Score ?? 0;
|
|
|
|
|
|
|
+ $score = DB::connection('read')->table(DB::raw('QPTreasureDB.dbo.GameScoreInfo WITH (NOLOCK)'))->where('UserID', $UserID)->select('Score')->first()->Score ?? 0;
|
|
|
ControlRecord::record_add($UserID, $admin_id, $content, $score);
|
|
ControlRecord::record_add($UserID, $admin_id, $content, $score);
|
|
|
|
|
|
|
|
$data = [
|
|
$data = [
|
|
@@ -1306,7 +1306,7 @@ class GlobalController extends Controller
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($res) {
|
|
if ($res) {
|
|
|
- $score = DB::connection('read')->table('QPTreasureDB.dbo.GameScoreInfo')->where('UserID', $UserID)->select('Score')->first()->Score ?? 0;
|
|
|
|
|
|
|
+ $score = DB::connection('read')->table(DB::raw('QPTreasureDB.dbo.GameScoreInfo WITH (NOLOCK)'))->where('UserID', $UserID)->select('Score')->first()->Score ?? 0;
|
|
|
ControlRecord::record_add($UserID, $admin_id, '取消单控', $score);
|
|
ControlRecord::record_add($UserID, $admin_id, '取消单控', $score);
|
|
|
|
|
|
|
|
// 埋点,执行存储过程
|
|
// 埋点,执行存储过程
|
|
@@ -1385,7 +1385,7 @@ class GlobalController extends Controller
|
|
|
case 1:
|
|
case 1:
|
|
|
$OrderIDs = explode(',', $orderIds);
|
|
$OrderIDs = explode(',', $orderIds);
|
|
|
|
|
|
|
|
- $list = DB::connection('write')->table('agent.dbo.extension_user_profit_log')
|
|
|
|
|
|
|
+ $list = DB::connection('write')->table(DB::raw('agent.dbo.extension_user_profit_log WITH (NOLOCK)'))
|
|
|
->whereIn('OrderID', $OrderIDs)
|
|
->whereIn('OrderID', $OrderIDs)
|
|
|
->where('OrderID', '>', 0)
|
|
->where('OrderID', '>', 0)
|
|
|
->where('Type', $Type)
|
|
->where('Type', $Type)
|
|
@@ -1401,9 +1401,9 @@ class GlobalController extends Controller
|
|
|
case 2:
|
|
case 2:
|
|
|
break;
|
|
break;
|
|
|
case 3:
|
|
case 3:
|
|
|
- $list = DB::connection('read')->table('QPRecordDB.dbo.RecordUserAgent as ua')
|
|
|
|
|
- ->join('QPAccountsDB.dbo.accountsInfo as ai', 'ua.UserID', 'ai.UserID')
|
|
|
|
|
- ->leftJoin('QPAccountsDB.dbo.accountsInfo as ain', 'ain.UserID', '=', 'ua.SourceUserID')
|
|
|
|
|
|
|
+ $list = DB::connection('read')->table(DB::raw('QPRecordDB.dbo.RecordUserAgent as ua WITH (NOLOCK)'))
|
|
|
|
|
+ ->join(DB::raw('QPAccountsDB.dbo.accountsInfo as ai WITH (NOLOCK)'), 'ua.UserID', 'ai.UserID')
|
|
|
|
|
+ ->leftJoin(DB::raw('QPAccountsDB.dbo.accountsInfo as ain WITH (NOLOCK)'), 'ain.UserID', '=', 'ua.SourceUserID')
|
|
|
->select('ai.GameID', 'ain.GameID as SourceUserID', 'DirectRebate', 'SendTime', 'OrderSn', 'ain.UserID', 'ua.Level')
|
|
->select('ai.GameID', 'ain.GameID as SourceUserID', 'DirectRebate', 'SendTime', 'OrderSn', 'ain.UserID', 'ua.Level')
|
|
|
->where('ua.Id', $Id)
|
|
->where('ua.Id', $Id)
|
|
|
->orderBy('SendTime', 'desc')
|
|
->orderBy('SendTime', 'desc')
|
|
@@ -1449,13 +1449,13 @@ class GlobalController extends Controller
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
$list = cache()->remember('match_information_' . $RoomCode, 10, function () use ($RoomCode) {
|
|
$list = cache()->remember('match_information_' . $RoomCode, 10, function () use ($RoomCode) {
|
|
|
- return DB::connection('game')->table(TableName::QPRecordDB() . 'RecordUniqueScoreCode')
|
|
|
|
|
|
|
+ return DB::connection('game')->table(DB::raw(TableName::QPRecordDB() . 'RecordUniqueScoreCode WITH (NOLOCK)'))
|
|
|
->where('uniquescorecode', $RoomCode)
|
|
->where('uniquescorecode', $RoomCode)
|
|
|
->get();
|
|
->get();
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
if (count($list) < 1 || empty($list)) {
|
|
if (count($list) < 1 || empty($list)) {
|
|
|
- $info = DB::connection('game')->table(TableName::QPRecordDB() . 'RecordGamePlayNew')
|
|
|
|
|
|
|
+ $info = DB::connection('game')->table(DB::raw(TableName::QPRecordDB() . 'RecordGamePlayNew WITH (NOLOCK)'))
|
|
|
->where('RoomCode', $RoomCode)
|
|
->where('RoomCode', $RoomCode)
|
|
|
->value('RecordJson');
|
|
->value('RecordJson');
|
|
|
|
|
|
|
@@ -1478,7 +1478,7 @@ class GlobalController extends Controller
|
|
|
foreach ($list as $value) {
|
|
foreach ($list as $value) {
|
|
|
$uniquecode = $value->uniquecode;
|
|
$uniquecode = $value->uniquecode;
|
|
|
$info = cache()->remember('match_information_info_' . $uniquecode, 10, function () use ($uniquecode) {
|
|
$info = cache()->remember('match_information_info_' . $uniquecode, 10, function () use ($uniquecode) {
|
|
|
- return DB::connection('game')->table(TableName::QPRecordDB() . 'RecordGamePlayNew')
|
|
|
|
|
|
|
+ return DB::connection('game')->table(DB::raw(TableName::QPRecordDB() . 'RecordGamePlayNew WITH (NOLOCK)'))
|
|
|
->where('RoomCode', $uniquecode)
|
|
->where('RoomCode', $uniquecode)
|
|
|
->value('RecordJson');
|
|
->value('RecordJson');
|
|
|
});
|
|
});
|
|
@@ -1576,9 +1576,9 @@ class GlobalController extends Controller
|
|
|
$link = 'http://' . $request->getHttpHost() . '/admin/global/online_user?index=';
|
|
$link = 'http://' . $request->getHttpHost() . '/admin/global/online_user?index=';
|
|
|
$service = new Paging($pageNum, $total, $index, ($total / $pageNum), $link);
|
|
$service = new Paging($pageNum, $total, $index, ($total / $pageNum), $link);
|
|
|
|
|
|
|
|
- $list = DB::connection('read')->table('QPAccountsDB.dbo.AccountsInfo as ai')
|
|
|
|
|
- ->leftJoin('QPTreasureDB.dbo.GameScoreLocker as lck', 'ai.UserID', 'lck.UserID')
|
|
|
|
|
- ->leftJoin('QPPlatformDB.dbo.GameRoomInfo as gi', 'lck.ServerID', '=', 'gi.ServerID')
|
|
|
|
|
|
|
+ $list = DB::connection('read')->table(DB::raw('QPAccountsDB.dbo.AccountsInfo as ai WITH (NOLOCK)'))
|
|
|
|
|
+ ->leftJoin(DB::raw('QPTreasureDB.dbo.GameScoreLocker as lck WITH (NOLOCK)'), 'ai.UserID', 'lck.UserID')
|
|
|
|
|
+ ->leftJoin(DB::raw('QPPlatformDB.dbo.GameRoomInfo as gi WITH (NOLOCK)'), 'lck.ServerID', '=', 'gi.ServerID')
|
|
|
->whereIn('ai.UserID', $onLineUser['UserIDs'])
|
|
->whereIn('ai.UserID', $onLineUser['UserIDs'])
|
|
|
->select('ai.GameID', 'NickName', 'ai.UserID', 'gi.ServerName')->get();
|
|
->select('ai.GameID', 'NickName', 'ai.UserID', 'gi.ServerName')->get();
|
|
|
$page = $service->subPageCss2();
|
|
$page = $service->subPageCss2();
|
|
@@ -1593,9 +1593,9 @@ class GlobalController extends Controller
|
|
|
// 无感维护开关
|
|
// 无感维护开关
|
|
|
public function GameRoomSwitch_view()
|
|
public function GameRoomSwitch_view()
|
|
|
{
|
|
{
|
|
|
- $list = DB::connection('read')->table('QPPlatformDB.dbo.GameRoomInfo as gi')
|
|
|
|
|
|
|
+ $list = DB::connection('read')->table(DB::raw('QPPlatformDB.dbo.GameRoomInfo as gi WITH (NOLOCK)'))
|
|
|
//->leftJoin('QPRecordDB.dbo.RecordGameInfo as ri', 'gi.ServerID', '=', 'ri.ServerID')
|
|
//->leftJoin('QPRecordDB.dbo.RecordGameInfo as ri', 'gi.ServerID', '=', 'ri.ServerID')
|
|
|
- ->leftJoin('QPTreasureDB.dbo.GameScoreLocker as gl', function ($query) {
|
|
|
|
|
|
|
+ ->leftJoin(DB::raw('QPTreasureDB.dbo.GameScoreLocker as gl WITH (NOLOCK)'), function ($query) {
|
|
|
$query->on('gl.ServerID', 'gi.ServerID')->selectRaw('gl.ServerID')->groupBy('ServerID')->whereDate('CollectDate', date('Y-m-d'));
|
|
$query->on('gl.ServerID', 'gi.ServerID')->selectRaw('gl.ServerID')->groupBy('ServerID')->whereDate('CollectDate', date('Y-m-d'));
|
|
|
})
|
|
})
|
|
|
->whereIn('gi.GameID', [1005, 2030, 2050])
|
|
->whereIn('gi.GameID', [1005, 2030, 2050])
|
|
@@ -1682,9 +1682,9 @@ class GlobalController extends Controller
|
|
|
CreateLog::SystemStatusInfo_log($admin_id, 'AgentCommisionState');
|
|
CreateLog::SystemStatusInfo_log($admin_id, 'AgentCommisionState');
|
|
|
return apiReturnSuc();
|
|
return apiReturnSuc();
|
|
|
} else {
|
|
} else {
|
|
|
- $list = DB::connection('write')->table('QPAccountsDB.dbo.SystemStatusInfo as si')
|
|
|
|
|
- ->leftJoin('agent.dbo.SystemStatusInfo_log as log', 'si.StatusName', 'log.StatusName')
|
|
|
|
|
- ->leftJoin('agent.dbo.admin_users as au', 'log.admin_id', '=', 'au.id')
|
|
|
|
|
|
|
+ $list = DB::connection('write')->table(DB::raw('QPAccountsDB.dbo.SystemStatusInfo as si WITH (NOLOCK)'))
|
|
|
|
|
+ ->leftJoin(DB::raw('agent.dbo.SystemStatusInfo_log as log WITH (NOLOCK)'), 'si.StatusName', 'log.StatusName')
|
|
|
|
|
+ ->leftJoin(DB::raw('agent.dbo.admin_users as au WITH (NOLOCK)'), 'log.admin_id', '=', 'au.id')
|
|
|
->select('StatusString', 'StatusValue', 'account', 'create_at')
|
|
->select('StatusString', 'StatusValue', 'account', 'create_at')
|
|
|
->where('si.StatusName', 'AndroidCheck')
|
|
->where('si.StatusName', 'AndroidCheck')
|
|
|
->get();
|
|
->get();
|
|
@@ -1733,7 +1733,7 @@ class GlobalController extends Controller
|
|
|
|
|
|
|
|
return apiReturnSuc();
|
|
return apiReturnSuc();
|
|
|
} else {
|
|
} else {
|
|
|
- $type = DB::connection('read')->table('QPAccountsDB.dbo.AccountLabelDanControlLabel')->where('UserID', $id)->value('type');
|
|
|
|
|
|
|
+ $type = DB::connection('read')->table(DB::raw('QPAccountsDB.dbo.AccountLabelDanControlLabel WITH (NOLOCK)'))->where('UserID', $id)->value('type');
|
|
|
$label = [
|
|
$label = [
|
|
|
20 => '其他1',
|
|
20 => '其他1',
|
|
|
21 => '其他2'
|
|
21 => '其他2'
|
|
@@ -1761,9 +1761,9 @@ class GlobalController extends Controller
|
|
|
CreateLog::SystemStatusInfo_log($admin_id, 'AgentCommisionState');
|
|
CreateLog::SystemStatusInfo_log($admin_id, 'AgentCommisionState');
|
|
|
return apiReturnSuc();
|
|
return apiReturnSuc();
|
|
|
} else {
|
|
} else {
|
|
|
- $list = DB::connection('write')->table('QPAccountsDB.dbo.SystemStatusInfo as si')
|
|
|
|
|
- ->leftJoin('agent.dbo.SystemStatusInfo_log as log', 'si.StatusName', 'log.StatusName')
|
|
|
|
|
- ->leftJoin('agent.dbo.admin_users as au', 'log.admin_id', '=', 'au.id')
|
|
|
|
|
|
|
+ $list = DB::connection('write')->table(DB::raw('QPAccountsDB.dbo.SystemStatusInfo as si WITH (NOLOCK)'))
|
|
|
|
|
+ ->leftJoin(DB::raw('agent.dbo.SystemStatusInfo_log as log WITH (NOLOCK)'), 'si.StatusName', 'log.StatusName')
|
|
|
|
|
+ ->leftJoin(DB::raw('agent.dbo.admin_users as au WITH (NOLOCK)'), 'log.admin_id', '=', 'au.id')
|
|
|
->select('StatusString', 'StatusValue', 'account', 'create_at')
|
|
->select('StatusString', 'StatusValue', 'account', 'create_at')
|
|
|
->where('si.StatusName', 'AgentCommisionState')
|
|
->where('si.StatusName', 'AgentCommisionState')
|
|
|
->get();
|
|
->get();
|
|
@@ -1793,9 +1793,9 @@ class GlobalController extends Controller
|
|
|
$now_time = '2021-11-17 14:25:00';
|
|
$now_time = '2021-11-17 14:25:00';
|
|
|
|
|
|
|
|
// 普通玩家 -- 控制分数
|
|
// 普通玩家 -- 控制分数
|
|
|
- $ptAccounts = DB::connection('read')->table('QPAccountsDB.dbo.AccountsInfo as ai')
|
|
|
|
|
- ->leftJoin('QPAccountsDB.dbo.IDWhiteUser as iu', 'ai.UserID', 'iu.UserID')
|
|
|
|
|
- ->join('QPRecordDB.dbo.RecordUserScoreControl as rc', 'ai.UserID', 'rc.UserID')
|
|
|
|
|
|
|
+ $ptAccounts = DB::connection('read')->table(DB::raw('QPAccountsDB.dbo.AccountsInfo as ai WITH (NOLOCK)'))
|
|
|
|
|
+ ->leftJoin(DB::raw('QPAccountsDB.dbo.IDWhiteUser as iu WITH (NOLOCK)'), 'ai.UserID', 'iu.UserID')
|
|
|
|
|
+ ->join(DB::raw('QPRecordDB.dbo.RecordUserScoreControl as rc WITH (NOLOCK)'), 'ai.UserID', 'rc.UserID')
|
|
|
->whereNull('iu.UserID')
|
|
->whereNull('iu.UserID')
|
|
|
->where('ControlDate', '>', $now_time)
|
|
->where('ControlDate', '>', $now_time)
|
|
|
->where('ControlState', 0)
|
|
->where('ControlState', 0)
|
|
@@ -1803,9 +1803,9 @@ class GlobalController extends Controller
|
|
|
->first()->ControlScore ?? 0;
|
|
->first()->ControlScore ?? 0;
|
|
|
|
|
|
|
|
// 普通玩家 -- 控制赢分数
|
|
// 普通玩家 -- 控制赢分数
|
|
|
- $ptWinAccounts = DB::connection('read')->table('QPAccountsDB.dbo.AccountsInfo as ai')
|
|
|
|
|
- ->leftJoin('QPAccountsDB.dbo.IDWhiteUser as iu', 'ai.UserID', 'iu.UserID')
|
|
|
|
|
- ->join('QPRecordDB.dbo.RecordUserScoreControl as rc', 'ai.UserID', 'rc.UserID')
|
|
|
|
|
|
|
+ $ptWinAccounts = DB::connection('read')->table(DB::raw('QPAccountsDB.dbo.AccountsInfo as ai WITH (NOLOCK)'))
|
|
|
|
|
+ ->leftJoin(DB::raw('QPAccountsDB.dbo.IDWhiteUser as iu WITH (NOLOCK)'), 'ai.UserID', 'iu.UserID')
|
|
|
|
|
+ ->join(DB::raw('QPRecordDB.dbo.RecordUserScoreControl as rc WITH (NOLOCK)'), 'ai.UserID', 'rc.UserID')
|
|
|
->whereNull('iu.UserID')
|
|
->whereNull('iu.UserID')
|
|
|
->where('ControlDate', '>', $now_time)
|
|
->where('ControlDate', '>', $now_time)
|
|
|
->where('ControlState', 0)
|
|
->where('ControlState', 0)
|
|
@@ -1815,9 +1815,9 @@ class GlobalController extends Controller
|
|
|
|
|
|
|
|
|
|
|
|
|
// 普通玩家 -- 控制输分数
|
|
// 普通玩家 -- 控制输分数
|
|
|
- $ptLoseAccounts = DB::connection('read')->table('QPAccountsDB.dbo.AccountsInfo as ai')
|
|
|
|
|
- ->leftJoin('QPAccountsDB.dbo.IDWhiteUser as iu', 'ai.UserID', 'iu.UserID')
|
|
|
|
|
- ->join('QPRecordDB.dbo.RecordUserScoreControl as rc', 'ai.UserID', 'rc.UserID')
|
|
|
|
|
|
|
+ $ptLoseAccounts = DB::connection('read')->table(DB::raw('QPAccountsDB.dbo.AccountsInfo as ai WITH (NOLOCK)'))
|
|
|
|
|
+ ->leftJoin(DB::raw('QPAccountsDB.dbo.IDWhiteUser as iu WITH (NOLOCK)'), 'ai.UserID', 'iu.UserID')
|
|
|
|
|
+ ->join(DB::raw('QPRecordDB.dbo.RecordUserScoreControl as rc WITH (NOLOCK)'), 'ai.UserID', 'rc.UserID')
|
|
|
->whereNull('iu.UserID')
|
|
->whereNull('iu.UserID')
|
|
|
->where('ControlDate', '>', $now_time)
|
|
->where('ControlDate', '>', $now_time)
|
|
|
->where('ControlState', 0)
|
|
->where('ControlState', 0)
|
|
@@ -1831,18 +1831,18 @@ class GlobalController extends Controller
|
|
|
// +-------------------------------------
|
|
// +-------------------------------------
|
|
|
|
|
|
|
|
// 官方玩家 -- 控制分数
|
|
// 官方玩家 -- 控制分数
|
|
|
- $gfAccounts = DB::connection('read')->table('QPAccountsDB.dbo.AccountsInfo as ai')
|
|
|
|
|
- ->join('QPAccountsDB.dbo.IDWhiteUser as iu', 'ai.UserID', 'iu.UserID')
|
|
|
|
|
- ->join('QPRecordDB.dbo.RecordUserScoreControl as rc', 'ai.UserID', 'rc.UserID')
|
|
|
|
|
|
|
+ $gfAccounts = DB::connection('read')->table(DB::raw('QPAccountsDB.dbo.AccountsInfo as ai WITH (NOLOCK)'))
|
|
|
|
|
+ ->join(DB::raw('QPAccountsDB.dbo.IDWhiteUser as iu WITH (NOLOCK)'), 'ai.UserID', 'iu.UserID')
|
|
|
|
|
+ ->join(DB::raw('QPRecordDB.dbo.RecordUserScoreControl as rc WITH (NOLOCK)'), 'ai.UserID', 'rc.UserID')
|
|
|
->where('ControlState', 0)
|
|
->where('ControlState', 0)
|
|
|
->where('ControlDate', '>', $now_time)
|
|
->where('ControlDate', '>', $now_time)
|
|
|
->selectRaw('sum(abs(ControlScore)) / 100 ControlScore')
|
|
->selectRaw('sum(abs(ControlScore)) / 100 ControlScore')
|
|
|
->first()->ControlScore ?? 0;
|
|
->first()->ControlScore ?? 0;
|
|
|
|
|
|
|
|
// 官方玩家 -- 控制赢分数
|
|
// 官方玩家 -- 控制赢分数
|
|
|
- $gfWinAccounts = DB::connection('read')->table('QPAccountsDB.dbo.AccountsInfo as ai')
|
|
|
|
|
- ->join('QPAccountsDB.dbo.IDWhiteUser as iu', 'ai.UserID', 'iu.UserID')
|
|
|
|
|
- ->join('QPRecordDB.dbo.RecordUserScoreControl as rc', 'ai.UserID', 'rc.UserID')
|
|
|
|
|
|
|
+ $gfWinAccounts = DB::connection('read')->table(DB::raw('QPAccountsDB.dbo.AccountsInfo as ai WITH (NOLOCK)'))
|
|
|
|
|
+ ->join(DB::raw('QPAccountsDB.dbo.IDWhiteUser as iu WITH (NOLOCK)'), 'ai.UserID', 'iu.UserID')
|
|
|
|
|
+ ->join(DB::raw('QPRecordDB.dbo.RecordUserScoreControl as rc WITH (NOLOCK)'), 'ai.UserID', 'rc.UserID')
|
|
|
->where('ControlState', 0)
|
|
->where('ControlState', 0)
|
|
|
->where('ControlDate', '>', $now_time)
|
|
->where('ControlDate', '>', $now_time)
|
|
|
->where('ControlScore', '>', 0)
|
|
->where('ControlScore', '>', 0)
|
|
@@ -1850,9 +1850,9 @@ class GlobalController extends Controller
|
|
|
->first();
|
|
->first();
|
|
|
|
|
|
|
|
// 官方玩家 -- 控制输分数
|
|
// 官方玩家 -- 控制输分数
|
|
|
- $gfLoseAccounts = DB::connection('read')->table('QPAccountsDB.dbo.AccountsInfo as ai')
|
|
|
|
|
- ->join('QPAccountsDB.dbo.IDWhiteUser as iu', 'ai.UserID', 'iu.UserID')
|
|
|
|
|
- ->join('QPRecordDB.dbo.RecordUserScoreControl as rc', 'ai.UserID', 'rc.UserID')
|
|
|
|
|
|
|
+ $gfLoseAccounts = DB::connection('read')->table(DB::raw('QPAccountsDB.dbo.AccountsInfo as ai WITH (NOLOCK)'))
|
|
|
|
|
+ ->join(DB::raw('QPAccountsDB.dbo.IDWhiteUser as iu WITH (NOLOCK)'), 'ai.UserID', 'iu.UserID')
|
|
|
|
|
+ ->join(DB::raw('QPRecordDB.dbo.RecordUserScoreControl as rc WITH (NOLOCK)'), 'ai.UserID', 'rc.UserID')
|
|
|
->where('ControlState', 0)
|
|
->where('ControlState', 0)
|
|
|
->where('ControlDate', '>', $now_time)
|
|
->where('ControlDate', '>', $now_time)
|
|
|
->where('ControlScore', '<', 0)
|
|
->where('ControlScore', '<', 0)
|
|
@@ -1879,8 +1879,8 @@ class GlobalController extends Controller
|
|
|
if (!empty($start_time)) $where[] = ['CreateTime', '>=', $start_time];
|
|
if (!empty($start_time)) $where[] = ['CreateTime', '>=', $start_time];
|
|
|
if (!empty($end_time)) $where[] = ['CreateTime', '<=', $end_time];
|
|
if (!empty($end_time)) $where[] = ['CreateTime', '<=', $end_time];
|
|
|
|
|
|
|
|
- $list = DB::table(TableName::agent() . 'UserHeadAuditoria as ua')
|
|
|
|
|
- ->join(TableName::QPAccountsDB() . 'AccountsInfo as ai', 'ua.UserID', 'ai.UserID')
|
|
|
|
|
|
|
+ $list = DB::table(DB::raw(TableName::agent() . 'UserHeadAuditoria as ua WITH (NOLOCK)'))
|
|
|
|
|
+ ->join(DB::raw(TableName::QPAccountsDB() . 'AccountsInfo as ai WITH (NOLOCK)'), 'ua.UserID', 'ai.UserID')
|
|
|
->select('Image', 'GameID', 'ua.UserID', 'ua.CreateTime')
|
|
->select('Image', 'GameID', 'ua.UserID', 'ua.CreateTime')
|
|
|
->where($where)->paginate(10);
|
|
->where($where)->paginate(10);
|
|
|
|
|
|