添加后台代理代码和数据库
This commit is contained in:
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -5,7 +5,7 @@
|
||||
|
||||
// 通过域名判断环境
|
||||
$.API_URL = 'https://dlapi.daoqijuyou77.cn/Index.php';
|
||||
$.RETURN_URL = 'https://dlweb.daoqijuyou77.cn/web2/notify.html';
|
||||
$.RETURN_URL = 'https://dlapi.daoqijuyou77.cn/web2/notify.html';
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
|
||||
$.API_URL = 'https://dlapi.daoqijuyou77.cn/Index.php';
|
||||
$.RETURN_URL = 'https://dlweb.daoqijuyou77.cn/web2/notify.html';
|
||||
$.RETURN_URL = 'https://dlapi.daoqijuyou77.cn/web2/notify.html';
|
||||
$.SETTLE_URL = 'http://dlsettle.daoqijuyou77.cn/mobile/';
|
||||
|
||||
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
|
||||
<div class="list-group">
|
||||
|
||||
<a href="https://dlweb.daoqijuyou77.cn/web2/agent_list.html?agentid=all&show=1" class="list-group-item">用户后台</a>
|
||||
<a href="https://dlweb.daoqijuyou77.cn/web2/agent_list_admin.html?agentid=all" class="list-group-item">
|
||||
<a href="https://dlapi.daoqijuyou77.cn/web2/agent_list.html?agentid=all&show=1" class="list-group-item">用户后台</a>
|
||||
<a href="https://dlapi.daoqijuyou77.cn/web2/agent_list_admin.html?agentid=all" class="list-group-item">
|
||||
结算后台__电脑端(全国)
|
||||
</a>
|
||||
<!-- ts已修改2021 -->
|
||||
|
||||
BIN
codes/agent/tools/bak.zip
Normal file
BIN
codes/agent/tools/bak.zip
Normal file
Binary file not shown.
@@ -1,250 +0,0 @@
|
||||
echo off
|
||||
echo %date% %time%
|
||||
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::: 同步战绩数据
|
||||
:sync_recorddata
|
||||
|
||||
:init
|
||||
::: mysql导出工具文件全名
|
||||
set ExportBinary="C:\webroot\dbbackup\mysql\mysqldump.exe"
|
||||
::: mysql导入工具文件全名
|
||||
set ImportBinary="C:\webroot\dbbackup\mysql\mysql.exe"
|
||||
|
||||
|
||||
::: 游戏基础信息服务器配置
|
||||
set Hostname_base="rm-bp16sbf0l9cavp7h9o.mysql.rds.aliyuncs.com"
|
||||
set Hostport_base="3306"
|
||||
set Username_base="develop"
|
||||
set Password_base="develop123!@#"
|
||||
set Database_base="youle_games"
|
||||
set ExportTable_base=player
|
||||
|
||||
::: 游戏战绩服务器配置
|
||||
set Hostname_record="rm-bp16sbf0l9cavp7h9o.mysql.rds.aliyuncs.com"
|
||||
set Hostport_record="3306"
|
||||
set Username_record="develop"
|
||||
set Password_record="develop123!@#"
|
||||
set Database_record="youle_games"
|
||||
set ExportTable_record=player_grade,gold_account
|
||||
|
||||
::: 后台服务器配置
|
||||
set Hostname_owner="localhost"
|
||||
set Hostport_owner="3309"
|
||||
set Username_owner="root"
|
||||
set Password_owner="root_root"
|
||||
set Database_owner="game_db"
|
||||
set Database_owner_temp="game_db_temp"
|
||||
|
||||
::: 临时服务器配置
|
||||
set Hostname_temp="localhost"
|
||||
set Hostport_temp="3309"
|
||||
set Username_temp="root"
|
||||
set Password_temp="root_root"
|
||||
set Database_temp="game_db"
|
||||
set Database_temp_temp="game_db_temp"
|
||||
|
||||
::: 是否需要保存到临时库
|
||||
set NeedSaveToTemp=0
|
||||
|
||||
::: 要执行的脚本
|
||||
set ExecuteCommand_1="call cp_SynchronizeSettle();"
|
||||
|
||||
::: 保证脚本输出目录一定存在
|
||||
if not exist "%~dp0script" md "%~dp0script"
|
||||
|
||||
::: 要导出的脚本文件名的前缀(后面还会加上表名)
|
||||
set ScriptnamePrefix=%~dp0script\%date:~0,4%%date:~5,2%%date:~8,2%
|
||||
|
||||
::: 判断脚本是否存在, 存在则删除
|
||||
::if exist %Scriptname% del %Scriptname%
|
||||
|
||||
:export
|
||||
echo 开始导出游戏基础信息脚本
|
||||
for %%t in (%ExportTable_base%) do (
|
||||
::: 判断脚本是否存在, 存在则删除
|
||||
if exist "%ScriptnamePrefix%_base_%%t.sql" del "%ScriptnamePrefix%_base_%%t.sql"
|
||||
|
||||
::: 循环导出脚本
|
||||
echo 导出表%%t到%ScriptnamePrefix%_base_%%t.sql
|
||||
%ExportBinary% --default-character-set=utf8 --opt -h%Hostname_base% -P%Hostport_base% -u%Username_base% -p%Password_base% %Database_base% %%t > "%ScriptnamePrefix%_base_%%t.sql"
|
||||
if %errorlevel% neq 0 goto exit_recorddata
|
||||
)
|
||||
echo 游戏基础信息脚本导出完成
|
||||
|
||||
echo 开始导出游戏战绩脚本
|
||||
for %%t in (%ExportTable_record%) do (
|
||||
::: 判断脚本是否存在, 存在则删除
|
||||
if exist "%ScriptnamePrefix%_record_%%t.sql" del "%ScriptnamePrefix%_record_%%t.sql"
|
||||
|
||||
::: 循环导出脚本
|
||||
echo 导出表%%t到%ScriptnamePrefix%_record_%%t.sql
|
||||
%ExportBinary% --default-character-set=utf8 --opt -h%Hostname_record% -P%Hostport_record% -u%Username_record% -p%Password_record% %Database_record% %%t > "%ScriptnamePrefix%_record_%%t.sql"
|
||||
if %errorlevel% neq 0 goto exit_recorddata
|
||||
)
|
||||
echo 游戏战绩脚本导出完成
|
||||
|
||||
:import
|
||||
echo 开始导入游戏基础信息脚本
|
||||
for %%t in (%ExportTable_base%) do (
|
||||
echo 从%ScriptnamePrefix%_base_%%t.sql导入表%%t
|
||||
%ImportBinary% --default-character-set=utf8 -h%Hostname_owner% -P%Hostport_owner% -u%Username_owner% -p%Password_owner% %Database_owner_temp% < "%ScriptnamePrefix%_base_%%t.sql"
|
||||
if %errorlevel% neq 0 goto exit_recorddata
|
||||
)
|
||||
echo 游戏基础信息脚本导入完成
|
||||
|
||||
echo 开始导入游戏战绩脚本
|
||||
for %%t in (%ExportTable_record%) do (
|
||||
echo 从%ScriptnamePrefix%_record_%%t.sql导入表%%t
|
||||
%ImportBinary% --default-character-set=utf8 -h%Hostname_owner% -P%Hostport_owner% -u%Username_owner% -p%Password_owner% %Database_owner_temp% < "%ScriptnamePrefix%_record_%%t.sql"
|
||||
if %errorlevel% neq 0 goto exit_recorddata
|
||||
)
|
||||
echo 游戏战绩脚本导入完成
|
||||
|
||||
:synchronize
|
||||
echo 执行脚本%ExecuteCommand_1%
|
||||
%ImportBinary% -h%Hostname_owner% -P%Hostport_owner% -u%Username_owner% -p%Password_owner% -e%ExecuteCommand_1% %Database_owner%
|
||||
if %errorlevel% neq 0 goto exit_recorddata
|
||||
echo 脚本执行完成
|
||||
|
||||
if %NeedSaveToTemp% equ 0 goto convertdata
|
||||
|
||||
:savetotemp
|
||||
echo 开始导入游戏基础信息脚本到临时库
|
||||
for %%t in (%ExportTable_base%) do (
|
||||
echo 从%ScriptnamePrefix%_base_%%t.sql导入表%%t
|
||||
%ImportBinary% --default-character-set=utf8 -h%Hostname_temp% -P%Hostport_temp% -u%Username_temp% -p%Password_temp% %Database_temp_temp% < "%ScriptnamePrefix%_base_%%t.sql"
|
||||
if %errorlevel% neq 0 goto exit_recorddata
|
||||
)
|
||||
echo 游戏基础信息脚本导入完成
|
||||
|
||||
echo 开始导入游戏战绩脚本到临时库
|
||||
for %%t in (%ExportTable_record%) do (
|
||||
echo 从%ScriptnamePrefix%_record_%%t.sql导入表%%t
|
||||
%ImportBinary% --default-character-set=utf8 -h%Hostname_temp% -P%Hostport_temp% -u%Username_temp% -p%Password_temp% %Database_temp_temp% < "%ScriptnamePrefix%_record_%%t.sql"
|
||||
if %errorlevel% neq 0 goto exit_recorddata
|
||||
)
|
||||
echo 游戏战绩脚本导入完成
|
||||
|
||||
|
||||
echo 执行同步脚本
|
||||
echo 执行脚本%ExecuteCommand_1%
|
||||
%ImportBinary% -h%Hostname_temp% -P%Hostport_temp% -u%Username_temp% -p%Password_temp% -e%ExecuteCommand_1% %Database_temp%
|
||||
if %errorlevel% neq 0 goto exit_recorddata
|
||||
echo 脚本执行完成
|
||||
|
||||
:convertdata
|
||||
::"%~dp0MySqlSynchronize.exe"
|
||||
|
||||
:clean
|
||||
echo 删除脚本文件
|
||||
for %%t in (%ExportTable_base%) do del "%ScriptnamePrefix%_base_%%t.sql"
|
||||
for %%t in (%ExportTable_record%) do del "%ScriptnamePrefix%_record_%%t.sql"
|
||||
echo 脚本删除完成
|
||||
|
||||
:sync_recorddata
|
||||
echo %date% %time%
|
||||
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::: 同步报表
|
||||
:sync_reportdata
|
||||
echo 开始同步报表数据(https://proxytest.tscce.cn/api/ext/SynchronizeReportData.php)
|
||||
"%~dp0HttpRequest.x64.exe" -type post -address "https://proxytest.tscce.cn/api/ext/SynchronizeReportData.php" -parameter "" -interval 1000 -thread 1 -loop 0
|
||||
echo 开始生成报表数据(https://proxytest.tscce.cn/api/ext/autotask.php)
|
||||
"%~dp0HttpRequest.x64.exe" -type post -address "https://proxytest.tscce.cn/api/ext/autotask.php" -parameter "" -interval 1000 -thread 1 -loop 0
|
||||
goto exit
|
||||
|
||||
:exit_reportdata
|
||||
echo %date% %time%
|
||||
|
||||
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::: 备份数据库
|
||||
:backup_database
|
||||
for /f "tokens=1-3 delims=/-, " %%a in ('echo/%date%') do (
|
||||
set yy=%%a & set mm=%%b & set dd=%%c
|
||||
)
|
||||
set /a dd=100%dd%%%100,mm=100%mm%%%100
|
||||
set /a z=14-mm,z/=12,y=yy+4800-z,m=mm+12*z-3,j=153*m+2
|
||||
set /a j=j/5+dd+y*365+y/4-y/100+y/400-2472633
|
||||
|
||||
set /a j=j-7
|
||||
|
||||
set /a i=j,a=i+2472632,b=4*a+3,b/=146097,c=-b*146097,c/=4,c+=a
|
||||
set /a d=4*c+3,d/=1461,e=-1461*d,e/=4,e+=c,m=5*e+2,m/=153,dd=153*m+2,dd/=5
|
||||
set /a dd=-dd+e+1,mm=-m/10,mm*=12,mm+=m+3,yy=b*100+d-4800+m/10
|
||||
(if %mm% LSS 10 set mm=0%mm%)&(if %dd% LSS 10 set dd=0%dd%)
|
||||
|
||||
set fdate=%yy%-%mm%-%dd%
|
||||
echo %fdate%
|
||||
|
||||
set mysqldump=C:\xampp\mysql\bin\mysqldump.exe
|
||||
set mysql=C:\xampp\mysql\bin\mysql.exe
|
||||
set winrar=C:\Program Files\WinRAR\rar.exe
|
||||
set needupload=0
|
||||
|
||||
::: 开始备份oracle(dbcenter)
|
||||
if exist "%~dp0dbcenter_%yy%%mm%%dd%.dmp" del "%~dp0dbcenter_%yy%%mm%%dd%.dmp"
|
||||
if exist "%~dp0dbcenter_%yy%%mm%%dd%.log" del "%~dp0dbcenter_%yy%%mm%%dd%.log"
|
||||
|
||||
set NLS_LANG=AMERICAN_AMERICA.AL32UTF8
|
||||
set ORACLE_HOME=D:\app\kingsoft\virtual\product\12.2.0\dbhome_1
|
||||
exp '"/ as sysdba"' file="%~dp0dbcenter_%date:~0,4%%date:~5,2%%date:~8,2%.dmp" log="%~dp0dbcenter_%date:~0,4%%date:~5,2%%date:~8,2%.log" grants=y full=y statistics=none
|
||||
::: 备份oracle(dbcenter)结束
|
||||
|
||||
::: 开始备份mysql(tswldb)
|
||||
if exist "%~dp0tswldb_%yy%%mm%%dd%.sql" del "%~dp0tswldb_%yy%%mm%%dd%.sql"
|
||||
"%mysqldump%" --opt -hlocalhost -P3309 -uroot -proot_root -R tswldb > "%~dp0tswldb_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
::: 备份mysql(tswldb)结束
|
||||
|
||||
::: 开始备份mysql(syhd)
|
||||
if exist "%~dp0syhd_%yy%%mm%%dd%.sql" del "%~dp0syhd_%yy%%mm%%dd%.sql"
|
||||
"%mysqldump%" --opt -hlocalhost -P3309 -uroot -proot@admin -R syhd > "%~dp0syhd_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
::: 备份mysql(syhd)结束
|
||||
|
||||
::: 开始备份mysql(game_db)
|
||||
if exist "%~dp0game_db_localhost_%yy%%mm%%dd%.sql" del "%~dp0game_db_localhost_%yy%%mm%%dd%.sql"
|
||||
"%mysql%" -h"localhost" -P"3309" -uroot -proot_root -e"truncate table player_grade" game_db
|
||||
"%mysqldump%" --opt -h"localhost" -P"3309" -uroot -proot_root -R game_db > "%~dp0game_db_localhost_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
::: 备份mysql(game_db)结束
|
||||
|
||||
|
||||
::: 开始备份mysql(youlehudong)
|
||||
if exist "%~dp0youlehudong_%yy%%mm%%dd%.sql" del "%~dp0youlehudong_%yy%%mm%%dd%.sql"
|
||||
"%mysqldump%" --opt -h"rm-wz978o3vha6z26m5no.mysql.rds.aliyuncs.com" -P"3306" -u"yunuser" -p"Yun_User" -R youlehudong > "%~dp0youlehudong_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
::: 备份mysql(youlehudong)结束
|
||||
|
||||
::: 开始备份mysql(game_db)
|
||||
"%mysql%" -h"rm-wz978o3vha6z26m5no.mysql.rds.aliyuncs.com" -P"3306" -u"yunuser" -p"Yun_User" -e"truncate table player_grade" game_db
|
||||
"%mysql%" -h"rm-wz978o3vha6z26m5no.mysql.rds.aliyuncs.com" -P"3306" -u"yunuser" -p"Yun_User" -e"truncate table coin_rebate" game_db
|
||||
if exist "%~dp0game_db_%yy%%mm%%dd%.sql" del "%~dp0game_db_%yy%%mm%%dd%.sql"
|
||||
"%mysqldump%" --opt -h"rm-wz978o3vha6z26m5no.mysql.rds.aliyuncs.com" -P"3306" -u"yunuser" -p"Yun_User" -R game_db > "%~dp0game_db_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
::: 备份mysql(game_db)结束
|
||||
|
||||
|
||||
::: 压缩备份文件
|
||||
%~d0
|
||||
cd "%~dp0"
|
||||
if exist "%~dp0database_%yy%%mm%%dd%.rar" del "%~dp0database_%yy%%mm%%dd%.rar"
|
||||
"%winrar%" a "database_%date:~0,4%%date:~5,2%%date:~8,2%.rar" "dbcenter_%date:~0,4%%date:~5,2%%date:~8,2%.dmp" "dbcenter_%date:~0,4%%date:~5,2%%date:~8,2%.log" "tswldb_%date:~0,4%%date:~5,2%%date:~8,2%.sql" "syhd_%date:~0,4%%date:~5,2%%date:~8,2%.sql" "game_db_localhost_%date:~0,4%%date:~5,2%%date:~8,2%.sql" "youlehudong_%date:~0,4%%date:~5,2%%date:~8,2%.sql" "game_db_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
if %needupload% NEQ 0 (
|
||||
::: 上传压缩文件
|
||||
"%~dp0NetworkTool.x64.exe" -st "2" -rt "2" -hn "120.76.157.63" -hp "80" -on "/dbbackup/upload.php" -rd "/" -rf "database_%date:~0,4%%date:~5,2%%date:~8,2%.rar" -lf "%~dp0database_%date:~0,4%%date:~5,2%%date:~8,2%.rar"
|
||||
::: 删除压缩文件
|
||||
:::del "database_%date:~0,4%%date:~5,2%%date:~8,2%.rar"
|
||||
)
|
||||
|
||||
::: 删除备份的文件
|
||||
if exist "%~dp0dbcenter_%date:~0,4%%date:~5,2%%date:~8,2%.dmp" del "%~dp0dbcenter_%date:~0,4%%date:~5,2%%date:~8,2%.dmp"
|
||||
if exist "%~dp0dbcenter_%date:~0,4%%date:~5,2%%date:~8,2%.log" del "%~dp0dbcenter_%date:~0,4%%date:~5,2%%date:~8,2%.log"
|
||||
if exist "%~dp0tswldb_%date:~0,4%%date:~5,2%%date:~8,2%.sql" del "%~dp0tswldb_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
if exist "%~dp0syhd_%date:~0,4%%date:~5,2%%date:~8,2%.sql" del "%~dp0syhd_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
if exist "%~dp0game_db_localhost_%date:~0,4%%date:~5,2%%date:~8,2%.sql" del "%~dp0game_db_localhost_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
if exist "%~dp0youlehudong_%date:~0,4%%date:~5,2%%date:~8,2%.sql" del "%~dp0youlehudong_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
if exist "%~dp0game_db_%date:~0,4%%date:~5,2%%date:~8,2%.sql" del "%~dp0game_db_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
|
||||
::: 备份完毕
|
||||
:exit
|
||||
|
||||
echo on
|
||||
pause
|
||||
@@ -1,301 +0,0 @@
|
||||
echo off
|
||||
echo %date% %time%
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::: 同步战绩数据
|
||||
:sync_recorddata
|
||||
|
||||
:init
|
||||
::: 停止同步服务
|
||||
::"%~dp0CallerService.exe" -stop
|
||||
net stop CallerService
|
||||
|
||||
::: mysql导出工具文件全名
|
||||
set ExportBinary="C:\webroot\dbbackup\mysql\mysqldump.exe"
|
||||
::: mysql导入工具文件全名
|
||||
set ImportBinary="C:\webroot\dbbackup\mysql\mysql.exe"
|
||||
|
||||
|
||||
::: 游戏基础信息服务器配置
|
||||
set Hostname_base="rm-bp1x3i28se22s9z75o.mysql.rds.aliyuncs.com"
|
||||
set Hostport_base="3306"
|
||||
set Username_base="games"
|
||||
set Password_base="Games2017@)!&"
|
||||
set Database_base="game_db"
|
||||
set ExportTable_base=player
|
||||
|
||||
::: 游戏战绩服务器配置
|
||||
set Hostname_record="rr-bp1x2415jy37d8mu1o.mysql.rds.aliyuncs.com"
|
||||
set Hostport_record="3306"
|
||||
set Username_record="games"
|
||||
set Password_record="Games2017@)!%&"
|
||||
set Database_record="game_db"
|
||||
set ExportTable_record=player_grade,gold_account
|
||||
|
||||
::: 后台服务器配置
|
||||
set Hostname_owner="rm-wz978o3vha6z26m5no.mysql.rds.aliyuncs.com"
|
||||
set Hostport_owner="3306"
|
||||
set Username_owner="yunuser"
|
||||
set Password_owner="Yun_User"
|
||||
set Database_owner="game_db"
|
||||
set Database_owner_temp="game_db_temp"
|
||||
|
||||
::: 临时服务器配置
|
||||
set Hostname_temp="localhost"
|
||||
set Hostport_temp="3309"
|
||||
set Username_temp="root"
|
||||
set Password_temp="root_root"
|
||||
set Database_temp="game_db"
|
||||
set Database_temp_temp="game_db_temp"
|
||||
|
||||
::: 是否需要保存到临时库
|
||||
set NeedSaveToTemp=0
|
||||
|
||||
::: 要执行的脚本
|
||||
set ExecuteCommand_1="call cp_SynchronizeSettle();"
|
||||
|
||||
::: 保证脚本输出目录一定存在
|
||||
if not exist "%~dp0script" md "%~dp0script"
|
||||
|
||||
::: 要导出的脚本文件名的前缀(后面还会加上表名)
|
||||
set ScriptnamePrefix=%~dp0script\%date:~0,4%%date:~5,2%%date:~8,2%
|
||||
|
||||
::: 判断脚本是否存在, 存在则删除
|
||||
::if exist %Scriptname% del %Scriptname%
|
||||
|
||||
:export
|
||||
echo 开始导出游戏基础信息脚本
|
||||
for %%t in (%ExportTable_base%) do (
|
||||
::: 判断脚本是否存在, 存在则删除
|
||||
if exist "%ScriptnamePrefix%_base_%%t.sql" del "%ScriptnamePrefix%_base_%%t.sql"
|
||||
|
||||
::: 循环导出脚本
|
||||
echo 导出表%%t到%ScriptnamePrefix%_base_%%t.sql
|
||||
%ExportBinary% --default-character-set=utf8 --opt -h%Hostname_base% -P%Hostport_base% -u%Username_base% -p%Password_base% %Database_base% %%t > "%ScriptnamePrefix%_base_%%t.sql"
|
||||
if %errorlevel% neq 0 goto exit_recorddata
|
||||
)
|
||||
echo 游戏基础信息脚本导出完成
|
||||
|
||||
echo 开始导出游戏战绩脚本
|
||||
for %%t in (%ExportTable_record%) do (
|
||||
::: 判断脚本是否存在, 存在则删除
|
||||
if exist "%ScriptnamePrefix%_record_%%t.sql" del "%ScriptnamePrefix%_record_%%t.sql"
|
||||
|
||||
::: 循环导出脚本
|
||||
echo 导出表%%t到%ScriptnamePrefix%_record_%%t.sql
|
||||
%ExportBinary% --default-character-set=utf8 --opt -h%Hostname_record% -P%Hostport_record% -u%Username_record% -p%Password_record% %Database_record% %%t > "%ScriptnamePrefix%_record_%%t.sql"
|
||||
if %errorlevel% neq 0 goto exit_recorddata
|
||||
)
|
||||
echo 游戏战绩脚本导出完成
|
||||
|
||||
:import
|
||||
echo 开始导入游戏基础信息脚本
|
||||
for %%t in (%ExportTable_base%) do (
|
||||
echo 从%ScriptnamePrefix%_base_%%t.sql导入表%%t
|
||||
%ImportBinary% --default-character-set=utf8 -h%Hostname_owner% -P%Hostport_owner% -u%Username_owner% -p%Password_owner% %Database_owner_temp% < "%ScriptnamePrefix%_base_%%t.sql"
|
||||
if %errorlevel% neq 0 goto exit_recorddata
|
||||
)
|
||||
echo 游戏基础信息脚本导入完成
|
||||
|
||||
echo 开始导入游戏战绩脚本
|
||||
for %%t in (%ExportTable_record%) do (
|
||||
echo 从%ScriptnamePrefix%_record_%%t.sql导入表%%t
|
||||
%ImportBinary% --default-character-set=utf8 -h%Hostname_owner% -P%Hostport_owner% -u%Username_owner% -p%Password_owner% %Database_owner_temp% < "%ScriptnamePrefix%_record_%%t.sql"
|
||||
if %errorlevel% neq 0 goto exit_recorddata
|
||||
)
|
||||
echo 游戏战绩脚本导入完成
|
||||
|
||||
:synchronize
|
||||
echo 执行脚本%ExecuteCommand_1%
|
||||
%ImportBinary% -h%Hostname_owner% -P%Hostport_owner% -u%Username_owner% -p%Password_owner% -e%ExecuteCommand_1% %Database_owner%
|
||||
if %errorlevel% neq 0 goto exit_recorddata
|
||||
echo 脚本执行完成
|
||||
|
||||
if %NeedSaveToTemp% equ 0 goto convertdata
|
||||
|
||||
:savetotemp
|
||||
echo 开始导入游戏基础信息脚本到临时库
|
||||
for %%t in (%ExportTable_base%) do (
|
||||
echo 从%ScriptnamePrefix%_base_%%t.sql导入表%%t
|
||||
%ImportBinary% --default-character-set=utf8 -h%Hostname_temp% -P%Hostport_temp% -u%Username_temp% -p%Password_temp% %Database_temp_temp% < "%ScriptnamePrefix%_base_%%t.sql"
|
||||
if %errorlevel% neq 0 goto exit_recorddata
|
||||
)
|
||||
echo 游戏基础信息脚本导入完成
|
||||
|
||||
echo 开始导入游戏战绩脚本到临时库
|
||||
for %%t in (%ExportTable_record%) do (
|
||||
echo 从%ScriptnamePrefix%_record_%%t.sql导入表%%t
|
||||
%ImportBinary% --default-character-set=utf8 -h%Hostname_temp% -P%Hostport_temp% -u%Username_temp% -p%Password_temp% %Database_temp_temp% < "%ScriptnamePrefix%_record_%%t.sql"
|
||||
if %errorlevel% neq 0 goto exit_recorddata
|
||||
)
|
||||
echo 游戏战绩脚本导入完成
|
||||
|
||||
|
||||
echo 执行同步脚本
|
||||
echo 执行脚本%ExecuteCommand_1%
|
||||
%ImportBinary% -h%Hostname_temp% -P%Hostport_temp% -u%Username_temp% -p%Password_temp% -e%ExecuteCommand_1% %Database_temp%
|
||||
if %errorlevel% neq 0 goto exit_recorddata
|
||||
echo 脚本执行完成
|
||||
|
||||
:convertdata
|
||||
::"%~dp0MySqlSynchronize.exe"
|
||||
|
||||
:clean
|
||||
echo 删除脚本文件
|
||||
for %%t in (%ExportTable_base%) do del "%ScriptnamePrefix%_base_%%t.sql"
|
||||
for %%t in (%ExportTable_record%) do del "%ScriptnamePrefix%_record_%%t.sql"
|
||||
echo 脚本删除完成
|
||||
|
||||
:sync_recorddata
|
||||
echo %date% %time%
|
||||
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::: 同步报表
|
||||
|
||||
:sync_reportdata
|
||||
::: ts已修改2021 xpxman
|
||||
:::echo 开始同步报表数据(https://dlapi.tscce.cn/ext/SynchronizeReportData.php)
|
||||
:::"%~dp0HttpRequest.x64.exe" -type post -address "https://dlapi.tscce.cn/ext/SynchronizeReportData.php" -parameter "" -interval 1000 -thread 1 -loop 0 >> "%~dp0debug.txt"
|
||||
:::echo 开始生成报表数据(https://dlapi.tscce.cn/ext/autotask.php)
|
||||
:::"%~dp0HttpRequest.x64.exe" -type post -address "https://dlapi.tscce.cn/ext/autotask.php" -parameter "" -interval 1000 -thread 1 -loop 0 >> "%~dp0debug.txt"
|
||||
|
||||
echo 开始同步报表数据(https://dlapi.daoqijuyou77.cn/ext/SynchronizeReportData.php)
|
||||
"%~dp0HttpRequest.x64.exe" -type post -address "https://dlapi.daoqijuyou77.cn/ext/SynchronizeReportData.php" -parameter "" -interval 1000 -thread 1 -loop 0 >> "%~dp0debug.txt"
|
||||
echo 开始生成报表数据(https://dlapi.daoqijuyou77.cn/ext/autotask.php)
|
||||
"%~dp0HttpRequest.x64.exe" -type post -address "https://dlapi.daoqijuyou77.cn/ext/autotask.php" -parameter "" -interval 1000 -thread 1 -loop 0 >> "%~dp0debug.txt"
|
||||
|
||||
|
||||
|
||||
|
||||
:exit_reportdata
|
||||
echo %date% %time%
|
||||
|
||||
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::: 备份数据库
|
||||
:backup_database
|
||||
for /f "tokens=1-3 delims=/-, " %%a in ('echo/%date%') do (
|
||||
set yy=%%a & set mm=%%b & set dd=%%c
|
||||
)
|
||||
set /a dd=100%dd%%%100,mm=100%mm%%%100
|
||||
set /a z=14-mm,z/=12,y=yy+4800-z,m=mm+12*z-3,j=153*m+2
|
||||
set /a j=j/5+dd+y*365+y/4-y/100+y/400-2472633
|
||||
|
||||
set /a j=j-7
|
||||
|
||||
set /a i=j,a=i+2472632,b=4*a+3,b/=146097,c=-b*146097,c/=4,c+=a
|
||||
set /a d=4*c+3,d/=1461,e=-1461*d,e/=4,e+=c,m=5*e+2,m/=153,dd=153*m+2,dd/=5
|
||||
set /a dd=-dd+e+1,mm=-m/10,mm*=12,mm+=m+3,yy=b*100+d-4800+m/10
|
||||
(if %mm% LSS 10 set mm=0%mm%)&(if %dd% LSS 10 set dd=0%dd%)
|
||||
|
||||
set fdate=%yy%-%mm%-%dd%
|
||||
echo %fdate%
|
||||
|
||||
set mysqldump=C:\xampp\mysql\bin\mysqldump.exe
|
||||
set mysql=C:\xampp\mysql\bin\mysql.exe
|
||||
set winrar=C:\Program Files\WinRAR\rar.exe
|
||||
set needupload=0
|
||||
|
||||
::echo ================
|
||||
|
||||
::echo 开始备份oracle(dbcenter)
|
||||
::if exist "%~dp0dbcenter_%yy%%mm%%dd%.dmp" del "%~dp0dbcenter_%yy%%mm%%dd%.dmp"
|
||||
::if exist "%~dp0dbcenter_%yy%%mm%%dd%.log" del "%~dp0dbcenter_%yy%%mm%%dd%.log"
|
||||
|
||||
::set NLS_LANG=AMERICAN_AMERICA.AL32UTF8
|
||||
::set ORACLE_HOME=D:\app\kingsoft\virtual\product\12.2.0\dbhome_1
|
||||
::exp '"/ as sysdba"' file="%~dp0dbcenter_%date:~0,4%%date:~5,2%%date:~8,2%.dmp" log="%~dp0dbcenter_%date:~0,4%%date:~5,2%%date:~8,2%.log" grants=y full=y statistics=none
|
||||
::echo 备份oracle(dbcenter)结束
|
||||
|
||||
::echo ================
|
||||
|
||||
::echo 开始备份mysql(tswldb)
|
||||
::if exist "%~dp0tswldb_%yy%%mm%%dd%.sql" del "%~dp0tswldb_%yy%%mm%%dd%.sql"
|
||||
::"%mysqldump%" --default-character-set=utf8 --opt --lock-all-tables -x -h"localhost" -P"3309" -u"root" -p"root_root" -R "tswldb" > ::"%~dp0tswldb_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
::echo 备份mysql(tswldb)结束
|
||||
|
||||
::echo ================
|
||||
|
||||
::echo 开始备份mysql(syhd)
|
||||
::if exist "%~dp0syhd_%yy%%mm%%dd%.sql" del "%~dp0syhd_%yy%%mm%%dd%.sql"
|
||||
::"%mysqldump%" --default-character-set=utf8 --opt --lock-all-tables -x -h"localhost" -P"3309" -u"root" -p"root_root" -R "syhd" > "%~dp0syhd_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
::echo 备份mysql(syhd)结束
|
||||
|
||||
::echo ================
|
||||
|
||||
::echo 开始备份mysql(game_db)
|
||||
::if exist "%~dp0game_db_localhost_%yy%%mm%%dd%.sql" del "%~dp0game_db_localhost_%yy%%mm%%dd%.sql"
|
||||
::"%mysql%" -h"localhost" -P"3309" -u"root" -p"root_root" -e"truncate table player_grade" game_db
|
||||
::"%mysqldump%" --default-character-set=utf8 --opt --lock-all-tables -x -h"localhost" -P"3309" -u"root" -p"root_root" -R "game_db" > "%~dp0game_db_localhost_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
::echo 备份mysql(game_db)结束
|
||||
|
||||
::echo ================
|
||||
|
||||
::echo 开始备份mysql(member)
|
||||
::if exist "%~dp0member_%yy%%mm%%dd%.sql" del "%~dp0youlehudong_%yy%%mm%%dd%.sql"
|
||||
::"%mysqldump%" --default-character-set=utf8 --opt --lock-all-tables -x -h"localhost" -P"3309" -u"root" -p"root_root" -R "member" > "%~dp0member_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
::echo 备份mysql(member)结束
|
||||
|
||||
::echo ================
|
||||
|
||||
::echo 开始备份mysql(tryout)
|
||||
::if exist "%~dp0tryout_%yy%%mm%%dd%.sql" del "%~dp0youlehudong_%yy%%mm%%dd%.sql"
|
||||
::"%mysqldump%" --default-character-set=utf8 --opt --lock-all-tables -x -h"localhost" -P"3309" -u"root" -p"root_root" -R "tryout" > "%~dp0tryout_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
::echo 备份mysql(tryout)结束
|
||||
|
||||
::echo ================
|
||||
|
||||
::echo 开始备份mysql(dkb)
|
||||
::if exist "%~dp0dkb_%yy%%mm%%dd%.sql" del "%~dp0youlehudong_%yy%%mm%%dd%.sql"
|
||||
::"%mysqldump%" --default-character-set=utf8 --opt --lock-all-tables -x -h"localhost" -P"3309" -u"root" -p"root_root" -R "dkb" > "%~dp0dkb_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
::echo 备份mysql(dkb)结束
|
||||
|
||||
::echo ================
|
||||
|
||||
::echo 开始备份mysql(youlehudong)
|
||||
::if exist "%~dp0youlehudong_%yy%%mm%%dd%.sql" del "%~dp0youlehudong_%yy%%mm%%dd%.sql"
|
||||
::"%mysqldump%" --default-character-set=utf8 --opt --lock-all-tables -x -h"rm-wz978o3vha6z26m5no.mysql.rds.aliyuncs.com" -P"3306" -u"tswl_2015" -p"tswl_2015" -R "youlehudong" > "%~dp0youlehudong_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
::echo 备份mysql(youlehudong)结束
|
||||
|
||||
echo ================
|
||||
|
||||
echo 开始备份mysql(game_db)
|
||||
"%mysql%" -h"rm-wz978o3vha6z26m5no.mysql.rds.aliyuncs.com" -P"3306" -u"yunuser" -p"Yun_User" -e"truncate table player_grade" game_db
|
||||
"%mysql%" -h"rm-wz978o3vha6z26m5no.mysql.rds.aliyuncs.com" -P"3306" -u"yunuser" -p"Yun_User" -e"truncate table coin_rebate" game_db
|
||||
if exist "%~dp0game_db_%yy%%mm%%dd%.sql" del "%~dp0game_db_%yy%%mm%%dd%.sql"
|
||||
"%mysqldump%" --default-character-set=utf8 --opt --lock-all-tables -x -h"rm-wz978o3vha6z26m5no.mysql.rds.aliyuncs.com" -P"3306" -u"tswl_2015" -p"tswl_2015" -R game_db > "%~dp0game_db_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
echo 备份mysql(game_db)结束
|
||||
|
||||
echo ================
|
||||
|
||||
::: 压缩备份文件
|
||||
::%~d0
|
||||
::cd "%~dp0"
|
||||
::if exist "%~dp0database_%yy%%mm%%dd%.rar" del "%~dp0database_%yy%%mm%%dd%.rar"
|
||||
::"%winrar%" a "database_%date:~0,4%%date:~5,2%%date:~8,2%.rar" "dbcenter_%date:~0,4%%date:~5,2%%date:~8,2%.dmp" "dbcenter_%date:~0,4%%date:~5,2%%date:~8,2%.log" "tswldb_%date:~0,4%%date:~5,2%%date:~8,2%.sql" "syhd_%date:~0,4%%date:~5,2%%date:~8,2%.sql" "game_db_localhost_%date:~0,4%%date:~5,2%%date:~8,2%.sql" "youlehudong_%date:~0,4%%date:~5,2%%date:~8,2%.sql" "game_db_%date:~0,4%%date:~5,2%%date:~8,2%.sql" "member_%date:~0,4%%date:~5,2%%date:~8,2%.sql" "tryout_%date:~0,4%%date:~5,2%%date:~8,2%.sql" "dkb_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
::if %needupload% NEQ 0 (
|
||||
:: ::: 上传压缩文件
|
||||
:: "%~dp0NetworkTool.x64.exe" -st "2" -rt "2" -hn "120.76.157.63" -hp "80" -on "/dbbackup/upload.php" -rd "/" -rf "database_%date:~0,4%%date:~5,2%%date:~8,2%.rar" -lf "%~dp0database_%date:~0,4%%date:~5,2%%date:~8,2%.rar"
|
||||
:: ::: 删除压缩文件
|
||||
:: :::del "database_%date:~0,4%%date:~5,2%%date:~8,2%.rar"
|
||||
::)
|
||||
|
||||
::: 删除备份的文件
|
||||
if exist "%~dp0dbcenter_%date:~0,4%%date:~5,2%%date:~8,2%.dmp" del "%~dp0dbcenter_%date:~0,4%%date:~5,2%%date:~8,2%.dmp"
|
||||
if exist "%~dp0dbcenter_%date:~0,4%%date:~5,2%%date:~8,2%.log" del "%~dp0dbcenter_%date:~0,4%%date:~5,2%%date:~8,2%.log"
|
||||
if exist "%~dp0tswldb_%date:~0,4%%date:~5,2%%date:~8,2%.sql" del "%~dp0tswldb_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
if exist "%~dp0syhd_%date:~0,4%%date:~5,2%%date:~8,2%.sql" del "%~dp0syhd_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
if exist "%~dp0game_db_localhost_%date:~0,4%%date:~5,2%%date:~8,2%.sql" del "%~dp0game_db_localhost_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
if exist "%~dp0youlehudong_%date:~0,4%%date:~5,2%%date:~8,2%.sql" del "%~dp0youlehudong_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
if exist "%~dp0game_db_%date:~0,4%%date:~5,2%%date:~8,2%.sql" del "%~dp0game_db_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
if exist "%~dp0member_%date:~0,4%%date:~5,2%%date:~8,2%.sql" del "%~dp0member_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
if exist "%~dp0tryout_%date:~0,4%%date:~5,2%%date:~8,2%.sql" del "%~dp0tryout_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
if exist "%~dp0dkb_%date:~0,4%%date:~5,2%%date:~8,2%.sql" del "%~dp0dkb_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
|
||||
::: 备份完毕
|
||||
:exit
|
||||
|
||||
::: 恢复同步服务
|
||||
::"%~dp0CallerService.exe" -start
|
||||
net start CallerService
|
||||
|
||||
echo on
|
||||
@@ -1,220 +0,0 @@
|
||||
echo off
|
||||
echo %date% %time%
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::: ͬ<><CDAC>ս<EFBFBD><D5BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
:sync_recorddata
|
||||
|
||||
:init
|
||||
::: ֹͣͬ<D6B9><CDAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
::"%~dp0CallerService.exe" -stop
|
||||
net stop CallerService
|
||||
|
||||
::: mysql<71><6C><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>ȫ<EFBFBD><C8AB>
|
||||
set ExportBinary="C:\webroot\dbbackup\mysql\mysqldump.exe"
|
||||
::: mysql<71><6C><EFBFBD>빤<EFBFBD><EBB9A4><EFBFBD>ļ<EFBFBD>ȫ<EFBFBD><C8AB>
|
||||
set ImportBinary="C:\webroot\dbbackup\mysql\mysql.exe"
|
||||
|
||||
|
||||
::: <20><>Ϸ<EFBFBD><CFB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
set Hostname_base="rm-bp1x3i28se22s9z75o.mysql.rds.aliyuncs.com"
|
||||
set Hostport_base="3306"
|
||||
set Username_base="games"
|
||||
set Password_base="Games2017@)!&"
|
||||
set Database_base="game_db"
|
||||
set ExportTable_base=player
|
||||
|
||||
::: <20><>Ϸս<CFB7><D5BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
set Hostname_record="rr-bp1x2415jy37d8mu1o.mysql.rds.aliyuncs.com"
|
||||
set Hostport_record="3306"
|
||||
set Username_record="games"
|
||||
set Password_record="Games2017@)!%&"
|
||||
set Database_record="game_db"
|
||||
set ExportTable_record=player_grade,gold_account
|
||||
|
||||
::: <20><>̨<EFBFBD><CCA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
set Hostname_owner="rm-wz978o3vha6z26m5no.mysql.rds.aliyuncs.com"
|
||||
set Hostport_owner="3306"
|
||||
set Username_owner="yunuser"
|
||||
set Password_owner="Yun_User"
|
||||
set Database_owner="game_db"
|
||||
set Database_owner_temp="game_db_temp"
|
||||
|
||||
::: <20><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
set Hostname_temp="localhost"
|
||||
set Hostport_temp="3309"
|
||||
set Username_temp="root"
|
||||
set Password_temp="root_root"
|
||||
set Database_temp="game_db"
|
||||
set Database_temp_temp="game_db_temp"
|
||||
|
||||
::: <20>Ƿ<EFBFBD><C7B7><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD>浽<EFBFBD><E6B5BD>ʱ<EFBFBD><CAB1>
|
||||
set NeedSaveToTemp=0
|
||||
|
||||
::: Ҫִ<D2AA>еĽű<C4BD>
|
||||
set ExecuteCommand_1="call cp_SynchronizeSettle();"
|
||||
:::::::::::::: <20><><EFBFBD>뵼<EFBFBD><EBB5BC> -<2D><>ʼ :::::::::::::::::
|
||||
|
||||
|
||||
:::::::::::::: <20><><EFBFBD>뵼<EFBFBD><EBB5BC> - <20><><EFBFBD><EFBFBD> :::::::::::::::::
|
||||
|
||||
:synchronize
|
||||
echo ִ<>нű<D0BD>%ExecuteCommand_1%
|
||||
%ImportBinary% -h%Hostname_owner% -P%Hostport_owner% -u%Username_owner% -p%Password_owner% -e%ExecuteCommand_1% %Database_owner%
|
||||
if %errorlevel% neq 0 goto exit_recorddata
|
||||
echo <20>ű<EFBFBD>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::: ͬ<><CDAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
:sync_reportdata
|
||||
::: ts<74><73><EFBFBD><EFBFBD>2021 xpxman
|
||||
:::echo <20><>ʼͬ<CABC><CDAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(https://dlapi.tscce.cn/ext/SynchronizeReportData.php)
|
||||
:::"%~dp0HttpRequest.x64.exe" -type post -address "https://dlapi.tscce.cn/ext/SynchronizeReportData.php" -parameter "" -interval 1000 -thread 1 -loop 0 >> "%~dp0debug.txt"
|
||||
:::echo <20><>ʼ<EFBFBD><CABC><EFBFBD>ɱ<EFBFBD><C9B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(https://dlapi.tscce.cn/ext/autotask.php)
|
||||
:::"%~dp0HttpRequest.x64.exe" -type post -address "https://dlapi.tscce.cn/ext/autotask.php" -parameter "" -interval 1000 -thread 1 -loop 0 >> "%~dp0debug.txt"
|
||||
|
||||
echo <20><>ʼͬ<CABC><CDAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>daoqijuyou77.cnlapi.daoqijuyou.cn/ext/SynchronizeReportData.php)
|
||||
"%~dp0HttpRequest.x64.exe" -type post -address "https://dlapi.daoqijuyou77.cn/ext/SynchronizeReportData.php" -parameter "" -interval 1000 -thread 1 -loop 0 >> "%~dp0debug.txt"
|
||||
echo <20><>ʼ<EFBFBD><CABC><EFBFBD>ɱ<EFBFBD><C9B1><EFBFBD><EFBFBD>daoqijuyou77.cnlapi.daoqijuyou.cn/ext/autotask.php)
|
||||
"%~dp0HttpRequest.x64.exe" -type post -address "https://dlapi.daoqijuyou77.cn/ext/autotask.php" -parameter "" -interval 1000 -thread 1 -loop 0 >> "%~dp0debug.txt"
|
||||
|
||||
|
||||
|
||||
|
||||
:exit_reportdata
|
||||
echo %date% %time%
|
||||
|
||||
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD>
|
||||
:backup_database
|
||||
for /f "tokens=1-3 delims=/-, " %%a in ('echo/%date%') do (
|
||||
set yy=%%a & set mm=%%b & set dd=%%c
|
||||
)
|
||||
set /a dd=100%dd%%%100,mm=100%mm%%%100
|
||||
set /a z=14-mm,z/=12,y=yy+4800-z,m=mm+12*z-3,j=153*m+2
|
||||
set /a j=j/5+dd+y*365+y/4-y/100+y/400-2472633
|
||||
|
||||
set /a j=j-7
|
||||
|
||||
set /a i=j,a=i+2472632,b=4*a+3,b/=146097,c=-b*146097,c/=4,c+=a
|
||||
set /a d=4*c+3,d/=1461,e=-1461*d,e/=4,e+=c,m=5*e+2,m/=153,dd=153*m+2,dd/=5
|
||||
set /a dd=-dd+e+1,mm=-m/10,mm*=12,mm+=m+3,yy=b*100+d-4800+m/10
|
||||
(if %mm% LSS 10 set mm=0%mm%)&(if %dd% LSS 10 set dd=0%dd%)
|
||||
|
||||
set fdate=%yy%-%mm%-%dd%
|
||||
echo %fdate%
|
||||
|
||||
set mysqldump=C:\xampp\mysql\bin\mysqldump.exe
|
||||
set mysql=C:\xampp\mysql\bin\mysql.exe
|
||||
set winrar=C:\Program Files\WinRAR\rar.exe
|
||||
set needupload=0
|
||||
|
||||
::echo ================
|
||||
|
||||
::echo <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>oracle(dbcenter)
|
||||
::if exist "%~dp0dbcenter_%yy%%mm%%dd%.dmp" del "%~dp0dbcenter_%yy%%mm%%dd%.dmp"
|
||||
::if exist "%~dp0dbcenter_%yy%%mm%%dd%.log" del "%~dp0dbcenter_%yy%%mm%%dd%.log"
|
||||
|
||||
::set NLS_LANG=AMERICAN_AMERICA.AL32UTF8
|
||||
::set ORACLE_HOME=D:\app\kingsoft\virtual\product\12.2.0\dbhome_1
|
||||
::exp '"/ as sysdba"' file="%~dp0dbcenter_%date:~0,4%%date:~5,2%%date:~8,2%.dmp" log="%~dp0dbcenter_%date:~0,4%%date:~5,2%%date:~8,2%.log" grants=y full=y statistics=none
|
||||
::echo <20><><EFBFBD><EFBFBD>oracle(dbcenter)<29><><EFBFBD><EFBFBD>
|
||||
|
||||
::echo ================
|
||||
|
||||
::echo <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>mysql(tswldb)
|
||||
::if exist "%~dp0tswldb_%yy%%mm%%dd%.sql" del "%~dp0tswldb_%yy%%mm%%dd%.sql"
|
||||
::"%mysqldump%" --default-character-set=utf8 --opt --lock-all-tables -x -h"localhost" -P"3309" -u"root" -p"root_root" -R "tswldb" > ::"%~dp0tswldb_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
::echo <20><><EFBFBD><EFBFBD>mysql(tswldb)<29><><EFBFBD><EFBFBD>
|
||||
|
||||
::echo ================
|
||||
|
||||
::echo <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>mysql(syhd)
|
||||
::if exist "%~dp0syhd_%yy%%mm%%dd%.sql" del "%~dp0syhd_%yy%%mm%%dd%.sql"
|
||||
::"%mysqldump%" --default-character-set=utf8 --opt --lock-all-tables -x -h"localhost" -P"3309" -u"root" -p"root_root" -R "syhd" > "%~dp0syhd_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
::echo <20><><EFBFBD><EFBFBD>mysql(syhd)<29><><EFBFBD><EFBFBD>
|
||||
|
||||
::echo ================
|
||||
|
||||
::echo <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>mysql(game_db)
|
||||
::if exist "%~dp0game_db_localhost_%yy%%mm%%dd%.sql" del "%~dp0game_db_localhost_%yy%%mm%%dd%.sql"
|
||||
::"%mysql%" -h"localhost" -P"3309" -u"root" -p"root_root" -e"truncate table player_grade" game_db
|
||||
::"%mysqldump%" --default-character-set=utf8 --opt --lock-all-tables -x -h"localhost" -P"3309" -u"root" -p"root_root" -R "game_db" > "%~dp0game_db_localhost_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
::echo <20><><EFBFBD><EFBFBD>mysql(game_db)<29><><EFBFBD><EFBFBD>
|
||||
|
||||
::echo ================
|
||||
|
||||
::echo <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>mysql(member)
|
||||
::if exist "%~dp0member_%yy%%mm%%dd%.sql" del "%~dp0youlehudong_%yy%%mm%%dd%.sql"
|
||||
::"%mysqldump%" --default-character-set=utf8 --opt --lock-all-tables -x -h"localhost" -P"3309" -u"root" -p"root_root" -R "member" > "%~dp0member_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
::echo <20><><EFBFBD><EFBFBD>mysql(member)<29><><EFBFBD><EFBFBD>
|
||||
|
||||
::echo ================
|
||||
|
||||
::echo <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>mysql(tryout)
|
||||
::if exist "%~dp0tryout_%yy%%mm%%dd%.sql" del "%~dp0youlehudong_%yy%%mm%%dd%.sql"
|
||||
::"%mysqldump%" --default-character-set=utf8 --opt --lock-all-tables -x -h"localhost" -P"3309" -u"root" -p"root_root" -R "tryout" > "%~dp0tryout_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
::echo <20><><EFBFBD><EFBFBD>mysql(tryout)<29><><EFBFBD><EFBFBD>
|
||||
|
||||
::echo ================
|
||||
|
||||
::echo <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>mysql(dkb)
|
||||
::if exist "%~dp0dkb_%yy%%mm%%dd%.sql" del "%~dp0youlehudong_%yy%%mm%%dd%.sql"
|
||||
::"%mysqldump%" --default-character-set=utf8 --opt --lock-all-tables -x -h"localhost" -P"3309" -u"root" -p"root_root" -R "dkb" > "%~dp0dkb_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
::echo <20><><EFBFBD><EFBFBD>mysql(dkb)<29><><EFBFBD><EFBFBD>
|
||||
|
||||
::echo ================
|
||||
|
||||
::echo <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>mysql(youlehudong)
|
||||
::if exist "%~dp0youlehudong_%yy%%mm%%dd%.sql" del "%~dp0youlehudong_%yy%%mm%%dd%.sql"
|
||||
::"%mysqldump%" --default-character-set=utf8 --opt --lock-all-tables -x -h"rm-wz978o3vha6z26m5no.mysql.rds.aliyuncs.com" -P"3306" -u"tswl_2015" -p"tswl_2015" -R "youlehudong" > "%~dp0youlehudong_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
::echo <20><><EFBFBD><EFBFBD>mysql(youlehudong)<29><><EFBFBD><EFBFBD>
|
||||
|
||||
echo ================
|
||||
|
||||
echo <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>mysql(game_db)
|
||||
"%mysql%" -h"rm-wz978o3vha6z26m5no.mysql.rds.aliyuncs.com" -P"3306" -u"yunuser" -p"Yun_User" -e"truncate table player_grade" game_db
|
||||
"%mysql%" -h"rm-wz978o3vha6z26m5no.mysql.rds.aliyuncs.com" -P"3306" -u"yunuser" -p"Yun_User" -e"truncate table coin_rebate" game_db
|
||||
if exist "%~dp0game_db_%yy%%mm%%dd%.sql" del "%~dp0game_db_%yy%%mm%%dd%.sql"
|
||||
"%mysqldump%" --default-character-set=utf8 --opt --lock-all-tables -x -h"rm-wz978o3vha6z26m5no.mysql.rds.aliyuncs.com" -P"3306" -u"tswl_2015" -p"tswl_2015" -R game_db > "%~dp0game_db_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
echo <20><><EFBFBD><EFBFBD>mysql(game_db)<29><><EFBFBD><EFBFBD>
|
||||
|
||||
echo ================
|
||||
|
||||
::: ѹ<><D1B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
|
||||
::%~d0
|
||||
::cd "%~dp0"
|
||||
::if exist "%~dp0database_%yy%%mm%%dd%.rar" del "%~dp0database_%yy%%mm%%dd%.rar"
|
||||
::"%winrar%" a "database_%date:~0,4%%date:~5,2%%date:~8,2%.rar" "dbcenter_%date:~0,4%%date:~5,2%%date:~8,2%.dmp" "dbcenter_%date:~0,4%%date:~5,2%%date:~8,2%.log" "tswldb_%date:~0,4%%date:~5,2%%date:~8,2%.sql" "syhd_%date:~0,4%%date:~5,2%%date:~8,2%.sql" "game_db_localhost_%date:~0,4%%date:~5,2%%date:~8,2%.sql" "youlehudong_%date:~0,4%%date:~5,2%%date:~8,2%.sql" "game_db_%date:~0,4%%date:~5,2%%date:~8,2%.sql" "member_%date:~0,4%%date:~5,2%%date:~8,2%.sql" "tryout_%date:~0,4%%date:~5,2%%date:~8,2%.sql" "dkb_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
::if %needupload% NEQ 0 (
|
||||
:: ::: <20>ϴ<EFBFBD>ѹ<EFBFBD><D1B9><EFBFBD>ļ<EFBFBD>
|
||||
:: "%~dp0NetworkTool.x64.exe" -st "2" -rt "2" -hn "120.76.157.63" -hp "80" -on "/dbbackup/upload.php" -rd "/" -rf "database_%date:~0,4%%date:~5,2%%date:~8,2%.rar" -lf "%~dp0database_%date:~0,4%%date:~5,2%%date:~8,2%.rar"
|
||||
:: ::: ɾ<><C9BE>ѹ<EFBFBD><D1B9><EFBFBD>ļ<EFBFBD>
|
||||
:: :::del "database_%date:~0,4%%date:~5,2%%date:~8,2%.rar"
|
||||
::)
|
||||
|
||||
::: ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD>ݵ<EFBFBD><DDB5>ļ<EFBFBD>
|
||||
if exist "%~dp0dbcenter_%date:~0,4%%date:~5,2%%date:~8,2%.dmp" del "%~dp0dbcenter_%date:~0,4%%date:~5,2%%date:~8,2%.dmp"
|
||||
if exist "%~dp0dbcenter_%date:~0,4%%date:~5,2%%date:~8,2%.log" del "%~dp0dbcenter_%date:~0,4%%date:~5,2%%date:~8,2%.log"
|
||||
if exist "%~dp0tswldb_%date:~0,4%%date:~5,2%%date:~8,2%.sql" del "%~dp0tswldb_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
if exist "%~dp0syhd_%date:~0,4%%date:~5,2%%date:~8,2%.sql" del "%~dp0syhd_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
if exist "%~dp0game_db_localhost_%date:~0,4%%date:~5,2%%date:~8,2%.sql" del "%~dp0game_db_localhost_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
if exist "%~dp0youlehudong_%date:~0,4%%date:~5,2%%date:~8,2%.sql" del "%~dp0youlehudong_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
if exist "%~dp0game_db_%date:~0,4%%date:~5,2%%date:~8,2%.sql" del "%~dp0game_db_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
if exist "%~dp0member_%date:~0,4%%date:~5,2%%date:~8,2%.sql" del "%~dp0member_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
if exist "%~dp0tryout_%date:~0,4%%date:~5,2%%date:~8,2%.sql" del "%~dp0tryout_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
if exist "%~dp0dkb_%date:~0,4%%date:~5,2%%date:~8,2%.sql" del "%~dp0dkb_%date:~0,4%%date:~5,2%%date:~8,2%.sql"
|
||||
|
||||
::: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
:exit
|
||||
|
||||
::: <20>ָ<EFBFBD>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
::"%~dp0CallerService.exe" -start
|
||||
net start CallerService
|
||||
|
||||
echo on
|
||||
@@ -1,107 +0,0 @@
|
||||
echo off
|
||||
echo %date% %time%
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::: 同步战绩数据
|
||||
:sync_recorddata
|
||||
|
||||
:init
|
||||
::: 停止同步服务
|
||||
::"%~dp0CallerService.exe" -stop
|
||||
::net stop CallerService
|
||||
::net stop HttpRequestService
|
||||
|
||||
::: mysql导出工具文件全名
|
||||
set ExportBinary="C:\webroot\dbbackup\mysql\mysqldump.exe"
|
||||
::: mysql导入工具文件全名
|
||||
set ImportBinary="C:\webroot\dbbackup\mysql\mysql.exe"
|
||||
|
||||
|
||||
::: 游戏基础信息服务器配置
|
||||
set Hostname_base="rm-bp1x3i28se22s9z75o.mysql.rds.aliyuncs.com"
|
||||
set Hostport_base="3306"
|
||||
set Username_base="games"
|
||||
set Password_base="Games2017@)!&"
|
||||
set Database_base="game_db"
|
||||
set ExportTable_base=player
|
||||
|
||||
::: 游戏战绩服务器配置
|
||||
set Hostname_record="rr-bp1x2415jy37d8mu1o.mysql.rds.aliyuncs.com"
|
||||
set Hostport_record="3306"
|
||||
set Username_record="games"
|
||||
set Password_record="Games2017@)!&"
|
||||
set Database_record="game_db"
|
||||
set ExportTable_record=player_grade,gold_account
|
||||
|
||||
::: 后台服务器配置
|
||||
set Hostname_owner="rm-wz978o3vha6z26m5no.mysql.rds.aliyuncs.com"
|
||||
set Hostport_owner="3306"
|
||||
set Username_owner="yunuser"
|
||||
set Password_owner="Yun_User"
|
||||
set Database_owner="game_db"
|
||||
set Database_owner_temp="game_db_temp"
|
||||
|
||||
::: 临时服务器配置
|
||||
set Hostname_temp="localhost"
|
||||
set Hostport_temp="3309"
|
||||
set Username_temp="root"
|
||||
set Password_temp="root_root"
|
||||
set Database_temp="game_db"
|
||||
set Database_temp_temp="game_db_temp"
|
||||
|
||||
::: 是否需要保存到临时库
|
||||
set NeedSaveToTemp=0
|
||||
|
||||
::: 要执行的脚本
|
||||
set ExecuteCommand_1="call cp_SynchronizeSettle();"
|
||||
|
||||
::: 保证脚本输出目录一定存在
|
||||
if not exist "%~dp0script" md "%~dp0script"
|
||||
|
||||
::: 要导出的脚本文件名的前缀(后面还会加上表名)
|
||||
set ScriptnamePrefix=%~dp0script\%date:~0,4%%date:~5,2%%date:~8,2%
|
||||
|
||||
::: 判断脚本是否存在, 存在则删除
|
||||
::if exist %Scriptname% del %Scriptname%
|
||||
|
||||
:export
|
||||
echo 开始导出游戏基础信息脚本
|
||||
for %%t in (%ExportTable_base%) do (
|
||||
::: 判断脚本是否存在, 存在则删除
|
||||
if exist "%ScriptnamePrefix%_base_%%t.sql" del "%ScriptnamePrefix%_base_%%t.sql"
|
||||
|
||||
::: 循环导出脚本
|
||||
echo 导出表%%t到%ScriptnamePrefix%_base_%%t.sql
|
||||
%ExportBinary% --default-character-set=utf8 --opt -h%Hostname_base% -P%Hostport_base% -u%Username_base% -p%Password_base% %Database_base% %%t > "%ScriptnamePrefix%_base_%%t.sql"
|
||||
if %errorlevel% neq 0 goto exit_recorddata
|
||||
)
|
||||
echo 游戏基础信息脚本导出完成
|
||||
|
||||
echo 开始导出游戏战绩脚本
|
||||
for %%t in (%ExportTable_record%) do (
|
||||
::: 判断脚本是否存在, 存在则删除
|
||||
if exist "%ScriptnamePrefix%_record_%%t.sql" del "%ScriptnamePrefix%_record_%%t.sql"
|
||||
|
||||
::: 循环导出脚本
|
||||
echo 导出表%%t到%ScriptnamePrefix%_record_%%t.sql
|
||||
%ExportBinary% --default-character-set=utf8 --opt -h%Hostname_record% -P%Hostport_record% -u%Username_record% -p%Password_record% %Database_record% %%t > "%ScriptnamePrefix%_record_%%t.sql"
|
||||
if %errorlevel% neq 0 goto exit_recorddata
|
||||
)
|
||||
echo 游戏战绩脚本导出完成
|
||||
|
||||
:import
|
||||
echo 开始导入游戏基础信息脚本
|
||||
for %%t in (%ExportTable_base%) do (
|
||||
echo 从%ScriptnamePrefix%_base_%%t.sql导入表%%t
|
||||
%ImportBinary% --default-character-set=utf8 -h%Hostname_owner% -P%Hostport_owner% -u%Username_owner% -p%Password_owner% %Database_owner_temp% < "%ScriptnamePrefix%_base_%%t.sql"
|
||||
if %errorlevel% neq 0 goto exit_recorddata
|
||||
)
|
||||
echo 游戏基础信息脚本导入完成
|
||||
|
||||
echo 开始导入游戏战绩脚本
|
||||
for %%t in (%ExportTable_record%) do (
|
||||
echo 从%ScriptnamePrefix%_record_%%t.sql导入表%%t
|
||||
%ImportBinary% --default-character-set=utf8 -h%Hostname_owner% -P%Hostport_owner% -u%Username_owner% -p%Password_owner% %Database_owner_temp% < "%ScriptnamePrefix%_record_%%t.sql"
|
||||
if %errorlevel% neq 0 goto exit_recorddata
|
||||
)
|
||||
echo 游戏战绩脚本导入完成
|
||||
::net start HttpRequestService
|
||||
@@ -1,46 +0,0 @@
|
||||
for %%p in (
|
||||
2018-09-01,
|
||||
2018-09-02,
|
||||
2018-09-03,
|
||||
2018-09-04,
|
||||
2018-09-05,
|
||||
2018-09-06,
|
||||
2018-09-07,
|
||||
2018-09-08,
|
||||
2018-09-09,
|
||||
2018-09-10,
|
||||
2018-09-11,
|
||||
2018-09-12,
|
||||
2018-09-13,
|
||||
2018-09-14,
|
||||
2018-09-15,
|
||||
2018-09-16,
|
||||
2018-09-17,
|
||||
2018-09-18,
|
||||
2018-09-19,
|
||||
2018-09-20,
|
||||
2018-09-21,
|
||||
2018-09-22,
|
||||
2018-09-23,
|
||||
2018-09-24,
|
||||
2018-09-25,
|
||||
2018-09-26,
|
||||
2018-09-27,
|
||||
2018-09-28,
|
||||
2018-09-29,
|
||||
2018-09-30
|
||||
) do (
|
||||
::"%~dp0HttpRequest.x64.exe" -type post -address "https://dlapi.tscce.cn/ext/autotask.php" -parameter "sync_date=%%p" -interval 1000 -thread 1 -loop 0
|
||||
"C:\webroot\dbbackup\mysql\mysql.exe" -h"rm-wz978o3vha6z26m5no.mysql.rds.aliyuncs.com" -P"3306" -u"yunuser" -p"Yun_User" -e"call ct_CreateGoldBalanceData('%%p')" "game_db"
|
||||
)
|
||||
pause
|
||||
exit
|
||||
|
||||
truncate table ct_report_player_room_open;
|
||||
truncate table ct_report_player_roomcard_use;
|
||||
truncate table ct_report_player_roomcard_record;
|
||||
truncate table ct_report_player_star_record;
|
||||
truncate table ct_report_player_buy_record;
|
||||
truncate table ct_report_sales_roomcard_buy;
|
||||
truncate table ct_report_sales_charge_record;
|
||||
truncate table ct_report_sales_login_record;
|
||||
@@ -1201,6 +1201,9 @@ mod_zpy.jiesanjiesuan = function(o_room){
|
||||
var o_desk = o_room.o_desk;
|
||||
|
||||
var paiju = o_desk.method.CurrAset();
|
||||
if (!paiju.leixing) {
|
||||
paiju.leixing = o_room.roomtype;
|
||||
}
|
||||
paiju.pysx = 1;
|
||||
//控制权
|
||||
paiju.kongzhiquan = -2;
|
||||
|
||||
11406
codes/games/sql/game/db/agent_db.sql
Normal file
11406
codes/games/sql/game/db/agent_db.sql
Normal file
File diff suppressed because it is too large
Load Diff
644
codes/games/sql/game/db/agent_db_temp.sql
Normal file
644
codes/games/sql/game/db/agent_db_temp.sql
Normal file
@@ -0,0 +1,644 @@
|
||||
/*
|
||||
Navicat Premium Dump SQL
|
||||
|
||||
Source Server : agent
|
||||
Source Server Type : MySQL
|
||||
Source Server Version : 80036 (8.0.36)
|
||||
Source Host : rm-bp1btyuwq77591x0jpo.mysql.rds.aliyuncs.com:3306
|
||||
Source Schema : agent_db_temp
|
||||
|
||||
Target Server Type : MySQL
|
||||
Target Server Version : 80036 (8.0.36)
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 15/03/2026 19:31:42
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for gold_account
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `gold_account`;
|
||||
CREATE TABLE `gold_account` (
|
||||
`idx` int NOT NULL AUTO_INCREMENT,
|
||||
`goac_id` varchar(23) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT 'id,时间戳+房号+4位随机码',
|
||||
`goac_agentid` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '代理商id',
|
||||
`goac_gameid` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '游戏id',
|
||||
`goac_roomcode` int NOT NULL COMMENT '房间号',
|
||||
`goac_roommode` tinyint(1) NOT NULL COMMENT '0-星星场玩家房间 1-星星场系统房间 2-非星星场(星星限进)',
|
||||
`goac_createtime` datetime NOT NULL COMMENT '房间的创建时间',
|
||||
`goac_beanmult` int NOT NULL COMMENT '倍数',
|
||||
`goac_ownerid` int NULL DEFAULT NULL COMMENT '房主的玩家id',
|
||||
`goac_shortcode` int NULL DEFAULT NULL COMMENT '短号',
|
||||
`goac_deduct` tinyint(1) NULL DEFAULT NULL COMMENT '0-房主扣卡 1-每人扣卡 2-大赢家扣卡',
|
||||
`goac_roomcard` int NULL DEFAULT NULL COMMENT '扣的房卡数量',
|
||||
`goac_datatype` tinyint(1) NOT NULL COMMENT '0-大局结算数据 1-小局结算数据',
|
||||
`goac_asetcount` int NULL DEFAULT NULL COMMENT '总局数',
|
||||
`goac_asetnum` int NULL DEFAULT NULL COMMENT '当前小局号,从1开始计数',
|
||||
`goac_playerid` int NULL DEFAULT NULL COMMENT '玩家id',
|
||||
`goac_isrobot` tinyint(1) NULL DEFAULT 0 COMMENT '0-真实玩家 1-机器人',
|
||||
`goac_grade` int NOT NULL COMMENT '玩家得分',
|
||||
`goac_rebatefrom` tinyint(1) NOT NULL COMMENT '0-不抽成 1-对大赢家进行抽成 2-对所有赢家抽成 3-对所有玩家抽成',
|
||||
`goac_rebateto` tinyint(1) NULL DEFAULT NULL COMMENT '0-抽成给系统 1-抽成给房主 2-抽成给指定玩家 3-抽成给指定玩家的代理账号',
|
||||
`goac_toplayerid` int NULL DEFAULT NULL COMMENT '抽成给到的玩家id',
|
||||
`goac_rebatemode` tinyint(1) NULL DEFAULT NULL COMMENT '1-按得分的百分比抽成 2-按倍数的百分比抽成 3-按固定值抽成',
|
||||
`goac_setvalue` int NULL DEFAULT NULL COMMENT '抽成设置的值',
|
||||
`goac_rebatevalue` int NULL DEFAULT NULL COMMENT '实际抽成数量',
|
||||
`goac_time` datetime NOT NULL COMMENT '发生时间',
|
||||
`goac_state` tinyint(1) NULL DEFAULT 0 COMMENT '代理后台处理状态 0:未处理 1:已处理',
|
||||
`goac_statetime` datetime NULL DEFAULT NULL COMMENT '代理后台处理时间',
|
||||
`goac_invitecode` int NULL DEFAULT NULL,
|
||||
`goac_inviteid` int NULL DEFAULT NULL,
|
||||
`goac_marketid` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
|
||||
`goac_i1` int NULL DEFAULT NULL,
|
||||
`goac_i2` int NULL DEFAULT NULL,
|
||||
`goac_i3` int NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`idx`) USING BTREE,
|
||||
INDEX `gold_account_index2`(`goac_agentid` ASC, `goac_playerid` ASC) USING BTREE,
|
||||
INDEX `gold_account_index1`(`goac_id` ASC) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 18149691 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '金币变动表' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for player
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `player`;
|
||||
CREATE TABLE `player` (
|
||||
`idx` int NOT NULL AUTO_INCREMENT,
|
||||
`play_agentid` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '代理商id',
|
||||
`play_playerid` int NOT NULL COMMENT '玩家id',
|
||||
`play_channelid` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
|
||||
`play_openid` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '微信openid',
|
||||
`play_unionid` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '微信unionid',
|
||||
`play_nickname` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '玩家昵称',
|
||||
`play_avatar` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '头像',
|
||||
`play_sex` tinyint(1) NULL DEFAULT NULL COMMENT '性别',
|
||||
`play_province` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '省',
|
||||
`play_city` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '城市',
|
||||
`play_roomcard` int NULL DEFAULT 8 COMMENT '房卡数量',
|
||||
`play_bean` int NULL DEFAULT 0 COMMENT '金币',
|
||||
`play_regtime` datetime NOT NULL COMMENT '注册时间',
|
||||
`play_lasttime` datetime NOT NULL COMMENT '最后登录时间',
|
||||
`play_logindate` int NULL DEFAULT 1 COMMENT '累积登录天数',
|
||||
`play_usecard` int NULL DEFAULT 0 COMMENT '累积使用房卡数量',
|
||||
`play_taskaward` int NULL DEFAULT 0 COMMENT '累积任务奖励房卡数量',
|
||||
`play_type` tinyint(1) NULL DEFAULT 0 COMMENT '用户类型 0:普通用户 1:vip开房不扣房卡',
|
||||
`play_score` int NULL DEFAULT 0,
|
||||
`play_a_country` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
|
||||
`play_a_province` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
|
||||
`play_a_city` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
|
||||
`play_a_citycode` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
|
||||
`play_a_district` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
|
||||
`play_a_street` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
|
||||
`play_a_address` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
|
||||
`play_longitude` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
|
||||
`play_latitude` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
|
||||
`play_invitecode` int NULL DEFAULT NULL,
|
||||
`play_inviteid` int NULL DEFAULT NULL,
|
||||
`play_state` tinyint(1) NULL DEFAULT 0,
|
||||
`play_advanced` tinyint NULL DEFAULT 0,
|
||||
`play_shortcode` int NULL DEFAULT NULL,
|
||||
`play_roomcodes` varchar(4000) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
|
||||
`play_desone` varchar(400) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
|
||||
`play_destwo` varchar(400) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
|
||||
`play_whitelist` varchar(6000) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
|
||||
`play_limit` int NULL DEFAULT NULL,
|
||||
`play_notice` varchar(400) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
|
||||
`play_bankpower` tinyint(1) NULL DEFAULT 1,
|
||||
`play_bank` int NULL DEFAULT 0,
|
||||
`play_bankpwd` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
|
||||
`play_tel` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
|
||||
`play_wechat` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
|
||||
`play_marketid` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
|
||||
`play_phoneinfo` varchar(8000) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
|
||||
`play_sign` varchar(400) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`idx`) USING BTREE,
|
||||
UNIQUE INDEX `player_index2`(`play_agentid` ASC, `play_unionid` ASC) USING BTREE,
|
||||
UNIQUE INDEX `player_index1`(`play_agentid` ASC, `play_playerid` ASC) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 136111 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '玩家表' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for player_grade
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `player_grade`;
|
||||
CREATE TABLE `player_grade` (
|
||||
`idx` int NOT NULL AUTO_INCREMENT,
|
||||
`plgr_agentid` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '代理商id',
|
||||
`plgr_playerid` int NOT NULL COMMENT '玩家id',
|
||||
`plgr_gameid` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '游戏id',
|
||||
`plgr_roomcode` int NOT NULL COMMENT '房号',
|
||||
`plgr_ownerid` int NULL DEFAULT NULL COMMENT '房主id',
|
||||
`plgr_roomtype` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '房间类型',
|
||||
`plgr_createtime` datetime NOT NULL COMMENT '开房时间',
|
||||
`plgr_makewartime` datetime NOT NULL COMMENT '开战时间',
|
||||
`plgr_overtime` datetime NOT NULL COMMENT '结束时间',
|
||||
`plgr_roomcard` int NULL DEFAULT NULL,
|
||||
`plgr_ownercard` int NULL DEFAULT NULL,
|
||||
`plgr_gameinfo1` varchar(10000) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT '' COMMENT '一局游戏的完整数据 json格式',
|
||||
`plgr_gameinfo2` mediumtext CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '一局游戏的完整数据 json格式',
|
||||
`plgr_shortcode` int NULL DEFAULT NULL,
|
||||
`plgr_deducttype` tinyint(1) NULL DEFAULT NULL,
|
||||
`plgr_deductcard` int NULL DEFAULT NULL,
|
||||
`plgr_asetcount` int NULL DEFAULT NULL,
|
||||
`plgr_roommode` tinyint(1) NULL DEFAULT NULL,
|
||||
`plgr_winner` tinyint(1) NOT NULL DEFAULT 0 COMMENT '大赢家',
|
||||
`plgr_score` int NOT NULL DEFAULT 0 COMMENT '得分',
|
||||
PRIMARY KEY (`idx`) USING BTREE,
|
||||
INDEX `player_grade2_index`(`plgr_agentid` ASC, `plgr_playerid` ASC, `plgr_gameid` ASC) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 33678017 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '玩家战绩表' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sales_transferbill
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sales_transferbill`;
|
||||
CREATE TABLE `sales_transferbill` (
|
||||
`idx` int NOT NULL AUTO_INCREMENT,
|
||||
`satr_agentid` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '代理商id',
|
||||
`satr_openid` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '微信openid',
|
||||
`channel_id` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '渠道id',
|
||||
`from_sales` int NULL DEFAULT NULL COMMENT '来源代理号',
|
||||
`satr_salesid` int NOT NULL COMMENT '个人代理id',
|
||||
`satr_amount` int NOT NULL COMMENT '转卡数量',
|
||||
`satr_transfertime` datetime NOT NULL COMMENT '转卡时间',
|
||||
PRIMARY KEY (`idx`) USING BTREE,
|
||||
INDEX `nk_transferbill_agent`(`satr_agentid` ASC, `channel_id` ASC) USING BTREE,
|
||||
INDEX `nk_transferbill_openid`(`satr_agentid` ASC, `channel_id` ASC, `satr_openid` ASC) USING BTREE,
|
||||
INDEX `nk_transferbill_salesid`(`satr_agentid` ASC, `channel_id` ASC, `satr_salesid` ASC) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 18554 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '个人代理转卡记录表' ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sales_user
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sales_user`;
|
||||
CREATE TABLE `sales_user` (
|
||||
`idx` int NOT NULL AUTO_INCREMENT,
|
||||
`user_id` int NULL DEFAULT NULL COMMENT '用户号',
|
||||
`saus_agentid` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '代理商id',
|
||||
`saus_channelid` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
|
||||
`saus_openid` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '微信openid',
|
||||
`saus_unionid` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '微信unionid',
|
||||
`saus_nickname` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '昵称',
|
||||
`saus_avatar` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '头像',
|
||||
`saus_sex` tinyint(1) NULL DEFAULT NULL COMMENT '性别',
|
||||
`saus_province` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '省',
|
||||
`saus_city` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '城市',
|
||||
`saus_firsttime` datetime NOT NULL COMMENT '第一次登登录时间',
|
||||
`saus_lasttime` datetime NOT NULL COMMENT '最后一次登录时间',
|
||||
`saus_salesman` tinyint(1) NULL DEFAULT 0 COMMENT '0:普通用户 1:个人代理',
|
||||
`saus_salesid` int NULL DEFAULT NULL COMMENT '个人代理id',
|
||||
`saus_level` int NULL DEFAULT 0,
|
||||
`saus_parentid` int NULL DEFAULT NULL COMMENT '上级个人代理id',
|
||||
`saus_salestype` tinyint(1) NULL DEFAULT 1,
|
||||
`saus_roomcard` int NULL DEFAULT 0 COMMENT '房卡数量',
|
||||
`saus_bean` decimal(18, 4) NULL DEFAULT 0.0000 COMMENT '金币数',
|
||||
`saus_saletime` datetime NULL DEFAULT NULL COMMENT '成为个人代理时间',
|
||||
`saus_tel` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
|
||||
`saus_wechat` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
|
||||
`saus_invitecode` int NULL DEFAULT NULL,
|
||||
`saus_power` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
|
||||
`saus_pushrate1` int NULL DEFAULT 33,
|
||||
`saus_pushrate2` int NULL DEFAULT 8,
|
||||
`saus_pushmoney1` decimal(10, 2) NULL DEFAULT 0.00,
|
||||
`saus_pushmoney2` decimal(10, 2) NULL DEFAULT 0.00,
|
||||
`saus_status` int NULL DEFAULT 0 COMMENT '0、正常,1、封禁',
|
||||
`password` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '用户密码',
|
||||
`global_power` tinyint(1) NULL DEFAULT 0 COMMENT '0、没有权限,1、有封禁权限',
|
||||
`club_precent` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '俱乐部抽成',
|
||||
`is_send_star` tinyint(1) NULL DEFAULT 0 COMMENT '0、未赠送,1、已赠送',
|
||||
`currency_total` int UNSIGNED NULL DEFAULT 0 COMMENT '总计分成游戏币',
|
||||
`currency_withdraw` int UNSIGNED NULL DEFAULT 0 COMMENT '可提现游戏币',
|
||||
`currency_freeze` int UNSIGNED NULL DEFAULT 0 COMMENT '被冻结的游戏币',
|
||||
`saus_realname` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '真实姓名',
|
||||
`saus_alipay` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '支付宝账户',
|
||||
`saus_kaihu_name` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '开户人姓名',
|
||||
`saus_kaihu_bank` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '开户银行',
|
||||
`saus_kaihu_zhihang` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '开户支行',
|
||||
`saus_kaihu_count` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '银行账号',
|
||||
`saus_commit_auth` int NULL DEFAULT 2 COMMENT '提现权限(1、开启 2、关闭)',
|
||||
`statistic_type` int NULL DEFAULT 0 COMMENT '用户类型(-1:不计入统计口径;0:统计为普通用户口径;1:统计为平台用户口径)',
|
||||
`player_id` int NULL DEFAULT NULL COMMENT '关联的玩家编号',
|
||||
PRIMARY KEY (`idx`) USING BTREE,
|
||||
UNIQUE INDEX `uk_sales_user_id`(`idx` ASC) USING BTREE,
|
||||
UNIQUE INDEX `uk_sales_user_unionid`(`saus_agentid` ASC, `saus_channelid` ASC, `saus_unionid` ASC) USING BTREE,
|
||||
UNIQUE INDEX `uk_sales_user_salesid`(`saus_agentid` ASC, `saus_channelid` ASC, `saus_salesid` ASC) USING BTREE,
|
||||
UNIQUE INDEX `uk_sales_user_playerid`(`saus_agentid` ASC, `saus_channelid` ASC, `player_id` ASC) USING BTREE,
|
||||
UNIQUE INDEX `uk_sales_user_openid`(`saus_agentid` ASC, `saus_channelid` ASC, `saus_openid` ASC) USING BTREE,
|
||||
UNIQUE INDEX `uk_sales_user_userid`(`user_id` ASC) USING BTREE,
|
||||
INDEX `nk_sales_user_salesid`(`saus_agentid` ASC, `saus_channelid` ASC, `saus_salesid` ASC, `saus_openid` ASC, `saus_unionid` ASC, `saus_status` ASC, `password` ASC) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 25297 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '公众号用户表' ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for trans_star_record
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `trans_star_record`;
|
||||
CREATE TABLE `trans_star_record` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`agent_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '代理商id',
|
||||
`channel_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '渠道id',
|
||||
`union_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '微信id',
|
||||
`open_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
|
||||
`send_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发送者id',
|
||||
`get_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '获得者id',
|
||||
`type` tinyint(1) NULL DEFAULT 0 COMMENT '0、转让星星',
|
||||
`amount` int NULL DEFAULT 0 COMMENT '数量',
|
||||
`op_time` datetime NULL DEFAULT NULL COMMENT '操作时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE INDEX `pk_trans_star_record`(`id` ASC) USING BTREE,
|
||||
INDEX `nk_trans_star_record_sales_to`(`agent_id` ASC, `channel_id` ASC, `get_id` ASC) USING BTREE,
|
||||
INDEX `nk_trans_star_record_sales_from`(`agent_id` ASC, `channel_id` ASC, `send_id` ASC) USING BTREE,
|
||||
INDEX `nk_trans_star_record_agent`(`agent_id` ASC, `channel_id` ASC) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 696 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Procedure structure for cp_SynchronizeSettle
|
||||
-- ----------------------------
|
||||
DROP PROCEDURE IF EXISTS `cp_SynchronizeSettle`;
|
||||
delimiter ;;
|
||||
CREATE PROCEDURE `cp_SynchronizeSettle`()
|
||||
SQL SECURITY INVOKER
|
||||
begin
|
||||
declare nErrorCode integer default 0;
|
||||
declare continue handler for sqlexception set nErrorCode = 1;
|
||||
|
||||
start transaction;
|
||||
|
||||
-- 同步战绩数据
|
||||
insert into
|
||||
ct_grade_temp
|
||||
(
|
||||
agent_id,
|
||||
channel_id,
|
||||
game_id,
|
||||
player_id,
|
||||
room_code,
|
||||
room_type,
|
||||
owner_id,
|
||||
room_card,
|
||||
owner_card,
|
||||
create_time,
|
||||
makewar_time,
|
||||
over_time,
|
||||
short_number,
|
||||
deduct_type,
|
||||
deduct_card,
|
||||
aset_count,
|
||||
room_mode,
|
||||
out_id
|
||||
)
|
||||
select
|
||||
plgr_agentid,
|
||||
null,
|
||||
plgr_gameid,
|
||||
plgr_playerid,
|
||||
plgr_roomcode,
|
||||
plgr_roomtype,
|
||||
plgr_ownerid,
|
||||
plgr_roomcard,
|
||||
plgr_ownercard,
|
||||
plgr_createtime,
|
||||
plgr_makewartime,
|
||||
plgr_overtime,
|
||||
plgr_shortcode,
|
||||
plgr_deducttype,
|
||||
plgr_deductcard,
|
||||
plgr_asetcount,
|
||||
plgr_roommode,
|
||||
idx
|
||||
from
|
||||
game_db_temp.player_grade
|
||||
where
|
||||
idx not in (select out_id from ct_grade_temp);
|
||||
|
||||
|
||||
-- 同步并计算分成数据
|
||||
insert into
|
||||
ct_user_commission
|
||||
(
|
||||
agent_id,
|
||||
channel_id,
|
||||
game_id,
|
||||
room_id,
|
||||
player_id,
|
||||
user_id,
|
||||
parent_user_id,
|
||||
room_code,
|
||||
short_number,
|
||||
used_card,
|
||||
owner_id,
|
||||
room_type,
|
||||
room_mode,
|
||||
commission_type,
|
||||
grade,
|
||||
source_mode,
|
||||
target_mode,
|
||||
target_id,
|
||||
mode,
|
||||
type,
|
||||
commission_total,
|
||||
commission_system,
|
||||
commission_user,
|
||||
commission_parent_user,
|
||||
commission_user_rate,
|
||||
commission_parent_user_rate,
|
||||
create_time,
|
||||
is_robot,
|
||||
out_id
|
||||
)
|
||||
select
|
||||
agent_id,
|
||||
channel_id,
|
||||
game_id,
|
||||
room_id,
|
||||
player_id,
|
||||
user_id,
|
||||
parent_user_id,
|
||||
room_code,
|
||||
short_number,
|
||||
used_card,
|
||||
owner_id,
|
||||
room_type,
|
||||
room_mode,
|
||||
commission_type,
|
||||
grade,
|
||||
source_mode,
|
||||
target_mode,
|
||||
target_id,
|
||||
mode,
|
||||
type,
|
||||
ifnull(commission_total, 0) commission_total,
|
||||
ifnull(commission_total, 0) - floor(ifnull(commission_total, 0) * ifnull(user_rate, 0)) - floor(ifnull(commission_total, 0) * ifnull(parent_user_rate, 0)) commission_system,
|
||||
floor(ifnull(commission_total, 0) * ifnull(user_rate, 0)) commission_user,
|
||||
floor(ifnull(commission_total, 0) * ifnull(parent_user_rate, 0)) commission_parent_user,
|
||||
ifnull(user_rate, 0) commission_user_rate,
|
||||
ifnull(parent_user_rate, 0) commission_parent_user_rate,
|
||||
create_time,
|
||||
is_robot,
|
||||
out_id
|
||||
from
|
||||
(
|
||||
select
|
||||
a.agent_id,
|
||||
a.channel_id,
|
||||
a.game_id,
|
||||
a.room_id,
|
||||
a.player_id,
|
||||
a.user_id,
|
||||
a.parent_user_id,
|
||||
a.room_code,
|
||||
a.short_number,
|
||||
a.used_card,
|
||||
a.owner_id,
|
||||
a.room_type,
|
||||
a.room_mode,
|
||||
a.commission_type,
|
||||
a.grade,
|
||||
a.source_mode,
|
||||
a.target_mode,
|
||||
a.target_id,
|
||||
a.mode,
|
||||
a.type,
|
||||
a.commission_total,
|
||||
case ifnull(target_mode, 0)
|
||||
when 0 then
|
||||
case
|
||||
when (0 = a.user_id) or (0 != a.user_is_admin) then 0
|
||||
else case ifnull(c.is_custom, 0)
|
||||
when 0 then b.user_commission_rate
|
||||
else c.commission_rate
|
||||
end
|
||||
end
|
||||
+
|
||||
case
|
||||
when ((0 != a.user_id) and (0 = a.user_is_admin)) and ((0 = a.parent_user_id) or (0 != a.parent_user_is_admin)) then case ifnull(c.is_custom, 0)
|
||||
when 0 then b.parent_user_commission_rate
|
||||
else c.parent_commission_rate
|
||||
end
|
||||
else 0
|
||||
end
|
||||
else 0
|
||||
end user_rate,
|
||||
case ifnull(target_mode, 0)
|
||||
when 0 then
|
||||
case
|
||||
when (0 = a.parent_user_id) or (0 != a.parent_user_is_admin) then 0
|
||||
else case ifnull(c.is_custom, 0)
|
||||
when 0 then b.parent_user_commission_rate
|
||||
else c.parent_commission_rate
|
||||
end
|
||||
end
|
||||
else 0
|
||||
end parent_user_rate,
|
||||
a.user_is_admin,
|
||||
a.parent_user_is_admin,
|
||||
a.create_time,
|
||||
a.is_robot,
|
||||
a.out_id
|
||||
from
|
||||
(
|
||||
select
|
||||
a.goac_agentid agent_id,
|
||||
b.play_channelid channel_id,
|
||||
a.goac_gameid game_id,
|
||||
a.goac_id room_id,
|
||||
a.goac_playerid player_id,
|
||||
ifnull(b.play_invitecode, 0) user_id,
|
||||
ifnull(c.global_power, 0) user_is_admin,
|
||||
ifnull(c.saus_parentid, 0) parent_user_id,
|
||||
ifnull(d.global_power, 0) parent_user_is_admin,
|
||||
a.goac_roomcode room_code,
|
||||
a.goac_shortcode short_number,
|
||||
a.goac_roomcard used_card,
|
||||
a.goac_ownerid owner_id,
|
||||
null room_type,
|
||||
a.goac_roommode room_mode,
|
||||
case a.goac_roommode
|
||||
when 0 then '001'
|
||||
when 1 then '002'
|
||||
else '001'
|
||||
end commission_type,
|
||||
a.goac_grade grade,
|
||||
a.goac_rebatefrom source_mode,
|
||||
a.goac_rebateto target_mode,
|
||||
a.goac_toplayerid target_id,
|
||||
a.goac_rebatemode mode,
|
||||
a.goac_datatype type,
|
||||
a.goac_rebatevalue commission_total,
|
||||
a.goac_time create_time,
|
||||
a.goac_isrobot is_robot,
|
||||
a.idx out_id
|
||||
from
|
||||
game_db_temp.gold_account a left join
|
||||
player b on a.goac_agentid = b.play_agentid and a.goac_playerid = b.play_playerid left join
|
||||
sales_user c on b.play_agentid = c.saus_agentid and b.play_channelid = c.saus_channelid and b.play_invitecode = c.saus_salesid left join
|
||||
sales_user d on c.saus_agentid = d.saus_agentid and c.saus_channelid = d.saus_channelid and c.saus_parentid = d.saus_salesid
|
||||
) a left join
|
||||
ct_agent_commission b on a.agent_id = b.agent_id and a.channel_id = b.channel_id and a.commission_type = b.type_id left join
|
||||
ct_agent_commission_user c on a.agent_id = c.agent_id and a.channel_id = c.channel_id and b.type_id = c.type_id and a.user_id = c.user_id
|
||||
) t
|
||||
where
|
||||
t.out_id not in (select out_id from ct_user_commission);
|
||||
|
||||
-- 转移指定了接收代理编号的抽水金币数
|
||||
update
|
||||
sales_user a,
|
||||
(
|
||||
select
|
||||
a.agent_id,
|
||||
a.channel_id,
|
||||
b.saus_salesid sales_id,
|
||||
sum(a.commission_total) total
|
||||
from
|
||||
ct_user_commission a inner join
|
||||
ct_sales_player b on a.agent_id = b.agent_id and a.channel_id = b.channel_id and a.target_id = b.play_playerid
|
||||
where
|
||||
ifnull(a.target_mode, 0) = 3 and a.is_settle = 0
|
||||
group by
|
||||
a.agent_id,
|
||||
a.channel_id,
|
||||
b.saus_salesid
|
||||
) b
|
||||
set
|
||||
a.saus_bean = a.saus_bean + b.total
|
||||
where
|
||||
a.saus_agentid = b.agent_id and
|
||||
a.saus_channelid = b.channel_id and
|
||||
a.saus_salesid = b.sales_id;
|
||||
|
||||
-- 增加玩家绑定的代理的总计抽水金币数
|
||||
update
|
||||
sales_user a,
|
||||
(
|
||||
select
|
||||
agent_id, channel_id, user_id, sum(ifnull(commission_user, 0)) commission_user
|
||||
from
|
||||
ct_user_commission
|
||||
where
|
||||
is_settle = 0
|
||||
group by
|
||||
agent_id, channel_id, user_id
|
||||
) b
|
||||
set
|
||||
a.currency_total = ifnull(a.currency_total, 0) + b.commission_user
|
||||
where
|
||||
a.saus_agentid = b.agent_id and
|
||||
a.saus_channelid = b.channel_id and
|
||||
a.saus_salesid = b.user_id;
|
||||
|
||||
-- 增加玩家绑定的代理的上级代理的总计抽水金币数
|
||||
update
|
||||
sales_user a,
|
||||
(
|
||||
select
|
||||
agent_id, channel_id, parent_user_id user_id, sum(ifnull(commission_parent_user, 0)) commission_user
|
||||
from
|
||||
ct_user_commission
|
||||
where
|
||||
is_settle = 0
|
||||
group by
|
||||
agent_id, channel_id, parent_user_id
|
||||
) b
|
||||
set
|
||||
a.currency_total = ifnull(a.currency_total, 0) + b.commission_user
|
||||
where
|
||||
a.saus_agentid = b.agent_id and
|
||||
a.saus_channelid = b.channel_id and
|
||||
a.saus_salesid = b.user_id;
|
||||
|
||||
-- 计算可提现金币数
|
||||
update
|
||||
sales_user a,
|
||||
(
|
||||
select
|
||||
agent_id, channel_id, user_id
|
||||
from
|
||||
ct_user_commission
|
||||
where
|
||||
is_settle = 0
|
||||
union all
|
||||
select
|
||||
agent_id, channel_id, parent_user_id
|
||||
from
|
||||
ct_user_commission
|
||||
) b
|
||||
set
|
||||
a.currency_withdraw = ifnull(a.currency_total, 0) - ifnull(a.currency_freeze, 0)
|
||||
where
|
||||
a.saus_agentid = b.agent_id and
|
||||
a.saus_channelid = b.channel_id and
|
||||
a.saus_salesid = b.user_id;
|
||||
|
||||
-- 变更状态
|
||||
update
|
||||
ct_user_commission
|
||||
set
|
||||
is_settle = 1
|
||||
where
|
||||
ifnull(is_settle, 0) = 0;
|
||||
|
||||
-- 更新表(player)
|
||||
update
|
||||
player a,
|
||||
game_db_temp.player b
|
||||
set
|
||||
a.play_nickname = b.play_nickname,
|
||||
a.play_bean = b.play_bean,
|
||||
a.play_roomcard = b.play_roomcard
|
||||
where
|
||||
a.play_agentid = b.play_agentid and
|
||||
a.play_channelid = b.play_channelid and
|
||||
a.play_playerid = b.play_playerid;
|
||||
|
||||
-- 重建索引(ct_grade_temp)
|
||||
alter table ct_grade_temp
|
||||
drop index pk_grade_temp,
|
||||
drop index uk_grade_temp,
|
||||
drop index nk_grade_temp_player_id,
|
||||
drop index nk_grade_temp_create_time,
|
||||
drop index nk_grade_temp_group_data,
|
||||
add unique index pk_grade_temp (id) using hash,
|
||||
add unique index uk_grade_temp (out_id) using hash,
|
||||
add index nk_grade_temp_player_id (agent_id,channel_id,game_id,player_id) using btree,
|
||||
add index nk_grade_temp_create_time (agent_id,channel_id,game_id,create_time,short_number) using btree,
|
||||
add index nk_grade_temp_group_data (agent_id,channel_id,player_id,create_time,short_number) using btree;
|
||||
|
||||
-- 重建索引(ct_user_commission)
|
||||
alter table ct_user_commission
|
||||
drop index pk_user_commission,
|
||||
drop index uk_user_commission_out_id,
|
||||
drop index nk_user_commission,
|
||||
add unique index pk_user_commission (id) using hash,
|
||||
add unique index uk_user_commission_out_id (out_id) using hash,
|
||||
add index nk_user_commission (agent_id,channel_id,game_id,player_id,user_id) using btree;
|
||||
|
||||
-- 重建索引(sales_user)
|
||||
alter table sales_user
|
||||
drop index uk_sales_user_openid,
|
||||
drop index uk_sales_user_unionid,
|
||||
drop index nk_sales_user_salesid,
|
||||
add unique index uk_sales_user_openid (saus_agentid,saus_channelid,saus_openid) using hash,
|
||||
add unique index uk_sales_user_unionid (saus_agentid,saus_channelid,saus_unionid) using hash,
|
||||
add index nk_sales_user_salesid (saus_agentid,saus_channelid,saus_salesid,saus_openid,saus_unionid,saus_status,password) using btree;
|
||||
|
||||
-- 重建索引(player)
|
||||
alter table player
|
||||
drop index player_index1,
|
||||
drop index player_index2,
|
||||
drop index nk_player,
|
||||
add unique index player_index1 (play_agentid,play_channelid,play_playerid) using hash,
|
||||
add unique index player_index2 (play_agentid,play_channelid,play_unionid) using hash,
|
||||
add index nk_player (play_agentid,play_playerid,play_channelid,play_openid,play_unionid,play_status) using btree;
|
||||
|
||||
-- 判断是否成功
|
||||
if 1 = nErrorCode then
|
||||
rollback;
|
||||
select 'error';
|
||||
else
|
||||
commit;
|
||||
select 'success';
|
||||
end if;
|
||||
end
|
||||
;;
|
||||
delimiter ;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
6097
codes/games/sql/game/db/game_db.sql
Normal file
6097
codes/games/sql/game/db/game_db.sql
Normal file
File diff suppressed because it is too large
Load Diff
142
codes/games/sql/game/db/game_field.sql
Normal file
142
codes/games/sql/game/db/game_field.sql
Normal file
@@ -0,0 +1,142 @@
|
||||
/*
|
||||
Navicat Premium Dump SQL
|
||||
|
||||
Source Server : agent
|
||||
Source Server Type : MySQL
|
||||
Source Server Version : 80036 (8.0.36)
|
||||
Source Host : rm-bp1btyuwq77591x0jpo.mysql.rds.aliyuncs.com:3306
|
||||
Source Schema : game_field
|
||||
|
||||
Target Server Type : MySQL
|
||||
Target Server Version : 80036 (8.0.36)
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 15/03/2026 19:30:29
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for entryinfo
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `entryinfo`;
|
||||
CREATE TABLE `entryinfo` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`agent_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '代理商id',
|
||||
`game_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '游戏id',
|
||||
`player_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户id',
|
||||
`match_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '赛事id',
|
||||
`is_die_out` int NULL DEFAULT 0 COMMENT '0,没有被淘汰,1,淘汰了',
|
||||
`die_round` int NULL DEFAULT 0 COMMENT '淘汰轮数',
|
||||
`sign_agent_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '报名代理编号',
|
||||
`true_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '真实姓名',
|
||||
`tel` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系电话',
|
||||
`last_round` int NULL DEFAULT 0 COMMENT '最后比赛时间',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 30 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for gameorder
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `gameorder`;
|
||||
CREATE TABLE `gameorder` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`order_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '订单id',
|
||||
`agent_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '代理商id',
|
||||
`game_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '游戏id',
|
||||
`player_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '玩家id',
|
||||
`order_price` decimal(10, 2) NULL DEFAULT NULL COMMENT '订单金额',
|
||||
`order_status` int NULL DEFAULT 0 COMMENT '0,未付款,1,已付款',
|
||||
`pay_time` datetime NULL DEFAULT NULL COMMENT '支付时间',
|
||||
`wei_trans_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '微信流水id',
|
||||
`wei_trade_no` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '微信商户订单id',
|
||||
`match_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '赛事id',
|
||||
`player_agent_no` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户代理id',
|
||||
`true_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '真实姓名',
|
||||
`tel` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系电话',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for gamerecord
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `gamerecord`;
|
||||
CREATE TABLE `gamerecord` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`agent_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '代理商id',
|
||||
`game_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '游戏id',
|
||||
`player_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户id',
|
||||
`match_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '赛事信息',
|
||||
`score` int NULL DEFAULT 0 COMMENT '分数',
|
||||
`nick_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户昵称',
|
||||
`avter` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户头像',
|
||||
`round` int NULL DEFAULT 0 COMMENT '第几轮信息',
|
||||
`is_die_out` int NULL DEFAULT 0 COMMENT '0,未淘汰,1,已淘汰,2待定中',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`status` int NULL DEFAULT 0 COMMENT '0,有效战绩,1,无效战绩',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for gametype
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `gametype`;
|
||||
CREATE TABLE `gametype` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '赛事分类名称',
|
||||
`pic` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '分类图片',
|
||||
`status` int NULL DEFAULT NULL COMMENT '0,可用,1不可用',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for matchinfo
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `matchinfo`;
|
||||
CREATE TABLE `matchinfo` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`agent_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '代理商id',
|
||||
`game_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '游戏id',
|
||||
`game_type` int NULL DEFAULT NULL COMMENT '比赛类型',
|
||||
`prize_type` int NULL DEFAULT NULL COMMENT '奖品信息',
|
||||
`prize_img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '奖励图片',
|
||||
`rank_type` int NULL DEFAULT NULL COMMENT '排行类型',
|
||||
`match_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '比赛名称',
|
||||
`match_info` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '比赛描述',
|
||||
`match_detail` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '赛事详情',
|
||||
`begin_time` datetime NULL DEFAULT NULL COMMENT '开始时间',
|
||||
`end_time` datetime NULL DEFAULT NULL COMMENT '结束时间',
|
||||
`signup_num` int NULL DEFAULT NULL COMMENT '报名人数',
|
||||
`first_time` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '淘汰赛第一次比赛时间',
|
||||
`second_time` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '淘汰赛第二次时间',
|
||||
`is_pay` int NULL DEFAULT 0 COMMENT '0,不用付费,1付费',
|
||||
`pay_money` decimal(11, 2) NULL DEFAULT 0.00 COMMENT '需要支付的报名金额',
|
||||
`match_link` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '比赛链接',
|
||||
`message` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '报名提示信息',
|
||||
`room_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '开放参数',
|
||||
`room_player_num` int NULL DEFAULT 3 COMMENT '每个房间人数',
|
||||
`dieout_num` int NULL DEFAULT 1 COMMENT '每个房间淘汰人数',
|
||||
`end_player_num` int NULL DEFAULT 9 COMMENT '结束比赛需要人数',
|
||||
`match_status` int NULL DEFAULT 0 COMMENT '0,未开赛,1比赛中,3,结束',
|
||||
`now_round` int NULL DEFAULT 0 COMMENT '当前轮数',
|
||||
`last_game_time` int NULL DEFAULT NULL COMMENT '最后一轮比赛时间',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for prizeinfo
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `prizeinfo`;
|
||||
CREATE TABLE `prizeinfo` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`prize_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '奖品名称',
|
||||
`prize_img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '奖品图片',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
802
codes/games/sql/game/db/grade_db.sql
Normal file
802
codes/games/sql/game/db/grade_db.sql
Normal file
@@ -0,0 +1,802 @@
|
||||
/*
|
||||
Navicat Premium Dump SQL
|
||||
|
||||
Source Server : game_grade
|
||||
Source Server Type : MySQL
|
||||
Source Server Version : 80036 (8.0.36)
|
||||
Source Host : rm-bp1749tfxu2rpq670lo.mysql.rds.aliyuncs.com:3306
|
||||
Source Schema : grade_db
|
||||
|
||||
Target Server Type : MySQL
|
||||
Target Server Version : 80036 (8.0.36)
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 15/03/2026 19:29:34
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for coin_rebate
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `coin_rebate`;
|
||||
CREATE TABLE `coin_rebate` (
|
||||
`idx` int NOT NULL AUTO_INCREMENT,
|
||||
`core_agentid` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '代理商id',
|
||||
`core_gameid` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '游戏id',
|
||||
`core_playerid` int NOT NULL COMMENT '玩家id',
|
||||
`core_isrobot` tinyint(1) NULL DEFAULT 0,
|
||||
`core_roomcode` int NOT NULL COMMENT '房号',
|
||||
`core_createtime` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`core_roomtype` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '房间类型',
|
||||
`core_roommode` tinyint(1) NOT NULL COMMENT '0-普通星星场房间 1-短号星星场房间 2-系统无限局星星场房间',
|
||||
`core_ownerid` int NOT NULL COMMENT '房主id',
|
||||
`core_deduct` tinyint(1) NULL DEFAULT NULL COMMENT '0-房主扣卡 1-每人扣卡 2-免房卡',
|
||||
`core_roomcard` int NULL DEFAULT NULL COMMENT '扣的房卡数量',
|
||||
`core_datatype` tinyint(1) NULL DEFAULT NULL COMMENT '0-大局系统抽成数据 1-小局系统抽成数据',
|
||||
`core_asetcount` int NULL DEFAULT NULL COMMENT '总局数',
|
||||
`core_asetnum` int NULL DEFAULT NULL COMMENT '当前小局号 从1开始计数',
|
||||
`core_grade` int NOT NULL COMMENT '玩家得分',
|
||||
`core_mode` tinyint NOT NULL COMMENT '抽成模式 1-按比例 2-按固定值',
|
||||
`core_setting` int NOT NULL COMMENT '抽成设置的值',
|
||||
`core_value` int NOT NULL COMMENT '实际抽成数量',
|
||||
`core_time` datetime NOT NULL COMMENT '抽成时间',
|
||||
PRIMARY KEY (`idx`) USING BTREE,
|
||||
INDEX `coin_rebate`(`core_agentid` ASC, `core_playerid` ASC, `core_gameid` ASC) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 93059 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '金币抽成表' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for error
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `error`;
|
||||
CREATE TABLE `error` (
|
||||
`idx` int NOT NULL AUTO_INCREMENT,
|
||||
`erro_agentid` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '代理商id',
|
||||
`erro_playerid` int NOT NULL COMMENT '玩家id',
|
||||
`erro_gameid` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '游戏id',
|
||||
`erro_msg` mediumtext CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '错误信息',
|
||||
`erro_packet` mediumtext CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '收到的包',
|
||||
`erro_time` datetime NULL DEFAULT NULL COMMENT '时间',
|
||||
PRIMARY KEY (`idx`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 772430 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '错误日志表' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for gold_account
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `gold_account`;
|
||||
CREATE TABLE `gold_account` (
|
||||
`idx` int NOT NULL AUTO_INCREMENT,
|
||||
`goac_id` varchar(23) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT 'id,时间戳+房号+4位随机码',
|
||||
`goac_agentid` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '代理商id',
|
||||
`goac_gameid` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '游戏id',
|
||||
`goac_roomcode` int NOT NULL COMMENT '房间号',
|
||||
`goac_roommode` tinyint(1) NOT NULL COMMENT '0-星星场玩家房间 1-星星场系统房间 2-非星星场(星星限进)',
|
||||
`goac_createtime` datetime NOT NULL COMMENT '房间的创建时间',
|
||||
`goac_beanmult` int NOT NULL COMMENT '倍数',
|
||||
`goac_ownerid` int NULL DEFAULT NULL COMMENT '房主的玩家id',
|
||||
`goac_shortcode` int NULL DEFAULT NULL COMMENT '短号',
|
||||
`goac_deduct` tinyint(1) NULL DEFAULT NULL COMMENT '0-房主扣卡 1-每人扣卡 2-大赢家扣卡',
|
||||
`goac_roomcard` int NULL DEFAULT NULL COMMENT '扣的房卡数量',
|
||||
`goac_datatype` tinyint(1) NOT NULL COMMENT '0-大局结算数据 1-小局结算数据',
|
||||
`goac_asetcount` int NULL DEFAULT NULL COMMENT '总局数',
|
||||
`goac_asetnum` int NULL DEFAULT NULL COMMENT '当前小局号,从1开始计数',
|
||||
`goac_playerid` int NULL DEFAULT NULL COMMENT '玩家id',
|
||||
`goac_isrobot` tinyint(1) NULL DEFAULT 0 COMMENT '0-真实玩家 1-机器人',
|
||||
`goac_grade` int NOT NULL COMMENT '玩家得分',
|
||||
`goac_rebatefrom` tinyint(1) NOT NULL COMMENT '0-不抽成 1-对大赢家进行抽成 2-对所有赢家抽成 3-对所有玩家抽成',
|
||||
`goac_rebateto` tinyint(1) NULL DEFAULT NULL COMMENT '0-抽成给系统 1-抽成给房主 2-抽成给指定玩家 3-抽成给指定玩家的代理账号',
|
||||
`goac_toplayerid` int NULL DEFAULT NULL COMMENT '抽成给到的玩家id',
|
||||
`goac_rebatemode` tinyint(1) NULL DEFAULT NULL COMMENT '1-按得分的百分比抽成 2-按倍数的百分比抽成 3-按固定值抽成',
|
||||
`goac_setvalue` int NULL DEFAULT NULL COMMENT '抽成设置的值',
|
||||
`goac_rebatevalue` int NULL DEFAULT NULL COMMENT '实际抽成数量',
|
||||
`goac_time` datetime NOT NULL COMMENT '发生时间',
|
||||
`goac_state` tinyint(1) NULL DEFAULT 0 COMMENT '代理后台处理状态 0:未处理 1:已处理',
|
||||
`goac_statetime` datetime NULL DEFAULT NULL COMMENT '代理后台处理时间',
|
||||
`goac_invitecode` int NULL DEFAULT NULL,
|
||||
`goac_inviteid` int NULL DEFAULT NULL,
|
||||
`goac_marketid` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
|
||||
`goac_i1` int NULL DEFAULT NULL,
|
||||
`goac_i2` int NULL DEFAULT NULL,
|
||||
`goac_i3` int NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`idx`) USING BTREE,
|
||||
INDEX `gold_account_index2`(`goac_agentid` ASC, `goac_playerid` ASC) USING BTREE,
|
||||
INDEX `gold_account_index1`(`goac_id` ASC) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 20865676 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '金币变动表' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for match
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `match`;
|
||||
CREATE TABLE `match` (
|
||||
`idx` int NOT NULL AUTO_INCREMENT,
|
||||
`matc_agentid` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '代理商id',
|
||||
`matc_gameid` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '游戏id',
|
||||
`matc_matchid` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '比赛id',
|
||||
`matc_matchidx` tinyint NOT NULL COMMENT '比赛循环号',
|
||||
`matc_matchname` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '比赛名称',
|
||||
`matc_beginTime` datetime NOT NULL COMMENT '开始时间',
|
||||
`matc_endTime` datetime NOT NULL COMMENT '结束时间',
|
||||
`matc_roomtype` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '房间类型',
|
||||
`matc_imageurl` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '比赛图片地址',
|
||||
`matc_playercount` int NOT NULL,
|
||||
`matc_playercount2` int NOT NULL,
|
||||
`matc_bean` int NOT NULL,
|
||||
`matc_roomcard` int NOT NULL,
|
||||
`matc_topcount` int NOT NULL,
|
||||
`matc_circulation` int NOT NULL,
|
||||
`matc_interval` int NOT NULL,
|
||||
`matc_gradename` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
|
||||
`matc_memo1` varchar(800) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
|
||||
`matc_memo2` varchar(800) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
|
||||
`matc_memo3` varchar(800) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
|
||||
`matc_ranking` mediumtext CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
|
||||
PRIMARY KEY (`idx`) USING BTREE,
|
||||
INDEX `match_index`(`matc_agentid` ASC, `matc_gameid` ASC, `matc_matchid` ASC, `matc_matchidx` ASC) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '比赛表' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for match_ranking
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `match_ranking`;
|
||||
CREATE TABLE `match_ranking` (
|
||||
`idx` int NOT NULL AUTO_INCREMENT,
|
||||
`mara_agentid` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '代理商id',
|
||||
`mara_gameid` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '游戏id',
|
||||
`mara_matchid` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '比赛id',
|
||||
`mara_matchidx` tinyint NOT NULL COMMENT '比赛循环号',
|
||||
`mara_playerid` int NOT NULL COMMENT '玩家id',
|
||||
`mara_nickname` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '玩家昵称',
|
||||
`mara_avatar` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '玩家头像',
|
||||
`mara_roomcode` int NOT NULL COMMENT '房间号',
|
||||
`mara_overtime` datetime NOT NULL COMMENT '房间结束时间',
|
||||
`mara_grade` int NOT NULL COMMENT '得分',
|
||||
`mara_isrobot` tinyint(1) NULL DEFAULT 0 COMMENT '0-玩家 1-机器人',
|
||||
PRIMARY KEY (`idx`) USING BTREE,
|
||||
INDEX `match_ranking_index`(`mara_agentid` ASC, `mara_gameid` ASC, `mara_matchid` ASC, `mara_matchidx` ASC, `mara_playerid` ASC) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '比赛排行表' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for player_grade
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `player_grade`;
|
||||
CREATE TABLE `player_grade` (
|
||||
`idx` int NOT NULL AUTO_INCREMENT,
|
||||
`plgr_agentid` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '代理商id',
|
||||
`plgr_playerid` int NOT NULL COMMENT '玩家id',
|
||||
`plgr_gameid` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '游戏id',
|
||||
`plgr_roomcode` int NOT NULL COMMENT '房号',
|
||||
`plgr_ownerid` int NULL DEFAULT NULL COMMENT '房主id',
|
||||
`plgr_roomtype` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '房间类型',
|
||||
`plgr_createtime` datetime NOT NULL COMMENT '开房时间',
|
||||
`plgr_makewartime` datetime NOT NULL COMMENT '开战时间',
|
||||
`plgr_overtime` datetime NOT NULL COMMENT '结束时间',
|
||||
`plgr_roomcard` int NULL DEFAULT NULL,
|
||||
`plgr_ownercard` int NULL DEFAULT NULL,
|
||||
`plgr_gameinfo1` varchar(10000) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT '' COMMENT '一局游戏的完整数据 json格式',
|
||||
`plgr_gameinfo2` mediumtext CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '一局游戏的完整数据 json格式',
|
||||
`plgr_shortcode` int NULL DEFAULT NULL,
|
||||
`plgr_deducttype` tinyint(1) NULL DEFAULT NULL,
|
||||
`plgr_deductcard` int NULL DEFAULT NULL,
|
||||
`plgr_asetcount` int NULL DEFAULT NULL,
|
||||
`plgr_roommode` tinyint(1) NULL DEFAULT NULL,
|
||||
`plgr_winner` tinyint(1) NOT NULL DEFAULT 0 COMMENT '大赢家',
|
||||
`plgr_score` int NOT NULL DEFAULT 0 COMMENT '得分',
|
||||
PRIMARY KEY (`idx`) USING BTREE,
|
||||
INDEX `player_grade2_index`(`plgr_agentid` ASC, `plgr_playerid` ASC, `plgr_gameid` ASC) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 36393310 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '玩家战绩表' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for process_log
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `process_log`;
|
||||
CREATE TABLE `process_log` (
|
||||
`idx` int NOT NULL AUTO_INCREMENT,
|
||||
`prlo_optid` int NOT NULL COMMENT '代理后台接口数据optid',
|
||||
`prlo_result` tinyint(1) NOT NULL COMMENT '-1:处理失败 1:处理成功',
|
||||
`prlo_time` datetime NOT NULL COMMENT '处理时间',
|
||||
`prlo_ip` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '子游戏服务器IP和端口',
|
||||
`prlo_error` varchar(2000) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '错误信息',
|
||||
PRIMARY KEY (`idx`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 4924417 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '代理后台接口数据处理日志表' ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Procedure structure for cp_game_grade_del
|
||||
-- ----------------------------
|
||||
DROP PROCEDURE IF EXISTS `cp_game_grade_del`;
|
||||
delimiter ;;
|
||||
CREATE PROCEDURE `cp_game_grade_del`()
|
||||
SQL SECURITY INVOKER
|
||||
COMMENT '删除超时战绩'
|
||||
begin
|
||||
-- 删除24小时之前的战绩记录
|
||||
delete from player_grade
|
||||
where (unix_timestamp(now()) - unix_timestamp(plgr_makewartime)) > 24 * 60 * 60;
|
||||
|
||||
-- 删除72小时之前的金币记录
|
||||
delete from gold_account
|
||||
where (unix_timestamp(now()) - unix_timestamp(goac_time)) > 8 * 24 * 60 * 60;
|
||||
|
||||
-- 删除72小时之前的代理后台接口数据处理日志
|
||||
delete from process_log
|
||||
where (unix_timestamp(now()) - unix_timestamp(prlo_time)) > 72 * 60 * 60;
|
||||
end
|
||||
;;
|
||||
delimiter ;
|
||||
|
||||
-- ----------------------------
|
||||
-- Procedure structure for cp_game_grade_get1
|
||||
-- ----------------------------
|
||||
DROP PROCEDURE IF EXISTS `cp_game_grade_get1`;
|
||||
delimiter ;;
|
||||
CREATE PROCEDURE `cp_game_grade_get1`(IN `agentid` varchar(32) charset utf8 collate utf8_general_ci ,IN `playerid` int(8) ,IN `gameid` varchar(32) charset utf8 collate utf8_general_ci ,IN `ownertype` tinyint(1) ,IN `direction` tinyint(1) ,IN `gradeidx` int(11))
|
||||
SQL SECURITY INVOKER
|
||||
COMMENT '获取战绩gameinfo1'
|
||||
begin
|
||||
if ifnull(ownertype, 0) = 0 then
|
||||
-- 获取最近10条战绩记录
|
||||
select idx, plgr_roomcode as roomcode, plgr_roomtype as roomtype,
|
||||
DATE_FORMAT(plgr_createtime, "%m.%d %H:%i") as createtime,
|
||||
DATE_FORMAT(plgr_makewartime,"%m.%d %H:%i") as makewartime,
|
||||
DATE_FORMAT(plgr_overtime,"%m.%d %H:%i") as overtime,
|
||||
plgr_roomcard as roomcard, plgr_gameinfo1 as gameinfo1
|
||||
from player_grade
|
||||
where plgr_agentid = agentid
|
||||
and plgr_playerid = playerid
|
||||
and plgr_gameid = gameid
|
||||
order by idx desc
|
||||
limit 10;
|
||||
elseif isnull(direction) or isnull(gradeidx) then
|
||||
select idx, plgr_roomcode as roomcode, plgr_roomtype as roomtype,
|
||||
DATE_FORMAT(plgr_createtime, "%m.%d %H:%i") as createtime,
|
||||
DATE_FORMAT(plgr_makewartime,"%m.%d %H:%i") as makewartime,
|
||||
DATE_FORMAT(plgr_overtime,"%m.%d %H:%i") as overtime,
|
||||
plgr_ownercard as roomcard, plgr_gameinfo1 as gameinfo1
|
||||
from player_grade
|
||||
where plgr_agentid = agentid
|
||||
and plgr_ownerid = playerid
|
||||
and plgr_gameid = gameid
|
||||
and plgr_ownercard is not null
|
||||
and (unix_timestamp(now()) - unix_timestamp(plgr_overtime)) < 24 * 60 * 60
|
||||
order by idx desc
|
||||
limit 10;
|
||||
elseif direction = 1 then
|
||||
-- 上一页
|
||||
select idx, plgr_roomcode as roomcode, plgr_roomtype as roomtype,
|
||||
DATE_FORMAT(plgr_createtime, "%m.%d %H:%i") as createtime,
|
||||
DATE_FORMAT(plgr_makewartime,"%m.%d %H:%i") as makewartime,
|
||||
DATE_FORMAT(plgr_overtime,"%m.%d %H:%i") as overtime,
|
||||
plgr_ownercard as roomcard, plgr_gameinfo1 as gameinfo1
|
||||
from player_grade
|
||||
where plgr_agentid = agentid
|
||||
and plgr_ownerid = playerid
|
||||
and plgr_gameid = gameid
|
||||
and plgr_ownercard is not null
|
||||
and (unix_timestamp(now()) - unix_timestamp(plgr_overtime)) < 24 * 60 * 60
|
||||
and idx > gradeidx
|
||||
order by idx desc
|
||||
limit 10;
|
||||
elseif direction = 2 then
|
||||
-- 下一页
|
||||
select idx, plgr_roomcode as roomcode, plgr_roomtype as roomtype,
|
||||
DATE_FORMAT(plgr_createtime, "%m.%d %H:%i") as createtime,
|
||||
DATE_FORMAT(plgr_makewartime,"%m.%d %H:%i") as makewartime,
|
||||
DATE_FORMAT(plgr_overtime,"%m.%d %H:%i") as overtime,
|
||||
plgr_ownercard as roomcard, plgr_gameinfo1 as gameinfo1
|
||||
from player_grade
|
||||
where plgr_agentid = agentid
|
||||
and plgr_ownerid = playerid
|
||||
and plgr_gameid = gameid
|
||||
and plgr_ownercard is not null
|
||||
and (unix_timestamp(now()) - unix_timestamp(plgr_overtime)) < 24 * 60 * 60
|
||||
and idx < gradeidx
|
||||
order by idx desc
|
||||
limit 10;
|
||||
end if;
|
||||
end
|
||||
;;
|
||||
delimiter ;
|
||||
|
||||
-- ----------------------------
|
||||
-- Procedure structure for cp_game_grade_get2
|
||||
-- ----------------------------
|
||||
DROP PROCEDURE IF EXISTS `cp_game_grade_get2`;
|
||||
delimiter ;;
|
||||
CREATE PROCEDURE `cp_game_grade_get2`(IN `agentid` varchar(32) charset utf8mb4 collate utf8mb4_unicode_ci ,IN `playerid` int(8) ,IN `gameid` varchar(32) charset utf8mb4 collate utf8mb4_unicode_ci ,IN `gradeidx` int(11))
|
||||
SQL SECURITY INVOKER
|
||||
COMMENT '获取战绩gameinfo1'
|
||||
begin
|
||||
select plgr_roomtype as roomtype, plgr_gameinfo2 as gameinfo2
|
||||
from player_grade
|
||||
where plgr_agentid = agentid
|
||||
and plgr_playerid = playerid
|
||||
and plgr_gameid = gameid
|
||||
and idx = gradeidx;
|
||||
end
|
||||
;;
|
||||
delimiter ;
|
||||
|
||||
-- ----------------------------
|
||||
-- Procedure structure for cp_game_grade_save
|
||||
-- ----------------------------
|
||||
DROP PROCEDURE IF EXISTS `cp_game_grade_save`;
|
||||
delimiter ;;
|
||||
CREATE PROCEDURE `cp_game_grade_save`(IN `agentid` varchar(32) charset utf8 collate utf8_general_ci ,IN `playerids` varchar(800) charset utf8 collate utf8_general_ci ,IN `gameid` varchar(32) charset utf8 collate utf8_general_ci ,IN `roomcode` int(8) ,IN `roomtype` varchar(200) charset utf8 collate utf8_general_ci ,IN `createtime` datetime ,IN `makewartime` datetime ,IN `overtime` datetime ,IN `gameinfo1` varchar(10000) charset utf8 collate utf8_general_ci ,IN `gameinfo2` mediumtext charset utf8 collate utf8_general_ci ,IN `ownerid` int(8) ,IN `grades` varchar(800) charset utf8 collate utf8_general_ci ,IN `roommode` tinyint(1) ,IN `beanmult` int(4) ,IN `shortcode` int(8) ,IN `isrobots` varchar(800) charset utf8 collate utf8_general_ci)
|
||||
SQL SECURITY INVOKER
|
||||
COMMENT '保存战绩'
|
||||
begin
|
||||
declare ary_playerid varchar(800);
|
||||
declare ary_grade varchar(800);
|
||||
declare ary_isrobot varchar(800);
|
||||
declare pos_playerid int(10);
|
||||
declare pos_grade int(10);
|
||||
declare pos_isrobot int(10);
|
||||
declare playerid varchar(8);
|
||||
declare grade varchar(8);
|
||||
declare isrobot varchar(8);
|
||||
|
||||
-- 如果出现异常,自动退出并rollback
|
||||
declare exit handler for sqlexception ROLLBACK;
|
||||
|
||||
-- 启动事务
|
||||
start transaction;
|
||||
|
||||
set ary_playerid = playerids;
|
||||
set ary_grade = grades;
|
||||
set ary_isrobot = isrobots;
|
||||
|
||||
while ary_playerid <> '' do
|
||||
set pos_playerid = instr(ary_playerid, ',');
|
||||
set pos_grade = instr(ary_grade, ',');
|
||||
set pos_isrobot = instr(ary_isrobot, ',');
|
||||
if pos_playerid = 0 then
|
||||
set playerid = ary_playerid;
|
||||
set grade = ary_grade;
|
||||
set isrobot = ary_isrobot;
|
||||
set ary_playerid = '';
|
||||
set ary_grade = '';
|
||||
set ary_isrobot = '';
|
||||
else
|
||||
set playerid = left(ary_playerid, pos_playerid - 1);
|
||||
set grade = left(ary_grade, pos_grade - 1);
|
||||
set isrobot = left(ary_isrobot, pos_isrobot - 1);
|
||||
set ary_playerid = right(ary_playerid, length(ary_playerid) - pos_playerid);
|
||||
set ary_grade = right(ary_grade, length(ary_grade) - pos_grade);
|
||||
set ary_isrobot = right(ary_isrobot, length(ary_isrobot) - pos_isrobot);
|
||||
end if;
|
||||
|
||||
-- 累计游戏局数(大局)
|
||||
if roommode = 0 then
|
||||
-- 非星星场
|
||||
if isrobot = '0' then
|
||||
update agent_game_player
|
||||
set agpl_playset = agpl_playset + 1,
|
||||
agpl_winlose = agpl_winlose + grade
|
||||
where agpl_agentid = agentid
|
||||
and agpl_gameid = gameid
|
||||
and agpl_playerid = playerid limit 1;
|
||||
end if;
|
||||
else
|
||||
-- 星星场
|
||||
if isrobot = '0' then
|
||||
update agent_game_player
|
||||
set agpl_playset_xx = agpl_playset_xx + 1,
|
||||
agpl_winlose_xx = agpl_winlose_xx + (grade div beanmult),
|
||||
agpl_winlose_x2 = agpl_winlose_x2 + grade
|
||||
where agpl_agentid = agentid
|
||||
and agpl_gameid = gameid
|
||||
and agpl_playerid = playerid limit 1;
|
||||
else
|
||||
call cp_game_grade_robot(agentid, gameid, grade, beanmult);
|
||||
end if;
|
||||
end if;
|
||||
|
||||
-- 统计房主的邀请新人奖励
|
||||
if ownerid <> playerid then
|
||||
if exists(select 1 from agent_game_player
|
||||
where agpl_agentid = agentid
|
||||
and agpl_gameid = gameid
|
||||
and agpl_playerid = playerid
|
||||
and agpl_playset = 1) then
|
||||
call cp_game_task_finish(agentid, ownerid, 'ZVlpZweovbeQ68g8xdjcxaXHfbfIvvu7', 1, 0);
|
||||
end if;
|
||||
|
||||
-- 累加积分(玩一局积分加1)
|
||||
/*
|
||||
update player set play_score = play_score + 1
|
||||
where play_agentid = agentid
|
||||
and play_playerid = playerid;
|
||||
else
|
||||
-- 累加积分(开房积分加2)
|
||||
update player set play_score = play_score + 3
|
||||
where play_agentid = agentid
|
||||
and play_playerid = playerid;
|
||||
*/
|
||||
end if;
|
||||
end while;
|
||||
|
||||
-- 按日期统计玩家一共玩了多少游戏局(大局)
|
||||
call cp_report_game_day(agentid, gameid, now(), 2, 1, null);
|
||||
|
||||
-- 运行没有异常,提交事务
|
||||
commit;
|
||||
end
|
||||
;;
|
||||
delimiter ;
|
||||
|
||||
-- ----------------------------
|
||||
-- Procedure structure for cp_game_grade_save2
|
||||
-- ----------------------------
|
||||
DROP PROCEDURE IF EXISTS `cp_game_grade_save2`;
|
||||
delimiter ;;
|
||||
CREATE PROCEDURE `cp_game_grade_save2`(IN `agentid` varchar(32) charset utf8 collate utf8_general_ci ,IN `playerids` varchar(800) charset utf8 collate utf8_general_ci ,IN `gameid` varchar(32) charset utf8 collate utf8_general_ci ,IN `roomcode` int(8) ,IN `roomtype` varchar(200) charset utf8 collate utf8_general_ci ,IN `createtime` datetime ,IN `makewartime` datetime ,IN `overtime` datetime ,IN `gameinfo1` varchar(10000) charset utf8 collate utf8_general_ci ,IN `gameinfo2` mediumtext charset utf8 collate utf8_general_ci ,IN `ownerid` int(8) ,IN `grades` varchar(800) charset utf8 collate utf8_general_ci ,IN `roomcards` varchar(100) charset utf8 collate utf8_general_ci ,IN `ownercard` int(8) ,IN `shortcode` int(8) ,IN `deducttype` tinyint(1) ,IN `deductcard` int(8) ,IN `asetcount` int(11) ,IN `roommode` tinyint(1) ,IN `isrobots` varchar(800) charset utf8 collate utf8_general_ci)
|
||||
SQL SECURITY INVOKER
|
||||
COMMENT '保存战绩'
|
||||
begin
|
||||
declare ary_playerid varchar(800);
|
||||
declare ary_roomcard varchar(800);
|
||||
declare ary_isrobot varchar(800);
|
||||
declare pos_playerid int(10);
|
||||
declare pos_roomcard int(10);
|
||||
declare pos_isrobot int(10);
|
||||
declare playerid varchar(8);
|
||||
declare roomcard int(10);
|
||||
declare isrobot int(10);
|
||||
declare pos_ownerid int(10);
|
||||
declare ownerplay tinyint(1);
|
||||
declare ownertype int(11);
|
||||
|
||||
set ary_playerid = playerids;
|
||||
set ary_roomcard = roomcards;
|
||||
set ary_isrobot = isrobots;
|
||||
|
||||
set pos_ownerid = instr(ary_playerid, ownerid);
|
||||
if pos_ownerid = 0 then
|
||||
set ownerplay = 0;
|
||||
else
|
||||
set ownerplay = 1;
|
||||
end if;
|
||||
|
||||
while ary_playerid <> '' do
|
||||
set pos_playerid = instr(ary_playerid, ',');
|
||||
set pos_isrobot = instr(ary_isrobot, ',');
|
||||
if pos_playerid = 0 then
|
||||
set playerid = ary_playerid;
|
||||
set isrobot = ary_isrobot;
|
||||
-- if ownerplay = 0 then
|
||||
set ownertype = ownercard;
|
||||
-- else
|
||||
-- set ownertype = null;
|
||||
-- end if;
|
||||
set ary_playerid = '';
|
||||
set ary_isrobot = '';
|
||||
else
|
||||
set playerid = left(ary_playerid, pos_playerid - 1);
|
||||
set isrobot = left(ary_isrobot, pos_isrobot - 1);
|
||||
set ownertype = null;
|
||||
set ary_playerid = right(ary_playerid, length(ary_playerid) - pos_playerid);
|
||||
set ary_isrobot = right(ary_isrobot, length(ary_isrobot) - pos_isrobot);
|
||||
end if;
|
||||
|
||||
set pos_roomcard = instr(ary_roomcard, ',');
|
||||
if pos_roomcard = 0 then
|
||||
set roomcard = ary_roomcard;
|
||||
set ary_roomcard = '';
|
||||
else
|
||||
set roomcard = left(ary_roomcard, pos_roomcard - 1);
|
||||
set ary_roomcard = right(ary_roomcard, length(ary_roomcard) - pos_roomcard);
|
||||
end if;
|
||||
|
||||
if isrobot = '0' then
|
||||
-- 保存当前战绩
|
||||
insert into player_grade(plgr_agentid, plgr_playerid, plgr_gameid,
|
||||
plgr_roomcode, plgr_ownerid, plgr_roomtype, plgr_createtime, plgr_makewartime,
|
||||
plgr_overtime, plgr_roomcard, plgr_gameinfo1, plgr_gameinfo2, plgr_ownercard,
|
||||
plgr_shortcode, plgr_deducttype, plgr_deductcard, plgr_asetcount, plgr_roommode)
|
||||
values(agentid, playerid, gameid, roomcode, ownerid, roomtype, createtime, makewartime,
|
||||
overtime, roomcard, gameinfo1, gameinfo2, ownertype,
|
||||
shortcode, deducttype, deductcard, asetcount, roommode);
|
||||
end if;
|
||||
end while;
|
||||
end
|
||||
;;
|
||||
delimiter ;
|
||||
|
||||
-- ----------------------------
|
||||
-- Procedure structure for cp_game_grade_save3
|
||||
-- ----------------------------
|
||||
DROP PROCEDURE IF EXISTS `cp_game_grade_save3`;
|
||||
delimiter ;;
|
||||
CREATE PROCEDURE `cp_game_grade_save3`(IN `agentid` varchar(32) charset utf8 collate utf8_general_ci ,IN `playerids` varchar(800) charset utf8 collate utf8_general_ci ,IN `gameid` varchar(32) charset utf8 collate utf8_general_ci ,IN `roomcode` int(8) ,IN `roomtype` varchar(200) charset utf8 collate utf8_general_ci ,IN `createtime` datetime ,IN `makewartime` datetime ,IN `overtime` datetime ,IN `gameinfo1` varchar(10000) charset utf8 collate utf8_general_ci ,IN `gameinfo2` mediumtext charset utf8 collate utf8_general_ci ,IN `ownerid` int(8) ,IN `grades` varchar(800) charset utf8 collate utf8_general_ci ,IN `roomcards` varchar(100) charset utf8 collate utf8_general_ci ,IN `ownercard` int(8) ,IN `shortcode` int(8) ,IN `deducttype` tinyint(1) ,IN `deductcard` int(8) ,IN `asetcount` int(11) ,IN `roommode` tinyint(1) ,IN `isrobots` varchar(800) charset utf8 collate utf8_general_ci ,IN `iswinners` varchar(800) charset utf8 collate utf8_general_ci)
|
||||
SQL SECURITY INVOKER
|
||||
COMMENT '保存战绩'
|
||||
begin
|
||||
declare ary_playerid varchar(800);
|
||||
declare ary_roomcard varchar(800);
|
||||
declare ary_isrobot varchar(800);
|
||||
declare ary_iswinner varchar(800);
|
||||
declare pos_playerid int(10);
|
||||
declare pos_roomcard int(10);
|
||||
declare pos_isrobot int(10);
|
||||
declare pos_iswinner int(10);
|
||||
declare playerid varchar(8);
|
||||
declare roomcard int(10);
|
||||
declare isrobot int(10);
|
||||
declare iswinner int(10);
|
||||
declare pos_ownerid int(10);
|
||||
declare ownerplay tinyint(1);
|
||||
declare ownertype int(11);
|
||||
|
||||
set ary_playerid = playerids;
|
||||
set ary_roomcard = roomcards;
|
||||
set ary_isrobot = isrobots;
|
||||
set ary_iswinner = iswinners;
|
||||
|
||||
set pos_ownerid = instr(ary_playerid, ownerid);
|
||||
if pos_ownerid = 0 then
|
||||
set ownerplay = 0;
|
||||
else
|
||||
set ownerplay = 1;
|
||||
end if;
|
||||
|
||||
while ary_playerid <> '' do
|
||||
set pos_playerid = instr(ary_playerid, ',');
|
||||
set pos_isrobot = instr(ary_isrobot, ',');
|
||||
set pos_iswinner = instr(ary_iswinner, ',');
|
||||
if pos_playerid = 0 then
|
||||
set playerid = ary_playerid;
|
||||
set isrobot = ary_isrobot;
|
||||
set iswinner = ary_iswinner;
|
||||
-- if ownerplay = 0 then
|
||||
set ownertype = ownercard;
|
||||
-- else
|
||||
-- set ownertype = null;
|
||||
-- end if;
|
||||
set ary_playerid = '';
|
||||
set ary_isrobot = '';
|
||||
set ary_iswinner = '';
|
||||
else
|
||||
set playerid = left(ary_playerid, pos_playerid - 1);
|
||||
set isrobot = left(ary_isrobot, pos_isrobot - 1);
|
||||
set iswinner = left(ary_iswinner, pos_iswinner - 1);
|
||||
set ownertype = null;
|
||||
set ary_playerid = right(ary_playerid, length(ary_playerid) - pos_playerid);
|
||||
set ary_isrobot = right(ary_isrobot, length(ary_isrobot) - pos_isrobot);
|
||||
set ary_iswinner = right(ary_iswinner, length(ary_iswinner) - pos_iswinner);
|
||||
end if;
|
||||
|
||||
set pos_roomcard = instr(ary_roomcard, ',');
|
||||
if pos_roomcard = 0 then
|
||||
set roomcard = ary_roomcard;
|
||||
set ary_roomcard = '';
|
||||
else
|
||||
set roomcard = left(ary_roomcard, pos_roomcard - 1);
|
||||
set ary_roomcard = right(ary_roomcard, length(ary_roomcard) - pos_roomcard);
|
||||
end if;
|
||||
|
||||
if isrobot = '0' then
|
||||
-- 保存当前战绩
|
||||
insert into player_grade(plgr_agentid, plgr_playerid, plgr_gameid,
|
||||
plgr_roomcode, plgr_ownerid, plgr_roomtype, plgr_createtime, plgr_makewartime,
|
||||
plgr_overtime, plgr_roomcard, plgr_gameinfo1, plgr_gameinfo2, plgr_ownercard,
|
||||
plgr_shortcode, plgr_deducttype, plgr_deductcard, plgr_asetcount, plgr_roommode,plgr_winner)
|
||||
values(agentid, playerid, gameid, roomcode, ownerid, roomtype, createtime, makewartime,
|
||||
overtime, roomcard, gameinfo1, gameinfo2, ownertype,
|
||||
shortcode, deducttype, deductcard, asetcount, roommode,iswinner);
|
||||
end if;
|
||||
end while;
|
||||
end
|
||||
;;
|
||||
delimiter ;
|
||||
|
||||
-- ----------------------------
|
||||
-- Procedure structure for cp_game_grade_save4
|
||||
-- ----------------------------
|
||||
DROP PROCEDURE IF EXISTS `cp_game_grade_save4`;
|
||||
delimiter ;;
|
||||
CREATE PROCEDURE `cp_game_grade_save4`(IN `agentid` varchar(32) charset utf8 collate utf8_general_ci ,IN `playerids` varchar(800) charset utf8 collate utf8_general_ci ,IN `gameid` varchar(32) charset utf8 collate utf8_general_ci ,IN `roomcode` int(8) ,IN `roomtype` varchar(200) charset utf8 collate utf8_general_ci ,IN `createtime` datetime ,IN `makewartime` datetime ,IN `overtime` datetime ,IN `gameinfo1` varchar(10000) charset utf8 collate utf8_general_ci ,IN `gameinfo2` mediumtext charset utf8 collate utf8_general_ci ,IN `ownerid` int(8) ,IN `grades` varchar(800) charset utf8 collate utf8_general_ci ,IN `roomcards` varchar(100) charset utf8 collate utf8_general_ci ,IN `ownercard` int(8) ,IN `shortcode` int(8) ,IN `deducttype` tinyint(1) ,IN `deductcard` int(8) ,IN `asetcount` int(11) ,IN `roommode` tinyint(1) ,IN `isrobots` varchar(800) charset utf8 collate utf8_general_ci ,IN `iswinners` varchar(800) charset utf8 collate utf8_general_ci ,IN `scores` varchar(800) charset utf8 collate utf8_general_ci)
|
||||
SQL SECURITY INVOKER
|
||||
COMMENT '保存战绩'
|
||||
begin
|
||||
declare ary_playerid varchar(800);
|
||||
declare ary_roomcard varchar(800);
|
||||
declare ary_isrobot varchar(800);
|
||||
declare ary_iswinner varchar(800);
|
||||
declare ary_score varchar(800);
|
||||
declare pos_playerid int(10);
|
||||
declare pos_roomcard int(10);
|
||||
declare pos_isrobot int(10);
|
||||
declare pos_iswinner int(10);
|
||||
declare pos_score int(10);
|
||||
declare playerid varchar(8);
|
||||
declare roomcard int(10);
|
||||
declare isrobot int(10);
|
||||
declare iswinner int(10);
|
||||
declare score int(10);
|
||||
declare pos_ownerid int(10);
|
||||
declare ownerplay tinyint(1);
|
||||
declare ownertype int(11);
|
||||
|
||||
set ary_playerid = playerids;
|
||||
set ary_roomcard = roomcards;
|
||||
set ary_isrobot = isrobots;
|
||||
set ary_iswinner = iswinners;
|
||||
set ary_score = scores;
|
||||
|
||||
set pos_ownerid = instr(ary_playerid, ownerid);
|
||||
if pos_ownerid = 0 then
|
||||
set ownerplay = 0;
|
||||
else
|
||||
set ownerplay = 1;
|
||||
end if;
|
||||
|
||||
while ary_playerid <> '' do
|
||||
set pos_playerid = instr(ary_playerid, ',');
|
||||
set pos_isrobot = instr(ary_isrobot, ',');
|
||||
set pos_iswinner = instr(ary_iswinner, ',');
|
||||
set pos_score = instr(ary_score, ',');
|
||||
if pos_playerid = 0 then
|
||||
set playerid = ary_playerid;
|
||||
set isrobot = ary_isrobot;
|
||||
set iswinner = ary_iswinner;
|
||||
set score = ary_score;
|
||||
-- if ownerplay = 0 then
|
||||
set ownertype = ownercard;
|
||||
-- else
|
||||
-- set ownertype = null;
|
||||
-- end if;
|
||||
set ary_playerid = '';
|
||||
set ary_isrobot = '';
|
||||
set ary_iswinner = '';
|
||||
set ary_score = '';
|
||||
else
|
||||
set playerid = left(ary_playerid, pos_playerid - 1);
|
||||
set isrobot = left(ary_isrobot, pos_isrobot - 1);
|
||||
set iswinner = left(ary_iswinner, pos_iswinner - 1);
|
||||
set score = left(ary_score, pos_score - 1);
|
||||
set ownertype = null;
|
||||
set ary_playerid = right(ary_playerid, length(ary_playerid) - pos_playerid);
|
||||
set ary_isrobot = right(ary_isrobot, length(ary_isrobot) - pos_isrobot);
|
||||
set ary_iswinner = right(ary_iswinner, length(ary_iswinner) - pos_iswinner);
|
||||
set ary_score = right(ary_score, length(ary_score) - pos_score);
|
||||
end if;
|
||||
|
||||
set pos_roomcard = instr(ary_roomcard, ',');
|
||||
if pos_roomcard = 0 then
|
||||
set roomcard = ary_roomcard;
|
||||
set ary_roomcard = '';
|
||||
else
|
||||
set roomcard = left(ary_roomcard, pos_roomcard - 1);
|
||||
set ary_roomcard = right(ary_roomcard, length(ary_roomcard) - pos_roomcard);
|
||||
end if;
|
||||
|
||||
if isrobot = '0' then
|
||||
-- 保存当前战绩
|
||||
insert into player_grade(plgr_agentid, plgr_playerid, plgr_gameid,
|
||||
plgr_roomcode, plgr_ownerid, plgr_roomtype, plgr_createtime, plgr_makewartime,
|
||||
plgr_overtime, plgr_roomcard, plgr_gameinfo1, plgr_gameinfo2, plgr_ownercard,
|
||||
plgr_shortcode, plgr_deducttype, plgr_deductcard, plgr_asetcount, plgr_roommode,plgr_winner,plgr_score)
|
||||
values(agentid, playerid, gameid, roomcode, ownerid, roomtype, createtime, makewartime,
|
||||
overtime, roomcard, gameinfo1, gameinfo2, ownertype,
|
||||
shortcode, deducttype, deductcard, asetcount, roommode,iswinner,score);
|
||||
end if;
|
||||
end while;
|
||||
end
|
||||
;;
|
||||
delimiter ;
|
||||
|
||||
-- ----------------------------
|
||||
-- Procedure structure for cp_game_save_matchranking
|
||||
-- ----------------------------
|
||||
DROP PROCEDURE IF EXISTS `cp_game_save_matchranking`;
|
||||
delimiter ;;
|
||||
CREATE PROCEDURE `cp_game_save_matchranking`(IN `agentid` varchar(32) charset utf8 collate utf8_general_ci ,IN `gameid` varchar(32) charset utf8 collate utf8_general_ci ,IN `matchid` varchar(10) charset utf8 collate utf8_general_ci ,IN `matchidx` tinyint(2) ,IN `matchname` varchar(100) charset utf8 collate utf8_general_ci ,IN `beginTime` varchar(20) charset utf8 collate utf8_general_ci ,IN `endTime` varchar(20) charset utf8 collate utf8_general_ci ,IN `roomtype` varchar(200) charset utf8 collate utf8_general_ci ,IN `imageurl` varchar(200) charset utf8 collate utf8_general_ci ,IN `playercount` int(8) ,IN `playercount2` int(8) ,IN `bean` int(8) ,IN `roomcard` int(8) ,IN `topcount` int(8) ,IN `circulation` int(8) ,IN `iinterval` int(8) ,IN `gradename` varchar(20) charset utf8 collate utf8_general_ci ,IN `memo1` varchar(800) charset utf8 collate utf8_general_ci ,IN `memo2` varchar(800) charset utf8 collate utf8_general_ci ,IN `memo3` varchar(800) charset utf8 collate utf8_general_ci ,IN `ranking` mediumtext charset utf8 collate utf8_general_ci ,IN `playeridlist` varchar(1000) charset utf8 collate utf8_general_ci ,IN `nicknamelist` varchar(4000) charset utf8 collate utf8_general_ci ,IN `avatarlist` varchar(20000) charset utf8 collate utf8_general_ci ,IN `roomcodelist` varchar(1000) charset utf8 collate utf8_general_ci ,IN `overtimelist` varchar(4000) charset utf8 collate utf8_general_ci ,IN `gradelist` varchar(4000) charset utf8 collate utf8_general_ci ,IN `isrobotlist` varchar(400) charset utf8 collate utf8_general_ci)
|
||||
SQL SECURITY INVOKER
|
||||
COMMENT '保存比赛排行榜'
|
||||
begin
|
||||
declare ary_playerid varchar(1000);
|
||||
declare ary_nickname varchar(4000);
|
||||
declare ary_avatar varchar(20000);
|
||||
declare ary_roomcode varchar(1000);
|
||||
declare ary_overtime varchar(4000);
|
||||
declare ary_grade varchar(4000);
|
||||
declare ary_isrobot varchar(400);
|
||||
|
||||
declare pos_playerid int(8);
|
||||
declare pos_nickname int(8);
|
||||
declare pos_avatar int(8);
|
||||
declare pos_roomcode int(8);
|
||||
declare pos_overtime int(8);
|
||||
declare pos_grade int(8);
|
||||
declare pos_isrobot int(8);
|
||||
|
||||
declare s_playerid varchar(8);
|
||||
declare s_nickname varchar(100);
|
||||
declare s_avatar varchar(200);
|
||||
declare s_roomcode varchar(8);
|
||||
declare s_overtime varchar(30);
|
||||
declare s_grade varchar(10);
|
||||
declare s_isrobot varchar(1);
|
||||
|
||||
delete from `match`
|
||||
where matc_agentid = agentid
|
||||
and matc_gameid = gameid
|
||||
and matc_matchid = matchid
|
||||
and matc_matchidx = matchidx;
|
||||
|
||||
insert into `match`(matc_agentid, matc_gameid, matc_matchid, matc_matchidx,
|
||||
matc_matchname, matc_beginTime, matc_endTime, matc_roomtype,
|
||||
matc_imageurl, matc_playercount, matc_playercount2, matc_bean,
|
||||
matc_roomcard, matc_topcount, matc_circulation, matc_interval,
|
||||
matc_gradename, matc_memo1, matc_memo2, matc_memo3, matc_ranking)
|
||||
values(agentid, gameid, matchid, matchidx,
|
||||
matchname, beginTime, endTime, roomtype,
|
||||
imageurl, playercount, playercount2, bean,
|
||||
roomcard, topcount, circulation, iinterval,
|
||||
gradename, memo1, memo2, memo3, ranking);
|
||||
|
||||
delete from match_ranking
|
||||
where mara_agentid = agentid
|
||||
and mara_gameid = gameid
|
||||
and mara_matchid = matchid
|
||||
and mara_matchidx = matchidx;
|
||||
|
||||
set ary_playerid = playeridlist;
|
||||
set ary_nickname = nicknamelist;
|
||||
set ary_avatar = avatarlist;
|
||||
set ary_roomcode = roomcodelist;
|
||||
set ary_overtime = overtimelist;
|
||||
set ary_grade = gradelist;
|
||||
set ary_isrobot = isrobotlist;
|
||||
|
||||
while ary_playerid <> '' do
|
||||
set pos_playerid = instr(ary_playerid, ',');
|
||||
set pos_nickname = instr(ary_nickname, ',');
|
||||
set pos_avatar = instr(ary_avatar, ',');
|
||||
set pos_roomcode = instr(ary_roomcode, ',');
|
||||
set pos_overtime = instr(ary_overtime, ',');
|
||||
set pos_grade = instr(ary_grade, ',');
|
||||
set pos_isrobot = instr(ary_isrobot, ',');
|
||||
if pos_playerid = 0 then
|
||||
set s_playerid = ary_playerid;
|
||||
set s_nickname = ary_nickname;
|
||||
set s_avatar = ary_avatar;
|
||||
set s_roomcode = ary_roomcode;
|
||||
set s_overtime = ary_overtime;
|
||||
set s_grade = ary_grade;
|
||||
set s_isrobot = ary_isrobot;
|
||||
set ary_playerid = '';
|
||||
set ary_nickname = '';
|
||||
set ary_avatar = '';
|
||||
set ary_roomcode = '';
|
||||
set ary_overtime = '';
|
||||
set ary_grade = '';
|
||||
set ary_isrobot = '';
|
||||
else
|
||||
set s_playerid = left(ary_playerid, pos_playerid - 1);
|
||||
set s_nickname = left(ary_nickname, pos_nickname - 1);
|
||||
set s_avatar = left(ary_avatar, pos_avatar - 1);
|
||||
set s_roomcode = left(ary_roomcode, pos_roomcode - 1);
|
||||
set s_overtime = left(ary_overtime, pos_overtime - 1);
|
||||
set s_grade = left(ary_grade, pos_grade - 1);
|
||||
set s_isrobot = left(ary_isrobot, pos_isrobot - 1);
|
||||
set ary_playerid = substring(ary_playerid, 1 + pos_playerid);
|
||||
set ary_nickname = substring(ary_nickname, 1 + pos_nickname);
|
||||
set ary_avatar = substring(ary_avatar, 1 + pos_avatar);
|
||||
set ary_roomcode = substring(ary_roomcode, 1 + pos_roomcode);
|
||||
set ary_overtime = substring(ary_overtime, 1 + pos_overtime);
|
||||
set ary_grade = substring(ary_grade, 1 + pos_grade);
|
||||
set ary_isrobot = substring(ary_isrobot, 1 + pos_isrobot);
|
||||
end if;
|
||||
|
||||
insert into match_ranking(mara_agentid, mara_gameid, mara_matchid, mara_matchidx,
|
||||
mara_playerid, mara_nickname, mara_avatar, mara_roomcode,
|
||||
mara_overtime, mara_grade, mara_isrobot)
|
||||
values (agentid, gameid, matchid, matchidx, s_playerid, s_nickname,
|
||||
s_avatar, s_roomcode, s_overtime, s_grade, s_isrobot);
|
||||
end while;
|
||||
end
|
||||
;;
|
||||
delimiter ;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
2520
codes/games/sql/game/db/youlehudong.sql
Normal file
2520
codes/games/sql/game/db/youlehudong.sql
Normal file
File diff suppressed because it is too large
Load Diff
BIN
tools/keystore/daoqi_game_1.keystore
Normal file
BIN
tools/keystore/daoqi_game_1.keystore
Normal file
Binary file not shown.
30
tools/keystore/daoqi_game_1.txt
Normal file
30
tools/keystore/daoqi_game_1.txt
Normal file
@@ -0,0 +1,30 @@
|
||||
密钥库类型: PKCS12
|
||||
密钥库提供方: SunJSSE
|
||||
|
||||
您的密钥库包含 1 个条目
|
||||
|
||||
别名: gamehall
|
||||
创建日期: 2026-3-5
|
||||
条目类型: PrivateKeyEntry
|
||||
证书链长度: 1
|
||||
证书[1]:
|
||||
所有者: L=CN, O=daoqi, OU=daoqi, CN=daoqi
|
||||
发布者: L=CN, O=daoqi, OU=daoqi, CN=daoqi
|
||||
序列号: 1
|
||||
生效时间: Thu Mar 05 08:16:17 CST 2026, 失效时间: Mon Feb 27 08:16:17 CST 2051
|
||||
证书指纹:
|
||||
SHA1: 67:D1:7E:0E:E9:E7:C0:D0:93:AA:92:45:90:4C:33:16:C8:DB:7D:DB
|
||||
SHA256: 49:8F:C8:CC:AB:BB:38:A1:C5:29:FB:52:D9:00:D7:9E:B8:F9:9E:75:C3:DB:08:27:BD:09:D5:53:75:82:F0:2F
|
||||
签名算法名称: SHA256withRSA
|
||||
主体公共密钥算法: 2048 位 RSA 密钥
|
||||
版本: 1
|
||||
|
||||
|
||||
*******************************************
|
||||
*******************************************
|
||||
|
||||
|
||||
|
||||
|
||||
微信开放平台应用签名:
|
||||
d9e138b6f20acfa14ae73113c7e44727
|
||||
BIN
tools/keystore/daoqi_game_2.keystore
Normal file
BIN
tools/keystore/daoqi_game_2.keystore
Normal file
Binary file not shown.
30
tools/keystore/daoqi_game_2.txt
Normal file
30
tools/keystore/daoqi_game_2.txt
Normal file
@@ -0,0 +1,30 @@
|
||||
密钥库类型: PKCS12
|
||||
密钥库提供方: SunJSSE
|
||||
|
||||
您的密钥库包含 1 个条目
|
||||
|
||||
别名: gamehall
|
||||
创建日期: 2026-3-14
|
||||
条目类型: PrivateKeyEntry
|
||||
证书链长度: 1
|
||||
证书[1]:
|
||||
所有者: O=daoqi, OU=daoqi, CN=daoqi
|
||||
发布者: O=daoqi, OU=daoqi, CN=daoqi
|
||||
序列号: 1
|
||||
生效时间: Sat Mar 14 17:14:24 CST 2026, 失效时间: Wed Mar 08 17:14:24 CST 2051
|
||||
证书指纹:
|
||||
SHA1: 2F:76:97:3D:DC:E5:EA:56:7A:2B:53:E6:24:EF:74:CF:12:DF:A6:09
|
||||
SHA256: B8:73:5A:3E:90:57:49:95:F7:B8:BB:0F:05:E7:76:7C:27:96:F8:5E:6F:66:96:4E:F0:0F:69:B1:E9:22:28:2F
|
||||
签名算法名称: SHA256withRSA
|
||||
主体公共密钥算法: 2048 位 RSA 密钥
|
||||
版本: 1
|
||||
|
||||
|
||||
*******************************************
|
||||
*******************************************
|
||||
|
||||
|
||||
|
||||
|
||||
微信开放平台应用签名:
|
||||
6f0e6ad5c028c9824eeb55c222c0f1af
|
||||
BIN
tools/keystore/daoqi_game_3.keystore
Normal file
BIN
tools/keystore/daoqi_game_3.keystore
Normal file
Binary file not shown.
30
tools/keystore/daoqi_game_3.txt
Normal file
30
tools/keystore/daoqi_game_3.txt
Normal file
@@ -0,0 +1,30 @@
|
||||
密钥库类型: PKCS12
|
||||
密钥库提供方: SunJSSE
|
||||
|
||||
您的密钥库包含 1 个条目
|
||||
|
||||
别名: gamehall
|
||||
创建日期: 2026-3-15
|
||||
条目类型: PrivateKeyEntry
|
||||
证书链长度: 1
|
||||
证书[1]:
|
||||
所有者: O=daoqi, OU=daoqi, CN=daoqi
|
||||
发布者: O=daoqi, OU=daoqi, CN=daoqi
|
||||
序列号: 1
|
||||
生效时间: Sun Mar 15 17:42:36 CST 2026, 失效时间: Thu Mar 09 17:42:36 CST 2051
|
||||
证书指纹:
|
||||
SHA1: 44:8D:D5:4D:F3:D2:EA:F0:92:06:2D:69:9A:6C:8B:C3:EB:E5:70:CD
|
||||
SHA256: 16:2B:EE:3F:3E:8A:64:A4:20:6E:4C:96:31:0F:21:D1:57:FC:FC:7E:3B:0A:AD:A3:34:0D:6F:AC:7E:99:0A:FB
|
||||
签名算法名称: SHA256withRSA
|
||||
主体公共密钥算法: 2048 位 RSA 密钥
|
||||
版本: 1
|
||||
|
||||
|
||||
*******************************************
|
||||
*******************************************
|
||||
|
||||
|
||||
|
||||
|
||||
微信开放平台应用签名:
|
||||
03f192808871ad51dbbf7b6e94c2d885
|
||||
BIN
tools/keystore/gamehall.keystore
Normal file
BIN
tools/keystore/gamehall.keystore
Normal file
Binary file not shown.
41
tools/keystore/gamehall.txt
Normal file
41
tools/keystore/gamehall.txt
Normal file
@@ -0,0 +1,41 @@
|
||||
密钥库类型: JKS
|
||||
密钥库提供方: SUN
|
||||
|
||||
您的密钥库包含 1 个条目
|
||||
|
||||
别名: gamehall
|
||||
创建日期: 2017-3-8
|
||||
条目类型: PrivateKeyEntry
|
||||
证书链长度: 1
|
||||
证书[1]:
|
||||
所有者: CN=友乐互动游戏, OU=游戏部, O=天盛网络, L=南昌, ST=江西, C=CN
|
||||
发布者: CN=友乐互动游戏, OU=游戏部, O=天盛网络, L=南昌, ST=江西, C=CN
|
||||
序列号: 72f9b86c
|
||||
生效时间: Wed Mar 08 09:55:16 CST 2017, 失效时间: Sun Mar 02 09:55:16 CST 2042
|
||||
证书指纹:
|
||||
SHA1: 08:CA:91:93:45:D3:C0:B4:76:73:E1:E6:7A:3D:74:C9:3E:B7:A7:11
|
||||
SHA256: 95:36:ED:0E:52:38:92:AF:F9:F1:07:B6:4D:7B:07:F9:93:92:1E:EB:E2:33:FE:FE:D8:21:2A:CE:C2:57:F6:72
|
||||
签名算法名称: SHA256withRSA
|
||||
主体公共密钥算法: 2048 位 RSA 密钥
|
||||
版本: 3
|
||||
|
||||
扩展:
|
||||
|
||||
#1: ObjectId: 2.5.29.14 Criticality=false
|
||||
SubjectKeyIdentifier [
|
||||
KeyIdentifier [
|
||||
0000: 58 9C EB 3D 84 A1 10 15 B4 2C 20 A6 2E 42 AC B9 X..=....., ..B..
|
||||
0010: 7A B8 66 E2 z.f.
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
|
||||
*******************************************
|
||||
*******************************************
|
||||
|
||||
|
||||
|
||||
|
||||
微信开放平台应用签名:
|
||||
52f8eed9c81dbaf314561e1809c916f5
|
||||
Reference in New Issue
Block a user