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
30bf371e
Commit
30bf371e
authored
Sep 01, 2021
by
pengfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update 团长分销-奖励脚本增加日志
parent
f2449dd3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
13 deletions
+20
-13
Colonelorder.php
application/modules/Cli/controllers/Colonelorder.php
+16
-13
Colonelwallet.php
application/modules/Cli/controllers/Colonelwallet.php
+4
-0
No files found.
application/modules/Cli/controllers/Colonelorder.php
View file @
30bf371e
...
...
@@ -36,21 +36,23 @@ class ColonelorderController extends Cli
public
function
indexAction
()
{
FileLog
::
info
(
"colonel_distributor_order"
,
'团长分销-计算奖励脚本:start'
);
$userIdList
=
$this
->
getColonelUserIds
();
if
(
empty
(
$userIdList
)
||
empty
(
$this
->
colonelConfigList
))
{
return
true
;
}
$userIdList
=
array_chunk
(
$userIdList
,
self
::
DEFAULT_USER_BATCH_SIZE
);
$colonelPayInfoData
=
[];
foreach
(
$userIdList
as
$userIds
)
{
$batchPayInfoData
=
[]
;
// 完成目标单数
$batchPayInfoData
[]
=
$this
->
getInviteOrd
erData
(
$userIds
);
// 邀请新用户奖励
$batchPayInfoData
[]
=
$this
->
getInviteNewUserData
(
$userIds
);
$
colonelPayInfoData
=
array_merge
(
$colonelPayInfoData
,
$batch
PayInfoData
);
if
(
!
empty
(
$userIdList
)
&&
!
empty
(
$this
->
colonelConfigList
))
{
$userIdList
=
array_chunk
(
$userIdList
,
self
::
DEFAULT_USER_BATCH_SIZE
)
;
$colonelPayInfoData
=
[];
foreach
(
$userIdList
as
$userIds
)
{
$batchPayInfoData
=
[];
// 完成目标单数
$batchPayInfoData
[]
=
$this
->
getInviteOrderData
(
$userIds
)
;
// 邀请新用户奖励
$batchPayInfoData
[]
=
$this
->
getInviteNewUs
erData
(
$userIds
);
$colonelPayInfoData
=
array_merge
(
$colonelPayInfoData
,
$batchPayInfoData
);
}
$
this
->
handleSavePayInfo
(
$colonel
PayInfoData
);
}
return
$this
->
handleSavePayInfo
(
$colonelPayInfoData
);
FileLog
::
info
(
"colonel_distributor_order"
,
'团长分销-计算奖励脚本:end'
);
echo
"success"
;
}
/**
...
...
@@ -60,6 +62,7 @@ class ColonelorderController extends Cli
*/
public
function
handleSavePayInfo
(
$colonelPayInfoData
)
{
FileLog
::
info
(
"colonel_distributor_order"
,
'团长分销-计算奖励脚本:colonelPayInfoCount='
.
count
(
$colonelPayInfoData
));
if
(
!
empty
(
$colonelPayInfoData
))
{
$data
=
$this
->
addIdgenId
(
$colonelPayInfoData
);
try
{
...
...
application/modules/Cli/controllers/Colonelwallet.php
View file @
30bf371e
...
...
@@ -13,8 +13,10 @@ class ColonelwalletController extends Cli
{
public
function
indexAction
()
{
FileLog
::
info
(
"colonel_distributor_wallet"
,
'团长分销-奖励钱包脚本:start'
);
$yesterday
=
date
(
"Y-m-d"
,
strtotime
(
"-1 day"
));
$payInfoList
=
$this
->
getPayInfo
(
$yesterday
);
FileLog
::
info
(
"colonel_distributor_wallet"
,
'团长分销-奖励钱包脚本:payInfoCount='
.
count
(
$payInfoList
));
if
(
!
empty
(
$payInfoList
))
{
if
(
$this
->
toWallet
(
$payInfoList
))
{
if
(
$this
->
deductingInventory
(
$payInfoList
))
{
...
...
@@ -22,6 +24,8 @@ class ColonelwalletController extends Cli
}
}
}
FileLog
::
info
(
"colonel_distributor_wallet"
,
'团长分销-奖励钱包脚本:end'
);
echo
"success"
;
}
/**
...
...
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