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
79f8ca6d
Commit
79f8ca6d
authored
Oct 17, 2018
by
rlgy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提币申请添加公司字段
parent
5f0b7b41
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
9 deletions
+32
-9
CoinReleaseCheckController.php
backend/controllers/CoinReleaseCheckController.php
+28
-6
CoinReleaseCheck.php
common/models/psources/CoinReleaseCheck.php
+1
-0
GuodunController.php
h5/controllers/GuodunController.php
+3
-3
No files found.
backend/controllers/CoinReleaseCheckController.php
View file @
79f8ca6d
...
...
@@ -16,6 +16,7 @@ use common\models\psources\CoinPublishRule;
use
common\models\psources\CoinReleaseCheck
;
use
common\models\psources\CoinReleaseList
;
use
common\models\psources\CoinReleaseMember
;
use
common\modelsgii\AuthItemChild
;
use
Yii
;
class
CoinReleaseCheckController
extends
BaseController
...
...
@@ -39,8 +40,30 @@ class CoinReleaseCheckController extends BaseController
]);
}
/**
* 提币审核列表
*
* @return array
*/
public
function
actionCheckList
()
{
$user_id
=
Yii
::
$app
->
user
->
identity
->
id
;
$auth
=
Yii
::
$app
->
authManager
;
$user_role
=
current
(
$auth
->
getRolesByUser
(
$user_id
));
$user_role_name
=
$user_role
->
name
;
//超级管理员与国盾管理员可以审核所有企业用户
if
(
$user_id
==
Yii
::
$app
->
params
[
'admin'
]
||
$user_role_name
==
'国盾'
)
{
$user_role_name
=
''
;
}
else
{
// 判断该用户组是否有监控币种
$all_owners
=
CoinPublish
::
find
()
->
select
(
'owner'
)
->
asArray
()
->
all
();
$all_owners
=
array_unique
(
array_column
(
$all_owners
,
'owner'
));
while
(
!
in_array
(
$user_role_name
,
$all_owners
)
&&
$user_role_name
!=
'国盾'
)
{
$user_role_name
=
AuthItemChild
::
find
()
->
select
(
'parent'
)
->
where
([
'child'
=>
$user_role_name
])
->
asArray
()
->
One
();
$user_role_name
=
$user_role_name
[
'parent'
];
}
}
Yii
::
$app
->
response
->
format
=
'json'
;
$get
=
Yii
::
$app
->
request
->
get
();
...
...
@@ -49,8 +72,10 @@ class CoinReleaseCheckController extends BaseController
if
(
$model
->
load
(
$get
)
&&
$model
->
validate
())
{
$page
=
$get
[
'page'
]
??
1
;
$limit
=
$page
[
'limit'
]
??
10
;
$datas
=
CoinReleaseCheck
::
find
()
->
andFilterWhere
([
'status'
=>
0
,
'coin'
=>
$model
->
coin
,
'mobile'
=>
$model
->
mobile
]);
$datas
=
CoinReleaseCheck
::
find
()
->
andFilterWhere
([
'status'
=>
0
,
'coin'
=>
$model
->
coin
,
'mobile'
=>
$model
->
mobile
]);
if
(
$user_role_name
)
{
$datas
=
$datas
->
andWhere
([
'company_name'
=>
$user_role_name
]);
}
if
(
$model
->
start_time
)
{
$datas
=
$datas
->
andFilterWhere
([
'>='
,
'create_time'
,
$model
->
start_time
]);
}
...
...
@@ -58,10 +83,7 @@ class CoinReleaseCheckController extends BaseController
$datas
=
$datas
->
andFilterWhere
([
'<='
,
'create_time'
,
$model
->
end_time
]);
}
$count
=
$datas
->
count
();
$datas
=
$datas
->
limit
(
$limit
)
->
offset
((
$page
-
1
)
*
$limit
)
->
asArray
()
->
all
();
$datas
=
$datas
->
limit
(
$limit
)
->
offset
((
$page
-
1
)
*
$limit
)
->
asArray
()
->
all
();
//获取操作次数
//提出地址
$addresses
=
array_values
(
array_unique
(
array_column
(
$datas
,
'to_address'
)));
...
...
common/models/psources/CoinReleaseCheck.php
View file @
79f8ca6d
...
...
@@ -24,6 +24,7 @@ use Yii;
* @property integer $check_second_status
* @property integer $check_second_uid
* @property integer $status
* @property string $company_name
* @property string $create_time
* @property string $update_time
*/
...
...
h5/controllers/GuodunController.php
View file @
79f8ca6d
...
...
@@ -78,8 +78,8 @@ class GuodunController extends BaseController
}
}
$validate
=
ZhaobiBusiness
::
validateCode
(
$uid
,
$codetype
,
$code
,
$type
);
if
(
$validate
[
'code'
]
!=
200
)
{
!
YII_DEBUG
&&
$validate
=
ZhaobiBusiness
::
validateCode
(
$uid
,
$codetype
,
$code
,
$type
);
if
(
!
YII_DEBUG
&&
$validate
[
'code'
]
!=
200
)
{
$response
->
build
(
$validate
[
'code'
],
$validate
[
'message'
]);
return
$response
;
}
...
...
@@ -99,7 +99,7 @@ class GuodunController extends BaseController
$request_coin
->
amount
=
$amount
*
1e8
;
$request_coin
->
coin
=
$user_asset
->
coin
;
$request_coin
->
to_address
=
$address
;
$request_coin
->
company_name
=
''
;
$request_coin
->
company_name
=
$user_asset
->
company_name
;
//记录提笔数据
// $user_asset->release -= ($amount * 1e8);
// $user_asset->output += $amount * 1e8;
...
...
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