Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
goods
Project
Project
Details
Activity
Releases
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
bp
goods
Commits
1902b167
Commit
1902b167
authored
Nov 30, 2021
by
顾文旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
防止重复计算
parent
6ffb21b8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
Colonelorder.php
application/modules/Job/controllers/Colonelorder.php
+9
-0
No files found.
application/modules/Job/controllers/Colonelorder.php
View file @
1902b167
...
@@ -5,6 +5,8 @@
...
@@ -5,6 +5,8 @@
* Date: 2021/9/3 2:23 下午
* Date: 2021/9/3 2:23 下午
*/
*/
use
Api\PhpUtils\Log\FileLog
;
use
Api\PhpUtils\Redis\RedisUtil
;
use
App\Base\Base
;
use
App\Base\Base
;
use
App\Base\Job
;
use
App\Base\Job
;
use
Api\PhpServices\Idgen\Idgen
;
use
Api\PhpServices\Idgen\Idgen
;
...
@@ -52,6 +54,13 @@ class ColonelorderController extends Base
...
@@ -52,6 +54,13 @@ class ColonelorderController extends Base
*/
*/
public
function
indexAction
()
public
function
indexAction
()
{
{
$redis
=
RedisUtil
::
getInstance
(
'cache'
,
[
'serializer'
=>
'none'
]);
$date
=
$redis
->
get
(
$this
->
settlementDate
);
if
(
!
empty
(
$date
))
{
FileLog
::
error
(
"ColonelorderController index "
,
"重复计算奖励!!!"
);
return
;
}
$redis
->
set
(
$this
->
settlementDate
,
1
);
$this
->
loggerInfo
(
'start'
);
$this
->
loggerInfo
(
'start'
);
if
(
$userIdList
=
ColonelDistributorColonel
::
getColonelUserIds
())
{
if
(
$userIdList
=
ColonelDistributorColonel
::
getColonelUserIds
())
{
$userIdList
=
array_chunk
(
$userIdList
,
self
::
DEFAULT_USER_BATCH_SIZE
);
$userIdList
=
array_chunk
(
$userIdList
,
self
::
DEFAULT_USER_BATCH_SIZE
);
...
...
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