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
2fdd5f9c
Commit
2fdd5f9c
authored
Aug 30, 2021
by
pengfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update 团长分销-奖励钱包脚本增加状态
parent
3272229f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
5 deletions
+17
-5
ColonelDistributorPayInfo.php
...tion/models/marketing/mysql/ColonelDistributorPayInfo.php
+3
-0
Colonelwallet.php
application/modules/Cli/controllers/Colonelwallet.php
+14
-5
No files found.
application/models/marketing/mysql/ColonelDistributorPayInfo.php
View file @
2fdd5f9c
...
@@ -12,6 +12,9 @@ class ColonelDistributorPayInfo extends MysqlBase
...
@@ -12,6 +12,9 @@ class ColonelDistributorPayInfo extends MysqlBase
const
TYPE_NEW_USER
=
1
;
const
TYPE_NEW_USER
=
1
;
const
TYPE_FINISH_TARGET
=
2
;
const
TYPE_FINISH_TARGET
=
2
;
const
STATUS_NOT_USE
=
0
;
const
STATUS_USE
=
1
;
public
static
$typeDesc
=
[
public
static
$typeDesc
=
[
self
::
TYPE_NEW_USER
=>
"邀请新用户"
,
self
::
TYPE_NEW_USER
=>
"邀请新用户"
,
...
...
application/modules/Cli/controllers/Colonelwallet.php
View file @
2fdd5f9c
...
@@ -25,9 +25,10 @@ class ColonelwalletController extends Cli
...
@@ -25,9 +25,10 @@ class ColonelwalletController extends Cli
$payInfoList
=
$this
->
getPayInfo
(
$yesterday
);
$payInfoList
=
$this
->
getPayInfo
(
$yesterday
);
if
(
!
empty
(
$payInfoList
))
{
if
(
!
empty
(
$payInfoList
))
{
$res
=
$this
->
toWallet
(
$payInfoList
);
if
(
$this
->
toWallet
(
$payInfoList
))
{
if
(
$res
)
{
if
(
$this
->
deductingInventory
(
$payInfoList
))
{
$this
->
deductingInventory
(
$payInfoList
);
$this
->
handlePayInfoStatus
(
array_column
(
$payInfoList
,
'colonel_distributor_pay_info_id'
));
}
}
}
}
}
...
@@ -40,7 +41,7 @@ class ColonelwalletController extends Cli
...
@@ -40,7 +41,7 @@ class ColonelwalletController extends Cli
*/
*/
public
function
getPayInfo
(
$date
)
public
function
getPayInfo
(
$date
)
{
{
$list
=
ColonelDistributorPayInfo
::
select
(
"*"
,
[
"date"
=>
$date
],
[]);
$list
=
ColonelDistributorPayInfo
::
select
(
"*"
,
[
"date"
=>
$date
,
'status'
=>
ColonelDistributorPayInfo
::
STATUS_NOT_USE
],
[]);
$data
=
[];
$data
=
[];
if
(
!
empty
(
$list
))
{
if
(
!
empty
(
$list
))
{
foreach
(
$list
as
$item
)
{
foreach
(
$list
as
$item
)
{
...
@@ -112,7 +113,7 @@ class ColonelwalletController extends Cli
...
@@ -112,7 +113,7 @@ class ColonelwalletController extends Cli
$tmp
[
"amount"
]
=
$payInfo
[
"reward"
];
$tmp
[
"amount"
]
=
$payInfo
[
"reward"
];
$data
[
"body"
][]
=
$tmp
;
$data
[
"body"
][]
=
$tmp
;
}
}
$res
=
HttpUtil
::
post
(
$url
,
$data
);
$res
=
HttpUtil
::
post
(
$url
,
$data
,
100000
,
3
);
if
(
$res
[
'code'
]
==
0
&&
isset
(
$res
[
'response'
][
"result"
]))
{
if
(
$res
[
'code'
]
==
0
&&
isset
(
$res
[
'response'
][
"result"
]))
{
$date
=
date
(
"Y-m-d H:i:s"
);
$date
=
date
(
"Y-m-d H:i:s"
);
FileLog
::
info
(
"colonel_distributor_deducting_inventory"
,
$date
.
" 资金池授予用户奖励成功"
);
FileLog
::
info
(
"colonel_distributor_deducting_inventory"
,
$date
.
" 资金池授予用户奖励成功"
);
...
@@ -123,4 +124,12 @@ class ColonelwalletController extends Cli
...
@@ -123,4 +124,12 @@ class ColonelwalletController extends Cli
return
false
;
return
false
;
}
}
}
}
/**
* 修改状态
*/
public
function
handlePayInfoStatus
(
array
$payInfoIds
)
{
return
ColonelDistributorPayInfo
::
updateRecord
([
'status'
=>
ColonelDistributorPayInfo
::
STATUS_USE
],[
'id'
=>
$payInfoIds
]);
}
}
}
\ 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