Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
clubAdmin
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhoujun
clubAdmin
Commits
21e8b3f2
Commit
21e8b3f2
authored
Aug 10, 2021
by
zhoujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整日志类别
parent
27829f87
Pipeline
#2184
passed with stage
in 0 seconds
Changes
9
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
40 additions
and
2 deletions
+40
-2
app/Console/Commands/ClearLogData.php
app/Console/Commands/ClearLogData.php
+1
-0
app/Console/Commands/PolymerizeWithdrawal.php
app/Console/Commands/PolymerizeWithdrawal.php
+1
-0
app/Console/Commands/SendDDMsg.php
app/Console/Commands/SendDDMsg.php
+1
-0
app/Console/Commands/SingleDayWithdrawal.php
app/Console/Commands/SingleDayWithdrawal.php
+1
-0
app/Console/Commands/SingleUserDayWithdrawal.php
app/Console/Commands/SingleUserDayWithdrawal.php
+1
-0
app/Console/Commands/SingleWithdrawal.php
app/Console/Commands/SingleWithdrawal.php
+1
-0
app/Http/Controllers/CheckController.php
app/Http/Controllers/CheckController.php
+25
-0
app/Services/Script/ScriptService.php
app/Services/Script/ScriptService.php
+7
-2
routes/web.php
routes/web.php
+2
-0
No files found.
app/Console/Commands/ClearLogData.php
View file @
21e8b3f2
...
...
@@ -47,6 +47,7 @@ class ClearLogData extends Command
{
set_time_limit
(
0
);
$this
->
line
(
'开始'
);
Log
::
setGroup
(
'Commands'
)
->
info
(
'清除历史聚合数据'
,
[
'info'
=>
[
'time'
=>
date
(
'Y-m-d H:i:s'
)]]);
$this
->
scriptService
->
getClearLogData
();
$this
->
line
(
'结束'
);
}
...
...
app/Console/Commands/PolymerizeWithdrawal.php
View file @
21e8b3f2
...
...
@@ -47,6 +47,7 @@ class PolymerizeWithdrawal extends Command
{
set_time_limit
(
0
);
$this
->
line
(
'开始'
);
Log
::
setGroup
(
'Commands'
)
->
info
(
'聚合玩家提现数据'
,
[
'info'
=>
[
'time'
=>
date
(
'Y-m-d H:i:s'
)]]);
$this
->
scriptService
->
getPolymerizeWithdrawal
();
$this
->
line
(
'结束'
);
}
...
...
app/Console/Commands/SendDDMsg.php
View file @
21e8b3f2
...
...
@@ -47,6 +47,7 @@ class SendDDMsg extends Command
{
set_time_limit
(
0
);
$this
->
line
(
'开始'
);
Log
::
setGroup
(
'Commands'
)
->
info
(
'发送钉钉消息预警'
,
[
'info'
=>
[
'time'
=>
date
(
'Y-m-d H:i:s'
)]]);
$this
->
scriptService
->
getSendDDMsg
();
$this
->
line
(
'结束'
);
}
...
...
app/Console/Commands/SingleDayWithdrawal.php
View file @
21e8b3f2
...
...
@@ -47,6 +47,7 @@ class SingleDayWithdrawal extends Command
{
set_time_limit
(
0
);
$this
->
line
(
'开始'
);
Log
::
setGroup
(
'Commands'
)
->
info
(
'单日提现预警'
,
[
'info'
=>
[
'time'
=>
date
(
'Y-m-d H:i:s'
)]]);
$this
->
scriptService
->
getSingleDayWithdrawal
();
$this
->
line
(
'结束'
);
}
...
...
app/Console/Commands/SingleUserDayWithdrawal.php
View file @
21e8b3f2
...
...
@@ -47,6 +47,7 @@ class SingleUserDayWithdrawal extends Command
{
set_time_limit
(
0
);
$this
->
line
(
'开始'
);
Log
::
setGroup
(
'Commands'
)
->
info
(
'单日单用户提现预警'
,
[
'info'
=>
[
'time'
=>
date
(
'Y-m-d H:i:s'
)]]);
$this
->
scriptService
->
getSingleUserDayWithdrawal
();
$this
->
line
(
'结束'
);
}
...
...
app/Console/Commands/SingleWithdrawal.php
View file @
21e8b3f2
...
...
@@ -47,6 +47,7 @@ class SingleWithdrawal extends Command
{
set_time_limit
(
0
);
$this
->
line
(
'开始'
);
Log
::
setGroup
(
'Commands'
)
->
info
(
'单次提现预警'
,
[
'info'
=>
[
'time'
=>
date
(
'Y-m-d H:i:s'
)]]);
$this
->
scriptService
->
getSingleWithdrawal
();
$this
->
line
(
'结束'
);
}
...
...
app/Http/Controllers/CheckController.php
0 → 100644
View file @
21e8b3f2
<?php
namespace
App\Http\Controllers
;
use
Illuminate\Http\Request
;
use
Illuminate\Support\Facades\DB
;
use
PDOException
;
use
RedisException
;
use
Illuminate\Support\Facades\Redis
;
use
App\Http\Controllers\Controller
;
class
CheckController
extends
Controller
{
public
function
getCheckDB
()
{
$dbNames
=
[
'mysql'
=>
'小游戏数据库'
];
foreach
(
$dbNames
as
$key
=>
$val
)
{
try
{
DB
::
connection
(
$key
)
->
getPdo
();
}
catch
(
PDOException
$e
)
{
return
response
(
'小游戏(clubAdmin):'
.
$val
.
'连接失败('
.
$key
.
')<br>'
.
$e
->
getMessage
(),
500
);
}
}
return
response
(
'OK'
);
}
}
\ No newline at end of file
app/Services/Script/ScriptService.php
View file @
21e8b3f2
...
...
@@ -67,6 +67,8 @@ class ScriptService implements IScriptService
$tem
[
'updated_at'
]
=
$this
->
time
;
$array
[]
=
$tem
;
}
Log
::
setGroup
(
'Commands'
)
->
info
(
'单次预警数据'
,
[
'info'
=>
[
'time'
=>
date
(
'Y-m-d H:i:s'
),
'data'
=>
$array
]]);
DB
::
beginTransaction
();
try
{
if
(
!
empty
(
$array
))
WarnWaitModel
::
insert
(
$array
);
...
...
@@ -219,7 +221,7 @@ class ScriptService implements IScriptService
$array
[
$key
]
=
$tem
;
}
}
Log
::
setGroup
(
'Commands'
)
->
info
(
'聚合玩家提现数据'
,
[
'info'
=>
[
'time'
=>
date
(
'Y-m-d H:i:s'
),
'data'
=>
$array
]]);
DB
::
beginTransaction
();
try
{
if
(
!
empty
(
$array
)){
...
...
@@ -301,7 +303,7 @@ class ScriptService implements IScriptService
$tem
[
'updated_at'
]
=
$this
->
time
;
$array
[]
=
$tem
;
}
Log
::
setGroup
(
'Commands'
)
->
info
(
'单日最高提现预警'
,
[
'info'
=>
[
'time'
=>
date
(
'Y-m-d H:i:s'
),
'data'
=>
$array
]]);
if
(
!
empty
(
$array
)){
foreach
(
$array
as
$key
=>
$arr
){
$verity
=
WarnWaitModel
::
where
(
'ymd'
,
$arr
[
'ymd'
])
->
where
(
'config_id'
,
$arr
[
'config_id'
])
->
where
(
'type'
,
2
)
->
select
(
'id'
)
->
first
();
...
...
@@ -353,6 +355,8 @@ class ScriptService implements IScriptService
$tem
[
'updated_at'
]
=
$this
->
time
;
$array
[]
=
$tem
;
}
Log
::
setGroup
(
'Commands'
)
->
info
(
'单日单用户最高提现预警'
,
[
'info'
=>
[
'time'
=>
date
(
'Y-m-d H:i:s'
),
'data'
=>
$array
]]);
if
(
!
empty
(
$array
)){
foreach
(
$array
as
$key
=>
$arr
){
$verity
=
WarnWaitModel
::
where
(
'ymd'
,
$arr
[
'ymd'
])
->
where
(
'user_id'
,
$arr
[
'user_id'
])
->
where
(
'type'
,
3
)
->
select
(
'id'
)
->
first
();
...
...
@@ -404,5 +408,6 @@ class ScriptService implements IScriptService
}
if
(
!
empty
(
$logs
))
WarnLogModel
::
insert
(
$logs
);
return
true
;
}
}
\ No newline at end of file
routes/web.php
View file @
21e8b3f2
...
...
@@ -14,3 +14,5 @@
Route
::
get
(
'/'
,
function
()
{
return
view
(
'welcome'
);
});
Route
::
get
(
'health/status'
,
'CheckController@getCheckDB'
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment