Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
39da806f
Commit
39da806f
authored
May 08, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
定时异常处理
parent
9637d40a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
SquareTask.php
application/task/controller/SquareTask.php
+14
-0
No files found.
application/task/controller/SquareTask.php
View file @
39da806f
...
@@ -7,6 +7,7 @@ namespace app\task\controller;
...
@@ -7,6 +7,7 @@ namespace app\task\controller;
use
app\api_broker\service\SquareSortService
;
use
app\api_broker\service\SquareSortService
;
use
app\model\BSquare
;
use
app\model\BSquare
;
use
app\model\BSquareSort
;
use
app\model\BSquareSort
;
use
think\Log
;
class
SquareTask
class
SquareTask
{
{
...
@@ -18,6 +19,12 @@ class SquareTask
...
@@ -18,6 +19,12 @@ class SquareTask
$this
->
m_square
=
new
BSquare
();
$this
->
m_square
=
new
BSquare
();
}
}
/**
* 备份redis开盘排序
*
* User HuJun
* Date 19-5-8 上午10:09
*/
public
function
squareBackUp
()
{
public
function
squareBackUp
()
{
$save_data
=
$square_id
=
[];
$save_data
=
$square_id
=
[];
...
@@ -42,6 +49,7 @@ class SquareTask
...
@@ -42,6 +49,7 @@ class SquareTask
$square_id
=
array_unique
(
$square_id
);
$square_id
=
array_unique
(
$square_id
);
sort
(
$square_id
);
sort
(
$square_id
);
try
{
foreach
(
$square_id
as
$k
=>
$v
)
{
foreach
(
$square_id
as
$k
=>
$v
)
{
if
(
isset
(
$look_num
[
$v
]))
{
if
(
isset
(
$look_num
[
$v
]))
{
$save_data
[
'browse_number'
]
=
$look_num
[
$v
];
$save_data
[
'browse_number'
]
=
$look_num
[
$v
];
...
@@ -66,5 +74,10 @@ class SquareTask
...
@@ -66,5 +74,10 @@ class SquareTask
$this
->
m_sort
->
insertData
(
$save_data
);
$this
->
m_sort
->
insertData
(
$save_data
);
}
}
}
}
}
catch
(
\Exception
$e
)
{
Log
::
write
(
$e
->
getMessage
(),
'redis_backUp_square_task'
);
//记录日志
}
return
;
}
}
}
}
\ No newline at end of file
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