Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
quxiu
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
冷斌
quxiu
Commits
261f66b8
Commit
261f66b8
authored
Apr 01, 2020
by
冷斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
踢人
parent
31e4675a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
17 deletions
+36
-17
admin/themes/simplebootx/Admin/Cash/index.html
+17
-16
api/Appapi/Api/User.php
+3
-0
api/Appapi/Model/User.php
+15
-1
application/Admin/Controller/CashController.class.php
+1
-0
No files found.
admin/themes/simplebootx/Admin/Cash/index.html
View file @
261f66b8
...
...
@@ -11,13 +11,13 @@
<select
class=
"select_2"
name=
"status"
>
<option
value=
""
>
全部
</option>
<option
value=
"0"
<
if
condition=
"$formget.status eq '0'"
>
selected
</if>
>未处理
</option>
<option
value=
"1"
<
if
condition=
"$formget.status eq '1'"
>
selected
</if>
>提现成功
</option>
<option
value=
"2"
<
if
condition=
"$formget.status eq '2'"
>
selected
</if>
>拒绝提现
</option>
<option
value=
"1"
<
if
condition=
"$formget.status eq '1'"
>
selected
</if>
>提现成功
</option>
<option
value=
"2"
<
if
condition=
"$formget.status eq '2'"
>
selected
</if>
>拒绝提现
</option>
</select>
提交时间:
<input
type=
"text"
name=
"start_time"
class=
"js-date date"
value=
"{$formget.start_time}"
style=
"width: 80px;"
autocomplete=
"off"
>
-
<input
type=
"text"
class=
"js-date date"
name=
"end_time"
value=
"{$formget.end_time}"
style=
"width: 80px;"
autocomplete=
"off"
>
关键字:
关键字:
<input
type=
"text"
name=
"keyword"
style=
"width: 200px;"
value=
"{$formget.keyword}"
placeholder=
"请输入会员id、订单号..."
>
<input
type=
"button"
class=
"btn btn-primary"
value=
"搜索"
onclick=
"form1.action='{:U('Cash/index')}';form1.submit();"
/>
<input
type=
"button"
class=
"btn btn-primary"
style=
"background-color: #1dccaa;"
value=
"导出"
onclick=
"form1.action='{:U('Cash/export')}';form1.submit();"
/>
...
...
@@ -28,17 +28,18 @@
<a>
待处理金额:{$cash['fail']}
</a>
</if>
</div>
</form>
</form>
<form
method=
"post"
class=
"js-ajax-form"
>
<table
class=
"table table-hover table-bordered"
>
<thead>
<tr>
<th
align=
"center"
>
ID
</th>
<th>
主播名称
</th>
<th>
主播名称
</th>
<th>
兑换{$configpub['name_votes']}
</th>
<th>
提现金额
</th>
<th>
提现账号
</th>
<th>
来源
</th>
<!-- <th>商户订单号</th> -->
<th>
第三方支付订单号
</th>
<th>
状态
</th>
...
...
@@ -52,27 +53,28 @@
<foreach
name=
"lists"
item=
"vo"
>
<tr>
<td
align=
"center"
>
{$vo.id}
</td>
<td>
{$vo['userinfo']['user_nicename']} ( {$vo['uid']} )
</td>
<td>
{$vo['userinfo']['user_nicename']} ( {$vo['uid']} )
</td>
<td>
{$vo['votes']}
</td>
<td>
{$vo['money']}
</td>
<td>
{$vo['money']}
</td>
<td>
{$type[$vo['type']]}
<br>
{$vo['name']}
<br>
{$vo['account']}
<br>
{$vo['account_bank']}
</td>
</td>
<!-- <td>{$vo['orderno']}</td> -->
<td>
{$source[$vo['source']]}
</td>
<td>
{$vo['trade_no']}
</td>
<td>
{$status[$vo['status']]}
</td>
<td>
{$vo.addtime|date="Y-m-d H:i:s",###}
</td>
<td>
{$vo.addtime|date="Y-m-d H:i:s",###}
</td>
<td>
<if
condition=
"$vo['status'] eq '0'"
>
未处理
<else/>
{$vo.uptime|date="Y-m-d H:i:s",###}
</if>
</if>
</td>
<td
align=
"center"
>
<td
align=
"center"
>
<if
condition=
"$vo['status'] eq '0'"
>
<a
href=
"{:U('Cash/edit',array('id'=>$vo['id']))}"
>
编辑
</a>
</if>
<a
href=
"{:U('Cash/edit',array('id'=>$vo['id']))}"
>
编辑
</a>
</if>
<!-- <a href="{:U('Cash/del',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn" data-msg="您确定要删除吗?">删除</a> -->
</td>
</tr>
...
...
@@ -85,4 +87,4 @@
</div>
<script
src=
"__PUBLIC__/js/common.js"
></script>
</body>
</html>
\ No newline at end of file
</html>
api/Appapi/Api/User.php
View file @
261f66b8
...
...
@@ -97,6 +97,7 @@ class Api_User extends PhalApi_Api {
'token'
=>
array
(
'name'
=>
'token'
,
'type'
=>
'string'
,
'require'
=>
true
,
'desc'
=>
'用户token'
),
'accountid'
=>
array
(
'name'
=>
'accountid'
,
'type'
=>
'int'
,
'require'
=>
true
,
'desc'
=>
'账号ID'
),
'cashvote'
=>
array
(
'name'
=>
'cashvote'
,
'type'
=>
'int'
,
'require'
=>
true
,
'desc'
=>
'提现的票数'
),
'source'
=>
array
(
'name'
=>
'type'
,
'type'
=>
'int'
,
'require'
=>
true
,
'desc'
=>
'类型,1主播,2邀请,3家族'
),
),
'setAttent'
=>
array
(
...
...
@@ -966,6 +967,8 @@ class Api_User extends PhalApi_Api {
'uid'
=>
$uid
,
'accountid'
=>
$accountid
,
'cashvote'
=>
$cashvote
,
'type'
=>
$this
->
type
,
'source'
=>
$this
->
source
,
);
$config
=
getConfigPri
();
$domain
=
new
Domain_User
();
...
...
api/Appapi/Model/User.php
View file @
261f66b8
...
...
@@ -164,6 +164,7 @@ class Model_User extends PhalApi_Model_NotORM
$uid
=
$data
[
'uid'
];
$accountid
=
$data
[
'accountid'
];
$money
=
$data
[
'cashvote'
];
$source
=
$data
[
'source'
];
$config
=
getConfigPri
();
$cash_start
=
$config
[
'cash_start'
];
...
...
@@ -223,7 +224,20 @@ class Model_User extends PhalApi_Model_NotORM
$cashvotes
=
$money
*
$cash_rate
;
$ifok
=
DI
()
->
notorm
->
users
->
where
(
'id = ? and votes>=?'
,
$uid
,
$cashvotes
)
->
update
([
'votes'
=>
new
NotORM_Literal
(
"votes -
{
$cashvotes
}
"
)]);
$ifok
=
false
;
if
(
$source
==
1
)
{
$ifok
=
DI
()
->
notorm
->
users
->
where
(
'id = ? and votes>=?'
,
$uid
,
$cashvotes
)
->
update
([
'votes'
=>
new
NotORM_Literal
(
"votes -
{
$cashvotes
}
"
)]);
}
if
(
$source
==
2
)
{
$ifok
=
DI
()
->
notorm
->
users
->
where
(
'id = ? and i_votes>=?'
,
$uid
,
$cashvotes
)
->
update
([
'i_votes'
=>
new
NotORM_Literal
(
"i_votes -
{
$cashvotes
}
"
)]);
}
if
(
$source
==
3
)
{
$ifok
=
DI
()
->
notorm
->
users
->
where
(
'id = ? and f_votes>=?'
,
$uid
,
$cashvotes
)
->
update
([
'f_votes'
=>
new
NotORM_Literal
(
"f_votes -
{
$cashvotes
}
"
)]);
}
if
(
!
$ifok
)
{
return
1001
;
}
...
...
application/Admin/Controller/CashController.class.php
View file @
261f66b8
...
...
@@ -70,6 +70,7 @@ class CashController extends AdminbaseController {
$this
->
assign
(
'lists'
,
$lists
);
$this
->
assign
(
'formget'
,
$_GET
);
$this
->
assign
(
'type'
,
$this
->
type
);
$this
->
assign
(
'source'
,
[
1
=>
'主播魅力'
,
2
=>
'邀请魅力'
,
3
=>
'家族魅力'
]);
$this
->
assign
(
"page"
,
$page
->
show
(
'Admin'
));
$this
->
display
();
...
...
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