Commit 261f66b8 by 冷斌

踢人

parent 31e4675a
...@@ -11,13 +11,13 @@ ...@@ -11,13 +11,13 @@
<select class="select_2" name="status"> <select class="select_2" name="status">
<option value="">全部</option> <option value="">全部</option>
<option value="0" <if condition="$formget.status eq '0'">selected</if> >未处理</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="1" <if condition="$formget.status eq '1'">selected</if> >提现成功</option>
<option value="2" <if condition="$formget.status eq '2'">selected</if> >拒绝提现</option> <option value="2" <if condition="$formget.status eq '2'">selected</if> >拒绝提现</option>
</select> </select>
提交时间: 提交时间:
<input type="text" name="start_time" class="js-date date" value="{$formget.start_time}" style="width: 80px;" autocomplete="off">- <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"> &nbsp; &nbsp; <input type="text" class="js-date date" name="end_time" value="{$formget.end_time}" style="width: 80px;" autocomplete="off"> &nbsp; &nbsp;
关键字: 关键字:
<input type="text" name="keyword" style="width: 200px;" value="{$formget.keyword}" placeholder="请输入会员id、订单号..."> <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" 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();"/> <input type="button" class="btn btn-primary" style="background-color: #1dccaa;" value="导出" onclick="form1.action='{:U('Cash/export')}';form1.submit();"/>
...@@ -28,17 +28,18 @@ ...@@ -28,17 +28,18 @@
<a>待处理金额:{$cash['fail']}</a> <a>待处理金额:{$cash['fail']}</a>
</if> </if>
</div> </div>
</form> </form>
<form method="post" class="js-ajax-form" > <form method="post" class="js-ajax-form" >
<table class="table table-hover table-bordered"> <table class="table table-hover table-bordered">
<thead> <thead>
<tr> <tr>
<th align="center">ID</th> <th align="center">ID</th>
<th>主播名称</th> <th>主播名称</th>
<th>兑换{$configpub['name_votes']}</th> <th>兑换{$configpub['name_votes']}</th>
<th>提现金额</th> <th>提现金额</th>
<th>提现账号</th> <th>提现账号</th>
<th>来源</th>
<!-- <th>商户订单号</th> --> <!-- <th>商户订单号</th> -->
<th>第三方支付订单号</th> <th>第三方支付订单号</th>
<th>状态</th> <th>状态</th>
...@@ -52,27 +53,28 @@ ...@@ -52,27 +53,28 @@
<foreach name="lists" item="vo"> <foreach name="lists" item="vo">
<tr> <tr>
<td align="center">{$vo.id}</td> <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['votes']}</td>
<td>{$vo['money']}</td> <td>{$vo['money']}</td>
<td> <td>
{$type[$vo['type']]}<br>{$vo['name']}<br>{$vo['account']}<br>{$vo['account_bank']} {$type[$vo['type']]}<br>{$vo['name']}<br>{$vo['account']}<br>{$vo['account_bank']}
</td> </td>
<!-- <td>{$vo['orderno']}</td> --> <!-- <td>{$vo['orderno']}</td> -->
<td>{$source[$vo['source']]}</td>
<td>{$vo['trade_no']}</td> <td>{$vo['trade_no']}</td>
<td>{$status[$vo['status']]}</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> <td>
<if condition="$vo['status'] eq '0'" > <if condition="$vo['status'] eq '0'" >
未处理 未处理
<else/> <else/>
{$vo.uptime|date="Y-m-d H:i:s",###} {$vo.uptime|date="Y-m-d H:i:s",###}
</if> </if>
</td> </td>
<td align="center"> <td align="center">
<if condition="$vo['status'] eq '0'" > <if condition="$vo['status'] eq '0'" >
<a href="{:U('Cash/edit',array('id'=>$vo['id']))}" >编辑</a> <a href="{:U('Cash/edit',array('id'=>$vo['id']))}" >编辑</a>
</if> </if>
<!-- <a href="{:U('Cash/del',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn" data-msg="您确定要删除吗?">删除</a> --> <!-- <a href="{:U('Cash/del',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn" data-msg="您确定要删除吗?">删除</a> -->
</td> </td>
</tr> </tr>
...@@ -85,4 +87,4 @@ ...@@ -85,4 +87,4 @@
</div> </div>
<script src="__PUBLIC__/js/common.js"></script> <script src="__PUBLIC__/js/common.js"></script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -97,6 +97,7 @@ class Api_User extends PhalApi_Api { ...@@ -97,6 +97,7 @@ class Api_User extends PhalApi_Api {
'token' => array('name' => 'token', 'type' => 'string', 'require' => true, 'desc' => '用户token'), 'token' => array('name' => 'token', 'type' => 'string', 'require' => true, 'desc' => '用户token'),
'accountid' => array('name' => 'accountid', 'type' => 'int', 'require' => true, 'desc' => '账号ID'), 'accountid' => array('name' => 'accountid', 'type' => 'int', 'require' => true, 'desc' => '账号ID'),
'cashvote' => array('name' => 'cashvote', 'type' => 'int', 'require' => true, 'desc' => '提现的票数'), 'cashvote' => array('name' => 'cashvote', 'type' => 'int', 'require' => true, 'desc' => '提现的票数'),
'source' => array('name' => 'type', 'type' => 'int', 'require' => true, 'desc' => '类型,1主播,2邀请,3家族'),
), ),
'setAttent' => array( 'setAttent' => array(
...@@ -966,6 +967,8 @@ class Api_User extends PhalApi_Api { ...@@ -966,6 +967,8 @@ class Api_User extends PhalApi_Api {
'uid'=>$uid, 'uid'=>$uid,
'accountid'=>$accountid, 'accountid'=>$accountid,
'cashvote'=>$cashvote, 'cashvote'=>$cashvote,
'type' => $this->type,
'source' => $this->source,
); );
$config=getConfigPri(); $config=getConfigPri();
$domain = new Domain_User(); $domain = new Domain_User();
......
...@@ -164,6 +164,7 @@ class Model_User extends PhalApi_Model_NotORM ...@@ -164,6 +164,7 @@ class Model_User extends PhalApi_Model_NotORM
$uid = $data['uid']; $uid = $data['uid'];
$accountid = $data['accountid']; $accountid = $data['accountid'];
$money = $data['cashvote']; $money = $data['cashvote'];
$source = $data['source'];
$config = getConfigPri(); $config = getConfigPri();
$cash_start = $config['cash_start']; $cash_start = $config['cash_start'];
...@@ -223,7 +224,20 @@ class Model_User extends PhalApi_Model_NotORM ...@@ -223,7 +224,20 @@ class Model_User extends PhalApi_Model_NotORM
$cashvotes = $money * $cash_rate; $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) { if (!$ifok) {
return 1001; return 1001;
} }
......
...@@ -70,6 +70,7 @@ class CashController extends AdminbaseController { ...@@ -70,6 +70,7 @@ class CashController extends AdminbaseController {
$this->assign('lists', $lists); $this->assign('lists', $lists);
$this->assign('formget', $_GET); $this->assign('formget', $_GET);
$this->assign('type', $this->type); $this->assign('type', $this->type);
$this->assign('source', [1 => '主播魅力', 2 => '邀请魅力', 3 => '家族魅力']);
$this->assign("page", $page->show('Admin')); $this->assign("page", $page->show('Admin'));
$this->display(); $this->display();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment