2
0
Tree vor 1 Monat
Ursprung
Commit
b78eb3f568

+ 12 - 9
app/Console/Commands/ExemptReview.php

@@ -135,15 +135,18 @@ class ExemptReview extends Command
 //            $config = DB::table(TableName::agent().'withdrawal_position_config')->where('status', 1)->first();
             if (true) {
 
-                if($value->PixType == 2){
-                    $agent = 101;
-                }else{
-                    if(($value->WithDraw/NumConfig::NUM_VALUE)<20){
-                        $agent = 99;
-                    }else{
-                        $agent = 101;
-                    }
-                }
+//                if($value->PixType == 2){
+//                    $agent = 101;
+//                }else{
+//                    if(($value->WithDraw/NumConfig::NUM_VALUE)<20){
+//                        $agent = 99;
+//                    }else{
+//                        rand(1,100)>50?$agent = 99:$agent = 101;
+////                        $agent = 101;
+//                    }
+//                }
+
+                $agent = 99;
 
                 $redis = Redis::connection();
                 $order_sn = $value->OrderId;

+ 108 - 0
app/Http/Controllers/Admin/GlobalController.php

@@ -918,6 +918,21 @@ class GlobalController extends Controller
                 ->selectRaw('RegisterDate,LastLogonDate,GameID,Compellation,Channel,NickName,UserID')
                 ->paginate(100);
 
+            // 获取总充值和总提现
+            $userIds = $list->pluck('UserID')->toArray();
+            if (!empty($userIds)) {
+                $accountsInfo = new AccountsInfo();
+                $statistics = $accountsInfo->accountTotalStatistics($userIds);
+                $statisticsMap = [];
+                foreach ($statistics as $stat) {
+                    $statisticsMap[$stat->UserID] = $stat;
+                }
+                foreach ($list as &$item) {
+                    $item->Recharge = isset($statisticsMap[$item->UserID]) ? $statisticsMap[$item->UserID]->Recharge : 0;
+                    $item->Withdraw = isset($statisticsMap[$item->UserID]) ? $statisticsMap[$item->UserID]->Withdraw : 0;
+                }
+            }
+
             return view('admin.global.join_ip', ['list' => $list, 'id' => $id, 'ip' => $ip]);
         } elseif ($id == 2) {
             $userid = $request->UserID;
@@ -947,6 +962,22 @@ class GlobalController extends Controller
             foreach ($list as &$value) {
                 $value->login_count = DB::table('QPRecordDB.dbo.RecordUserLogin')->where('UserID', $value->UserID)->count();
             }
+
+            // 获取总充值和总提现
+            if (!empty($list)) {
+                $userIds = $list->pluck('UserID')->toArray();
+                $accountsInfo = new AccountsInfo();
+                $statistics = $accountsInfo->accountTotalStatistics($userIds);
+                $statisticsMap = [];
+                foreach ($statistics as $stat) {
+                    $statisticsMap[$stat->UserID] = $stat;
+                }
+                foreach ($list as &$item) {
+                    $item->Recharge = isset($statisticsMap[$item->UserID]) ? $statisticsMap[$item->UserID]->Recharge : 0;
+                    $item->Withdraw = isset($statisticsMap[$item->UserID]) ? $statisticsMap[$item->UserID]->Withdraw : 0;
+                }
+            }
+
             return view('admin.global.join_facility', ['list' => $list, 'mac' => implode(",",$mac), 'id' => $id]);
         } elseif ($id == 3) {
 
@@ -956,6 +987,22 @@ class GlobalController extends Controller
                 ->where('di.PhoneNum', $BankNo)
                 ->selectRaw('RegisterDate,LastLogonDate,ai.GameID,Compellation,ai.Channel,ai.NickName,ai.UserID')
                 ->paginate(10);
+
+            // 获取总充值和总提现
+            $userIds = $list->pluck('UserID')->toArray();
+            if (!empty($userIds)) {
+                $accountsInfo = new AccountsInfo();
+                $statistics = $accountsInfo->accountTotalStatistics($userIds);
+                $statisticsMap = [];
+                foreach ($statistics as $stat) {
+                    $statisticsMap[$stat->UserID] = $stat;
+                }
+                foreach ($list as &$item) {
+                    $item->Recharge = isset($statisticsMap[$item->UserID]) ? $statisticsMap[$item->UserID]->Recharge : 0;
+                    $item->Withdraw = isset($statisticsMap[$item->UserID]) ? $statisticsMap[$item->UserID]->Withdraw : 0;
+                }
+            }
+
             return view('admin.global.join_bankNo', ['list' => $list, 'id' => $id, 'BankNo' => $BankNo]);
         } elseif ($id == 4) {
             $BankNo = $request->BankUserName;
@@ -964,6 +1011,22 @@ class GlobalController extends Controller
                 ->where('di.BankUserName', $BankNo)
                 ->selectRaw('RegisterDate,LastLogonDate,ai.GameID,Compellation,Channel,ai.NickName,ai.UserID')
                 ->paginate(10);
+
+            // 获取总充值和总提现
+            $userIds = $list->pluck('UserID')->toArray();
+            if (!empty($userIds)) {
+                $accountsInfo = new AccountsInfo();
+                $statistics = $accountsInfo->accountTotalStatistics($userIds);
+                $statisticsMap = [];
+                foreach ($statistics as $stat) {
+                    $statisticsMap[$stat->UserID] = $stat;
+                }
+                foreach ($list as &$item) {
+                    $item->Recharge = isset($statisticsMap[$item->UserID]) ? $statisticsMap[$item->UserID]->Recharge : 0;
+                    $item->Withdraw = isset($statisticsMap[$item->UserID]) ? $statisticsMap[$item->UserID]->Withdraw : 0;
+                }
+            }
+
             return view('admin.global.join_bankNo', ['list' => $list, 'id' => $id, 'BankNo' => $BankNo]);
         } elseif ($id == 5) {
             $BankNo = $request->EmailAddress;
@@ -972,6 +1035,22 @@ class GlobalController extends Controller
                 ->where('di.EmailAddress', $BankNo)
                 ->selectRaw('RegisterDate,LastLogonDate,ai.GameID,Compellation,Channel,ai.NickName,ai.UserID')
                 ->paginate(100);
+
+            // 获取总充值和总提现
+            $userIds = $list->pluck('UserID')->toArray();
+            if (!empty($userIds)) {
+                $accountsInfo = new AccountsInfo();
+                $statistics = $accountsInfo->accountTotalStatistics($userIds);
+                $statisticsMap = [];
+                foreach ($statistics as $stat) {
+                    $statisticsMap[$stat->UserID] = $stat;
+                }
+                foreach ($list as &$item) {
+                    $item->Recharge = isset($statisticsMap[$item->UserID]) ? $statisticsMap[$item->UserID]->Recharge : 0;
+                    $item->Withdraw = isset($statisticsMap[$item->UserID]) ? $statisticsMap[$item->UserID]->Withdraw : 0;
+                }
+            }
+
             return view('admin.global.join_bankNo', ['list' => $list, 'id' => $id, 'BankNo' => $BankNo]);
         } elseif ($id == 6) {   // 关联IP
 
@@ -993,6 +1072,20 @@ class GlobalController extends Controller
                 ->selectRaw('RegisterDate,LastLogonDate,GameID,Compellation,Channel,NickName,ai.UserID')
                 ->paginate(1000);
 
+            // 获取总充值和总提现
+            $userIds = $list->pluck('UserID')->toArray();
+            if (!empty($userIds)) {
+                $accountsInfo = new AccountsInfo();
+                $statistics = $accountsInfo->accountTotalStatistics($userIds);
+                $statisticsMap = [];
+                foreach ($statistics as $stat) {
+                    $statisticsMap[$stat->UserID] = $stat;
+                }
+                foreach ($list as &$item) {
+                    $item->Recharge = isset($statisticsMap[$item->UserID]) ? $statisticsMap[$item->UserID]->Recharge : 0;
+                    $item->Withdraw = isset($statisticsMap[$item->UserID]) ? $statisticsMap[$item->UserID]->Withdraw : 0;
+                }
+            }
 
             return view('admin.global.join_LastLogonIP', ['list' => $list, 'id' => $id, 'UserID' => $UserID]);
         } elseif ($id == 7) { // 登录IP记录
@@ -1016,6 +1109,21 @@ class GlobalController extends Controller
                       ->selectRaw('RegisterDate,LastLogonDate,GameID,Compellation,Channel,NickName,ai.UserID')
                       ->paginate(1000);
 
+            // 获取总充值和总提现
+            $userIds = $list->pluck('UserID')->toArray();
+            if (!empty($userIds)) {
+                $accountsInfo = new AccountsInfo();
+                $statistics = $accountsInfo->accountTotalStatistics($userIds);
+                $statisticsMap = [];
+                foreach ($statistics as $stat) {
+                    $statisticsMap[$stat->UserID] = $stat;
+                }
+                foreach ($list as &$item) {
+                    $item->Recharge = isset($statisticsMap[$item->UserID]) ? $statisticsMap[$item->UserID]->Recharge : 0;
+                    $item->Withdraw = isset($statisticsMap[$item->UserID]) ? $statisticsMap[$item->UserID]->Withdraw : 0;
+                }
+            }
+
             return view('admin.global.join_bankNo', ['list' => $list, 'id' => $id,  'UserID' => $UserID, 'BankNo' => implode(",",$cpf)]);
         }
     }

+ 315 - 0
app/Http/Controllers/Api/RegisterHourlyStatsController.php

@@ -0,0 +1,315 @@
+<?php
+
+namespace App\Http\Controllers\Api;
+
+use App\Http\Controllers\Controller;
+use App\Http\logic\api\RegisterHourlyStatsLogic;
+use Illuminate\Http\Request;
+
+class RegisterHourlyStatsController extends Controller
+{
+    /**
+     * 获取按小时分布的注册用户、首充付费人数统计
+     * 
+     * @param Request $request
+     * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\Response
+     */
+    public function getHourlyStats(Request $request)
+    {
+        // 获取日期参数,如果没有提供则使用今天
+        $date = $request->input('date', date('Y-m-d'));
+        $channel = (int)$request->input('channel', 104); // 渠道ID,默认102
+        $format = $request->input('format', 'chart'); // json 或 chart
+
+        $logic = new RegisterHourlyStatsLogic();
+        $result = $logic->getHourlyStats($date, $channel);
+
+        if ($result === false) {
+            if ($format === 'chart') {
+                return response('<html><body><h3>错误: ' . htmlspecialchars($logic->getError()) . '</h3></body></html>', 400);
+            }
+            return apiReturnFail($logic->getError());
+        }
+
+        // 如果请求图表格式,返回 HTML 图表页面
+        if ($format === 'chart') {
+            return $this->renderChart($result, $date, $channel);
+        }
+
+        // 默认返回 JSON
+        return apiReturnSuc($result);
+    }
+
+    /**
+     * 渲染 HTML 图表页面
+     * 
+     * @param array $data
+     * @param string $date
+     * @param int $channel
+     * @return \Illuminate\Http\Response
+     */
+    private function renderChart($data, $date, $channel = 102)
+    {
+        // 准备图表数据
+        $hours = [];
+        $registerCounts = [];
+        $chargeCounts = [];
+        $chargeRates = [];
+
+        foreach ($data as $row) {
+            $hours[] = $row['hour_display'];
+            $registerCounts[] = $row['register_count'];
+            $chargeCounts[] = $row['first_charge_count'];
+            $chargeRates[] = $row['charge_rate'];
+        }
+
+        $html = '<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>注册用户按小时统计图表</title>
+    <script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.0/dist/chart.umd.min.js"></script>
+    <style>
+        * {
+            box-sizing: border-box;
+        }
+        body {
+            font-family: Arial, "Microsoft YaHei", sans-serif;
+            margin: 0;
+            padding: 20px;
+            background-color: #f5f5f5;
+        }
+        .container {
+            max-width: 1400px;
+            margin: 0 auto;
+            background-color: white;
+            padding: 30px;
+            border-radius: 8px;
+            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
+        }
+        h1 {
+            color: #333;
+            margin-bottom: 20px;
+            text-align: center;
+        }
+        .filter-section {
+            display: flex;
+            gap: 20px;
+            align-items: center;
+            margin-bottom: 30px;
+            padding: 20px;
+            background-color: #f9f9f9;
+            border-radius: 6px;
+        }
+        .filter-item {
+            display: flex;
+            align-items: center;
+            gap: 10px;
+        }
+        .filter-item label {
+            font-weight: bold;
+            color: #555;
+        }
+        .filter-item input, .filter-item select {
+            padding: 8px 12px;
+            border: 1px solid #ddd;
+            border-radius: 4px;
+            font-size: 14px;
+        }
+        .filter-item button {
+            padding: 8px 20px;
+            background-color: #4CAF50;
+            color: white;
+            border: none;
+            border-radius: 4px;
+            cursor: pointer;
+            font-size: 14px;
+            font-weight: bold;
+        }
+        .filter-item button:hover {
+            background-color: #45a049;
+        }
+        .chart-container {
+            margin-bottom: 40px;
+            position: relative;
+            height: 400px;
+        }
+        .chart-title {
+            font-size: 18px;
+            font-weight: bold;
+            margin-bottom: 15px;
+            color: #333;
+            text-align: center;
+        }
+        .info {
+            color: #666;
+            margin-bottom: 20px;
+            font-size: 14px;
+            text-align: center;
+        }
+    </style>
+</head>
+<body>
+    <div class="container">
+        <h1>注册用户按小时统计图表</h1>
+        <div class="info">
+            <strong>统计日期:</strong> ' . htmlspecialchars($date) . ' | 
+            <strong>渠道:</strong> ' . htmlspecialchars($channel) . ' | 
+            <strong>统计时间:</strong> ' . date('Y-m-d H:i:s') . '
+        </div>
+        
+        <div class="filter-section">
+            <div class="filter-item">
+                <label for="dateInput">选择日期:</label>
+                <input type="date" id="dateInput" value="' . htmlspecialchars($date) . '" max="' . date('Y-m-d') . '">
+            </div>
+            <div class="filter-item">
+                <label for="channelInput">渠道:</label>
+                <select id="channelInput">
+                    <option value="104"' . ($channel == 104 ? ' selected' : '') . '>104</option>
+                    <option value="114"' . ($channel == 114 ? ' selected' : '') . '>114</option>
+                </select>
+            </div>
+            <div class="filter-item">
+                <button onclick="loadData()">查询</button>
+            </div>
+        </div>
+
+        <div class="chart-container">
+            <div class="chart-title">注册人数 & 新增付费人数(柱状图)</div>
+            <canvas id="barChart"></canvas>
+        </div>
+
+        <div class="chart-container">
+            <div class="chart-title">新增付费率(折线图)</div>
+            <canvas id="lineChart"></canvas>
+        </div>
+    </div>
+
+    <script>
+        const hours = ' . json_encode($hours, JSON_UNESCAPED_UNICODE) . ';
+        const registerCounts = ' . json_encode($registerCounts, JSON_UNESCAPED_UNICODE) . ';
+        const chargeCounts = ' . json_encode($chargeCounts, JSON_UNESCAPED_UNICODE) . ';
+        const chargeRates = ' . json_encode($chargeRates, JSON_UNESCAPED_UNICODE) . ';
+
+        // 柱状图配置
+        const barCtx = document.getElementById("barChart").getContext("2d");
+        const barChart = new Chart(barCtx, {
+            type: "bar",
+            data: {
+                labels: hours,
+                datasets: [
+                    {
+                        label: "注册人数",
+                        data: registerCounts,
+                        backgroundColor: "rgba(54, 162, 235, 0.6)",
+                        borderColor: "rgba(54, 162, 235, 1)",
+                        borderWidth: 1
+                    },
+                    {
+                        label: "新增付费人数",
+                        data: chargeCounts,
+                        backgroundColor: "rgba(255, 99, 132, 0.6)",
+                        borderColor: "rgba(255, 99, 132, 1)",
+                        borderWidth: 1
+                    }
+                ]
+            },
+            options: {
+                responsive: true,
+                maintainAspectRatio: false,
+                scales: {
+                    y: {
+                        beginAtZero: true,
+                        ticks: {
+                            stepSize: 1
+                        }
+                    }
+                },
+                plugins: {
+                    legend: {
+                        display: true,
+                        position: "top"
+                    },
+                    tooltip: {
+                        mode: "index",
+                        intersect: false
+                    }
+                }
+            }
+        });
+
+        // 折线图配置
+        const lineCtx = document.getElementById("lineChart").getContext("2d");
+        const lineChart = new Chart(lineCtx, {
+            type: "line",
+            data: {
+                labels: hours,
+                datasets: [
+                    {
+                        label: "新增付费率 (%)",
+                        data: chargeRates,
+                        borderColor: "rgba(75, 192, 192, 1)",
+                        backgroundColor: "rgba(75, 192, 192, 0.2)",
+                        borderWidth: 2,
+                        fill: true,
+                        tension: 0.4,
+                        pointRadius: 4,
+                        pointHoverRadius: 6
+                    }
+                ]
+            },
+            options: {
+                responsive: true,
+                maintainAspectRatio: false,
+                scales: {
+                    y: {
+                        beginAtZero: true,
+                        max: 100,
+                        ticks: {
+                            callback: function(value) {
+                                return value + "%";
+                            }
+                        }
+                    }
+                },
+                plugins: {
+                    legend: {
+                        display: true,
+                        position: "top"
+                    },
+                    tooltip: {
+                        callbacks: {
+                            label: function(context) {
+                                return "新增付费率: " + context.parsed.y + "%";
+                            }
+                        }
+                    }
+                }
+            }
+        });
+
+        // 加载数据函数
+        function loadData() {
+            const date = document.getElementById("dateInput").value;
+            const channel = document.getElementById("channelInput").value;
+            
+            if (!date) {
+                alert("请选择日期");
+                return;
+            }
+
+            // 构建URL
+            const url = window.location.pathname + "?date=" + date + "&channel=" + channel + "&format=chart";
+            
+            // 重新加载页面
+            window.location.href = url;
+        }
+    </script>
+</body>
+</html>';
+
+        return response($html, 200)->header('Content-Type', 'text/html; charset=utf-8');
+    }
+}

+ 148 - 0
app/Http/logic/api/RegisterHourlyStatsLogic.php

@@ -0,0 +1,148 @@
+<?php
+
+namespace App\Http\logic\api;
+
+use Illuminate\Support\Facades\DB;
+
+class RegisterHourlyStatsLogic extends BaseApiLogic
+{
+    /**
+     * 获取按小时分布的注册用户、首充付费人数统计
+     * 新增付费人数:在指定日期注册的用户,在注册后24小时内有首充的用户
+     * 
+     * @param string $date 日期 格式: Y-m-d
+     * @param int $channel 渠道ID,默认102
+     * @return array|false
+     */
+    public function getHourlyStats($date, $channel = 102)
+    {
+        try {
+            // 验证日期格式
+            if (!$this->validateDate($date)) {
+                $this->error = 'Invalid date format. Please use Y-m-d format.';
+                return false;
+            }
+
+            // 构建日期时间范围(当天00:00:00 到 23:59:59)
+            $startDateTime = $date . ' 00:00:00';
+            $endDateTime = $date . ' 23:59:59';
+
+            // 查询注册数据 - 按小时分组统计,添加渠道筛选
+            $registerStats = DB::connection('account')
+                ->table('QPAccountsDB.dbo.AccountsInfo')
+                ->select(
+                    DB::raw("DATEPART(HOUR, RegisterDate) as hour"),
+                    DB::raw("COUNT(*) as register_count")
+                )
+                ->where('Channel', $channel)
+                ->whereBetween('RegisterDate', [$startDateTime, $endDateTime])
+                ->groupBy(DB::raw("DATEPART(HOUR, RegisterDate)"))
+                ->orderBy('hour')
+                ->get();
+
+            // 获取所有注册用户的ID和注册时间
+            $registeredUsers = DB::connection('account')
+                ->table('QPAccountsDB.dbo.AccountsInfo')
+                ->select('UserID', DB::raw("DATEPART(HOUR, RegisterDate) as register_hour"), 'RegisterDate')
+                ->where('Channel', $channel)
+                ->whereBetween('RegisterDate', [$startDateTime, $endDateTime])
+                ->get()
+                ->keyBy('UserID');
+
+            // 初始化结果数组(24小时)
+            $result = [];
+            for ($hour = 0; $hour < 24; $hour++) {
+                $result[$hour] = [
+                    'hour' => $hour,
+                    'hour_display' => sprintf('%02d点', $hour),
+                    'register_count' => 0,
+                    'first_charge_count' => 0,
+                    'charge_rate' => 0,
+                ];
+            }
+
+            // 填充注册数据
+            foreach ($registerStats as $stat) {
+                $hour = (int)$stat->hour;
+                $result[$hour]['register_count'] = (int)$stat->register_count;
+            }
+
+            // 查询首充数据:在注册后24小时内有首充的用户
+            if ($registeredUsers->count() > 0) {
+                $userIds = $registeredUsers->pluck('UserID')->toArray();
+                
+                // 查询这些用户在注册后24小时内的首充记录
+                $firstChargeUsers = DB::connection('write')
+                    ->table('agent.dbo.order as o')
+                    ->leftJoin('QPAccountsDB.dbo.AccountsInfo as ai', 'o.user_id', '=', 'ai.UserID')
+                    ->select('o.user_id', 'o.finished_at', 'ai.RegisterDate')
+                    ->where('o.GiftsID', 301)
+                    ->where('o.pay_status', 1)
+                    ->whereNotNull('o.finished_at')
+                    ->whereIn('o.user_id', $userIds)
+                    ->get();
+
+                // 按注册小时统计首充人数(首充时间必须在注册后24小时内)
+                $chargeCountByHour = [];
+                foreach ($firstChargeUsers as $charge) {
+                    $userId = $charge->user_id;
+                    if (!isset($registeredUsers[$userId])) {
+                        continue;
+                    }
+                    
+                    $registerDate = strtotime($registeredUsers[$userId]->RegisterDate);
+                    $chargeDate = strtotime($charge->finished_at);
+                    
+                    // 检查首充是否在注册后24小时内
+                    $hoursDiff = ($chargeDate - $registerDate) / 3600;
+                    if ($hoursDiff >= 0 && $hoursDiff <= 24) {
+                        $registerHour = (int)$registeredUsers[$userId]->register_hour;
+                        if (!isset($chargeCountByHour[$registerHour])) {
+                            $chargeCountByHour[$registerHour] = [];
+                        }
+                        // 使用数组去重,确保每个用户只计算一次
+                        if (!in_array($userId, $chargeCountByHour[$registerHour])) {
+                            $chargeCountByHour[$registerHour][] = $userId;
+                        }
+                    }
+                }
+
+                // 填充首充数据
+                foreach ($chargeCountByHour as $hour => $userIds) {
+                    $result[$hour]['first_charge_count'] = count($userIds);
+                }
+            }
+
+            // 计算付费率
+            foreach ($result as &$row) {
+                if ($row['register_count'] > 0) {
+                    $row['charge_rate'] = round(($row['first_charge_count'] / $row['register_count']) * 100, 2);
+                }
+            }
+
+            // 添加日期和渠道信息
+            foreach ($result as &$row) {
+                $row['date'] = $date;
+                $row['channel'] = $channel;
+            }
+
+            return array_values($result);
+
+        } catch (\Exception $e) {
+            $this->error = 'Database query error: ' . $e->getMessage();
+            return false;
+        }
+    }
+
+    /**
+     * 验证日期格式
+     * 
+     * @param string $date
+     * @return bool
+     */
+    private function validateDate($date)
+    {
+        $d = \DateTime::createFromFormat('Y-m-d', $date);
+        return $d && $d->format('Y-m-d') === $date;
+    }
+}

+ 1 - 1
app/Services/GlobalUser.php

@@ -68,7 +68,7 @@ class GlobalUser extends BaseApiLogic
             ->select('StatusValue')
             ->first()->StatusValue ?? 0;
         $adminChannels=session('admin_channels');
-        $field = ['ai.GameID', 'ai.UserID', 'ai.SpreaderID', 'ai.NickName', 'ai.MemberOrder', 'ai.Nullity', 'ai.WebLogonTimes', 'ai.LastLogonIP', 'ai.LastLogonDate', 'ai.RegisterIP', 'ai.RegisterDate', 'ai.Channel', 'gi.Score', 'gi.Score','gi.InsureScore', 'gi.MaxScore', 'gi.MaxWinScore'];
+        $field = ['ai.GameID', 'ai.UserID', 'ai.SpreaderID', 'ai.NickName', 'ai.MemberOrder', 'ai.Nullity', 'ai.WebLogonTimes', 'ai.LastLogonIP', 'ai.LastLogonDate', 'ai.RegisterIP', 'ai.RegisterDate', 'ai.Channel', 'gi.Score', 'gi.InsureScore', 'gi.MaxScore', 'gi.MaxWinScore'];
         $Sql = DB::connection('read')->table(TableName::QPAccountsDB() . 'AccountsInfo as ai')
             ->leftJoin(TableName::QPTreasureDB() . 'GameScoreInfo as gi', 'ai.UserID', 'gi.UserID')
             ->where('ai.IsAndroid', 0)

+ 4 - 0
resources/views/admin/global/join_LastLogonIP.blade.php

@@ -34,6 +34,8 @@
                                     <th width="6%">{{ __('auto.渠道') }}</th>
                                     <th width="6%">{{ __('auto.注册日期') }}</th>
                                     <th width="6%">{{ __('auto.最后登录日期') }}</th>
+                                    <th width="6%">{{ __('auto.总充值') }}</th>
+                                    <th width="6%">{{ __('auto.总提现') }}</th>
 
                                 </tr>
                                 </thead>
@@ -50,6 +52,8 @@
                                         <td>{{$v->Channel}}</td>
                                         <td>{{$v->RegisterDate}}</td>
                                         <td>{{$v->LastLogonDate}}</td>
+                                        <td>{{$v->Recharge ?? 0}}</td>
+                                        <td>{{($v->Withdraw ?? 0) / 100}}</td>
                                     </tr>
                                 @endforeach
                                 </tbody>

+ 4 - 0
resources/views/admin/global/join_bankNo.blade.php

@@ -33,6 +33,8 @@
                                 <th width="6%">{{ __('auto.渠道') }}</th>
                                 <th width="6%">{{ __('auto.注册日期') }}</th>
                                 <th width="6%">{{ __('auto.最后登录日期') }}</th>
+                                <th width="6%">{{ __('auto.总充值') }}</th>
+                                <th width="6%">{{ __('auto.总提现') }}</th>
 
                             </tr>
                             </thead>
@@ -48,6 +50,8 @@
                                     <td>{{$v->Channel}}</td>
                                     <td>{{$v->RegisterDate}}</td>
                                     <td>{{$v->LastLogonDate}}</td>
+                                    <td>{{$v->Recharge ?? 0}}</td>
+                                    <td>{{($v->Withdraw ?? 0) / 100}}</td>
                                 </tr>
                             @endforeach
                             </tbody>

+ 5 - 2
resources/views/admin/global/join_facility.blade.php

@@ -35,8 +35,9 @@
                                     <th width="6%">{{ __('auto.昵称') }}</th>
                                     <th width="6%">{{ __('auto.渠道') }}</th>
                                     <th width="6%">{{ __('auto.注册日期') }}</th>
-                                    <th width="6%">{{ __('auto.用设备登陆次数') }}
-                                    </th>
+                                    <th width="6%">{{ __('auto.用设备登陆次数') }}</th>
+                                    <th width="6%">{{ __('auto.总充值') }}</th>
+                                    <th width="6%">{{ __('auto.总提现') }}</th>
 
                                 </tr>
                                 </thead>
@@ -52,6 +53,8 @@
                                     <td>{{$item->Channel}}</td>
                                     <td>{{date('Y-m-d H:i:s',strtotime($item->RegisterDate))}}</td>
                                     <td>{{$item->login_count}}</td>
+                                    <td>{{$item->Recharge ?? 0}}</td>
+                                    <td>{{($item->Withdraw ?? 0) / 100}}</td>
                                 </tr>
                                 @endforeach
                                 </tbody>

+ 4 - 0
resources/views/admin/global/join_ip.blade.php

@@ -33,6 +33,8 @@
                                     <th width="6%">{{ __('auto.渠道') }}</th>
                                     <th width="6%">{{ __('auto.注册日期') }}</th>
                                     <th width="6%">{{ __('auto.最后登录日期') }}</th>
+                                    <th width="6%">{{ __('auto.总充值') }}</th>
+                                    <th width="6%">{{ __('auto.总提现') }}</th>
 
                                 </tr>
                                 </thead>
@@ -48,6 +50,8 @@
                                         <td>{{$v->Channel}}</td>
                                         <td>{{$v->RegisterDate}}</td>
                                         <td>{{$v->LastLogonDate}}</td>
+                                        <td>{{$v->Recharge ?? 0}}</td>
+                                        <td>{{($v->Withdraw ?? 0) / 100}}</td>
                                     </tr>
                                 @endforeach
                                 </tbody>

+ 2 - 0
routes/api.php

@@ -474,3 +474,5 @@ Route::get('/agent/click-stats', 'Api\AgentClickController@getClickStats');
 
 // 公开获取成功提现记录展示
 //Route::get('/agent/recent-withdrawals', 'Api\AgentController@getRecentWithdrawals');
+// 获取按小时分布的注册用户、首充付费人数和付费率统计
+Route::any('/stats/register-hourly', 'Api\RegisterHourlyStatsController@getHourlyStats');