Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
token
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
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
wallet
token
Commits
ed72c0af
Commit
ed72c0af
authored
Oct 24, 2018
by
rlgy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
保持提币交易信息
parent
e61a5cd5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
19 deletions
+22
-19
CoinReleaseCheck.php
common/models/psources/CoinReleaseCheck.php
+22
-19
No files found.
common/models/psources/CoinReleaseCheck.php
View file @
ed72c0af
...
@@ -18,6 +18,7 @@ use backend\jobs\QueryTransJob;
...
@@ -18,6 +18,7 @@ use backend\jobs\QueryTransJob;
* @property integer $uid
* @property integer $uid
* @property integer $mid
* @property integer $mid
* @property integer $list_id
* @property integer $list_id
* @property string $txhash
* @property string $mobile
* @property string $mobile
* @property string $coin
* @property string $coin
* @property double $amount
* @property double $amount
...
@@ -74,6 +75,7 @@ class CoinReleaseCheck extends BaseActiveRecord
...
@@ -74,6 +75,7 @@ class CoinReleaseCheck extends BaseActiveRecord
'id'
=>
'ID'
,
'id'
=>
'ID'
,
'uid'
=>
'UID'
,
'uid'
=>
'UID'
,
'list_id'
=>
'记录ID'
,
'list_id'
=>
'记录ID'
,
'txhash'
=>
'交易txhash'
,
'mobile'
=>
'手机'
,
'mobile'
=>
'手机'
,
'coin'
=>
'币种'
,
'coin'
=>
'币种'
,
'to_address'
=>
'对方地址'
,
'to_address'
=>
'对方地址'
,
...
@@ -151,31 +153,32 @@ class CoinReleaseCheck extends BaseActiveRecord
...
@@ -151,31 +153,32 @@ class CoinReleaseCheck extends BaseActiveRecord
$this
->
check_second_uid
=
Yii
::
$app
->
user
->
id
;
$this
->
check_second_uid
=
Yii
::
$app
->
user
->
id
;
$this
->
check_second_status
=
$status
;
$this
->
check_second_status
=
$status
;
$this
->
status
=
self
::
STATUS_PADDING
;
$this
->
status
=
self
::
STATUS_PADDING
;
//区块链转币
if
(
strtoupper
(
$this
->
coin
)
==
'BTY'
)
{
$isToken
=
false
;
}
else
{
$isToken
=
true
;
}
$result
=
Chain33Business
::
transToken
(
trim
(
$address
),
trim
(
$this
->
to_address
),
(
int
)
$this
->
amount
,
"锁仓释放"
,
$isToken
,
$this
->
coin
);
if
(
is_array
(
$result
))
{
$trans
->
rollBack
();
throw
new
\Exception
(
Yii
::
t
(
'backend'
,
$result
[
'msg'
]),
$result
[
'code'
]);
}
$this
->
txhash
=
$result
;
if
(
$this
->
save
(
false
))
{
if
(
$this
->
save
(
false
))
{
//区块链转币
if
(
strtoupper
(
$this
->
coin
)
==
'BTY'
)
{
$isToken
=
false
;
}
else
{
$isToken
=
true
;
}
$result
=
Chain33Business
::
transToken
(
trim
(
$address
),
trim
(
$this
->
to_address
),
(
int
)
$this
->
amount
,
"锁仓释放"
,
$isToken
,
$this
->
coin
);
if
(
is_array
(
$result
))
{
$trans
->
rollBack
();
throw
new
\Exception
(
Yii
::
t
(
'backend'
,
$result
[
'msg'
]),
$result
[
'code'
]);
}
$trans
->
commit
();
Yii
::
$app
->
queue
->
delay
(
15
)
->
push
(
new
QueryTransJob
([
Yii
::
$app
->
queue
->
delay
(
15
)
->
push
(
new
QueryTransJob
([
'txhash'
=>
$result
,
'txhash'
=>
$result
,
'lid'
=>
$this
->
list_id
,
'lid'
=>
$this
->
list_id
,
'cid'
=>
$this
->
id
'cid'
=>
$this
->
id
]));
]));
$trans
->
commit
();
return
true
;
return
true
;
}
else
{
}
else
{
throw
new
\Exception
(
'修改审核状态失败'
,
-
1
);
throw
new
\Exception
(
'修改审核状态失败'
,
-
1
);
...
...
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