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
d5e7bb31
Commit
d5e7bb31
authored
Sep 06, 2021
by
pengfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update 团长分销-奖励脚本
parent
1789292b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
15 deletions
+14
-15
Colonelorder.php
application/modules/Job/controllers/Colonelorder.php
+12
-15
Colonelwallet.php
application/modules/Job/controllers/Colonelwallet.php
+2
-0
No files found.
application/modules/Job/controllers/Colonelorder.php
View file @
d5e7bb31
...
@@ -101,7 +101,7 @@ class ColonelorderController extends Job
...
@@ -101,7 +101,7 @@ class ColonelorderController extends Job
*/
*/
private
function
getInviteNewUserData
(
$userIds
,
&
$colonelPayInfoData
)
private
function
getInviteNewUserData
(
$userIds
,
&
$colonelPayInfoData
)
{
{
if
(
$inviteNewUserList
=
$this
->
getInviteNewUserList
(
$userIds
))
{
if
(
$inviteNewUserList
=
$this
->
getInviteNewUserList
(
$userIds
,
$this
->
startTime
,
$this
->
endTime
))
{
$userNickList
=
$this
->
getUserList
(
array_column
(
$inviteNewUserList
,
'user_id'
));
$userNickList
=
$this
->
getUserList
(
array_column
(
$inviteNewUserList
,
'user_id'
));
foreach
(
$inviteNewUserList
as
$newUser
)
{
foreach
(
$inviteNewUserList
as
$newUser
)
{
$colonelPayInfoData
[]
=
[
$colonelPayInfoData
[]
=
[
...
@@ -148,24 +148,19 @@ class ColonelorderController extends Job
...
@@ -148,24 +148,19 @@ class ColonelorderController extends Job
/**
/**
* 团长任务配置
* 团长任务配置
* @param $
yesterday
* @param $
settlementDate
* @return array
* @return array
*/
*/
private
function
getColonelConfig
(
$
yesterday
)
:
array
private
function
getColonelConfig
(
$
settlementDate
)
:
array
{
{
$config
=
ColonelDistributorConfig
::
getRecord
([
$config
=
ColonelDistributorConfig
::
getRecord
([
'date'
=>
$yesterday
,
'date[<=]'
=>
$settlementDate
,
'type'
=>
ColonelDistributorConfig
::
TYPE_COLONEL
'type'
=>
ColonelDistributorConfig
::
TYPE_COLONEL
,
'ORDER'
=>
[
'date'
=>
'DESC'
],
'LIMIT'
=>
1
]);
]);
if
(
empty
(
$config
))
{
$config
=
ColonelDistributorConfig
::
getRecord
([
'date[<=]'
=>
$yesterday
,
'ORDER'
=>
[
'date'
=>
'DESC'
],
'LIMIT'
=>
1
]);
}
$configData
=
[];
$configData
=
[];
if
(
empty
(
$config
[
'data'
]))
{
if
(
!
empty
(
$config
[
'data'
]))
{
$configData
=
json_decode
(
$config
[
'data'
],
true
);
$configData
=
json_decode
(
$config
[
'data'
],
true
);
}
}
return
$configData
;
return
$configData
;
...
@@ -193,10 +188,12 @@ class ColonelorderController extends Job
...
@@ -193,10 +188,12 @@ class ColonelorderController extends Job
* User: pengfei@yidian-inc.com
* User: pengfei@yidian-inc.com
* Date: 2021/9/3 4:03 下午
* Date: 2021/9/3 4:03 下午
* @param $userIds
* @param $userIds
* @param $startTime
* @param $endTime
* @return array
* @return array
* @throws InterfaceException
* @throws InterfaceException
*/
*/
private
function
getInviteNewUserList
(
$userIds
)
:
array
private
function
getInviteNewUserList
(
$userIds
,
$startTime
,
$endTime
)
:
array
{
{
$url
=
config
(
'interface'
,
'coupon.background.wx_invite_relation_list_by_user_ids'
);
$url
=
config
(
'interface'
,
'coupon.background.wx_invite_relation_list_by_user_ids'
);
if
(
empty
(
$url
))
{
if
(
empty
(
$url
))
{
...
@@ -204,7 +201,7 @@ class ColonelorderController extends Job
...
@@ -204,7 +201,7 @@ class ColonelorderController extends Job
}
}
$res
=
HttpUtil
::
get
(
$url
,
$res
=
HttpUtil
::
get
(
$url
,
[
'user_ids'
=>
$userIds
,
'start_time'
=>
$
this
->
startTime
,
'end_time'
=>
$this
->
endTime
]);
[
'user_ids'
=>
$userIds
,
'start_time'
=>
$
startTime
,
'end_time'
=>
$
endTime
]);
if
(
!
empty
(
$res
[
'response'
][
'result'
]))
{
if
(
!
empty
(
$res
[
'response'
][
'result'
]))
{
return
array_values
(
array_column
(
$res
[
'response'
][
'result'
],
null
,
'user_id'
));
return
array_values
(
array_column
(
$res
[
'response'
][
'result'
],
null
,
'user_id'
));
}
}
...
...
application/modules/Job/controllers/Colonelwallet.php
View file @
d5e7bb31
...
@@ -34,6 +34,8 @@ class ColonelwalletController extends Job
...
@@ -34,6 +34,8 @@ class ColonelwalletController extends Job
if
(
$this
->
toWallet
(
$payInfoList
))
{
if
(
$this
->
toWallet
(
$payInfoList
))
{
if
(
$this
->
handlePayInfoStatus
(
array_column
(
$payInfoList
,
'pay_info_id'
)))
{
if
(
$this
->
handlePayInfoStatus
(
array_column
(
$payInfoList
,
'pay_info_id'
)))
{
$this
->
loggerInfo
(
'success'
);
$this
->
loggerInfo
(
'success'
);
}
else
{
$this
->
loggerInfo
(
'更新状态失败'
);
}
}
}
}
}
}
...
...
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