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
7c2f317a
Commit
7c2f317a
authored
Jan 21, 2019
by
ZhuChunYang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加手机号搜索资产
parent
de93cd92
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
90 additions
and
3 deletions
+90
-3
CoinPublishRuleController.php
backend/controllers/CoinPublishRuleController.php
+24
-0
list.php
backend/views/coin-publish-rule/list.php
+13
-1
list.js
backend/web/js/coin-publish-rule/list.js
+41
-0
list.js
backend/web/js/coin-release-member/list.js
+1
-1
CoinPublish.php
common/models/psources/CoinPublish.php
+0
-1
CoinPublishRule.php
common/models/psources/CoinPublishRule.php
+6
-0
CoinReleaseMember.php
common/models/psources/CoinReleaseMember.php
+5
-0
No files found.
backend/controllers/CoinPublishRuleController.php
View file @
7c2f317a
...
...
@@ -204,4 +204,28 @@ class CoinPublishRuleController extends BaseController
}
return
$query
[
'pid'
];
}
public
function
actionGetRememberList
()
{
$mobile
=
Yii
::
$app
->
request
->
get
(
'mobile'
,
''
);
Yii
::
$app
->
response
->
format
=
'json'
;
$pid
=
$this
->
getPid
();
if
(
$pid
&&
$mobile
){
$ruleItems
=
CoinPublishRule
::
getPublishRuleItemsByPid
(
$pid
);
$ruleIds
=
array_column
(
$ruleItems
,
'id'
);
$ruleInfos
=
array_column
(
$ruleItems
,
'sid'
,
'id'
);
$data
=
CoinReleaseMember
::
getMemberListByMobile
(
$ruleIds
,
$mobile
);
foreach
(
$data
as
&
$value
){
$value
[
'rule_sid'
]
=
$ruleInfos
[
$value
[
'rule_id'
]];
$value
[
'amount'
]
/=
1e8
;
$value
[
'release'
]
/=
1e8
;
$value
[
'freeze'
]
/=
1e8
;
$value
[
'output'
]
/=
1e8
;
}
$data
=
$data
??
[];
return
[
'code'
=>
0
,
'data'
=>
$data
,
'count'
=>
count
(
$data
)];
}
else
{
return
[
'code'
=>
-
1
,
'msg'
=>
'pid获取失败或手机号不能为空'
];
}
}
}
backend/views/coin-publish-rule/list.php
View file @
7c2f317a
...
...
@@ -30,7 +30,19 @@ ListAsset::register($this);
</table>
</div>
</div>
<div
class=
"layui-row"
>
<div
class=
"layui-col-md8"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
style=
"margin-bottom: 0; width: 100px;"
>
手机号码
</label>
<div
class=
"layui-input-inline"
>
<input
class=
"layui-input"
name=
"mobile"
>
</div>
</div>
<div
class=
"layui-inline"
>
<button
class=
"layui-btn"
id=
"search"
>
搜索
</button>
</div>
</div>
</div>
<div
class=
"layui-row"
>
<table
class=
"layui-hide"
id=
"table1"
lay-filter=
"table1"
></table>
</div>
...
...
backend/web/js/coin-publish-rule/list.js
View file @
7c2f317a
...
...
@@ -140,3 +140,44 @@ form.on('select(form_data)', function (data) {
format
:
format
[
index
]
});
});
$
(
'#search'
).
click
(
function
()
{
var
mobile
=
$
(
'input[name="mobile"]'
).
val
();
$
.
get
(
'/admin/coin-publish-rule/get-remember-list'
,
{
mobile
:
mobile
},
function
(
rev
)
{
if
(
0
==
rev
.
code
)
{
console
.
log
(
rev
.
data
);
var
tr_data
=
''
;
var
data
=
rev
.
data
;
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
){
tr_data
+=
'<tr><td>'
+
data
[
i
][
'rule_sid'
]
+
'</td><td>'
+
data
[
i
][
'id'
]
+
'</td><td>'
+
data
[
i
][
'mobile'
]
+
'</td><td>'
+
data
[
i
][
'coin'
]
+
'</td><td>'
+
data
[
i
][
'amount'
]
+
'</td><td>'
+
data
[
i
][
'release'
]
+
'</td><td>'
+
data
[
i
][
'freeze'
]
+
'</td><td>'
+
data
[
i
][
'output'
]
+
'</td></tr>'
;
}
var
count_html
=
'<p style="color:#0000ff">共<b style="color:red">'
+
rev
.
count
+
'</b>条资产记录:'
+
'</p>'
;
var
html
=
count_html
+
'<table class="layui-table">'
+
'<thead>'
+
'<tr>'
+
'<th>锁仓编号</th>'
+
'<th>用户id</th>'
+
'<th>手机号</th>'
+
'<th>币种</th>'
+
'<th>总量</th>'
+
'<th>活动数量</th>'
+
'<th>冻结数量</th>'
+
'<th>已提币数量</th>'
+
'</tr>'
+
'</thead>'
+
'<tbody>'
+
tr_data
+
'</tbody>'
+
'</table>'
;
layer
.
open
({
title
:
'个人资产信息'
,
content
:
html
,
area
:
[
'1000px'
,
'800px'
],
scrollbar
:
true
,
});
}
});
});
backend/web/js/coin-release-member/list.js
View file @
7c2f317a
...
...
@@ -16,7 +16,7 @@ table.render({
}
},
{
field
:
'release'
,
title
:
'
已解冻
'
,
templet
:
function
(
d
)
{
field
:
'release'
,
title
:
'
活动数量
'
,
templet
:
function
(
d
)
{
return
d
.
release
/
1
e8
;
}
},
...
...
common/models/psources/CoinPublish.php
View file @
7c2f317a
...
...
@@ -36,5 +36,4 @@ class CoinPublish extends BaseActiveRecord
return
self
::
find
()
->
where
([
'id'
=>
$id
])
->
one
();
}
}
common/models/psources/CoinPublishRule.php
View file @
7c2f317a
...
...
@@ -292,4 +292,10 @@ class CoinPublishRule extends BaseActiveRecord
}
return
$result
;
}
public
static
function
getPublishRuleItemsByPid
(
$pid
)
{
return
self
::
find
()
->
where
([
'pid'
=>
$pid
])
->
asArray
()
->
all
();
}
}
common/models/psources/CoinReleaseMember.php
View file @
7c2f317a
...
...
@@ -127,4 +127,9 @@ class CoinReleaseMember extends BaseActiveRecord
{
return
CoinReleaseMember
::
find
()
->
where
([
'rule_id'
=>
$ids
])
->
andWhere
([
'>'
,
'freeze'
,
0
])
->
asArray
()
->
all
();
}
public
static
function
getMemberListByMobile
(
$ruleIds
,
$mobile
)
{
return
self
::
find
()
->
where
([
'in'
,
'rule_id'
,
$ruleIds
])
->
andWhere
([
'mobile'
=>
$mobile
])
->
select
(
'id,rule_id,mobile,coin,amount,release,freeze,output'
)
->
asArray
()
->
all
();
}
}
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