Commit 261f66b8 by 冷斌

踢人

parent 31e4675a
......@@ -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"> &nbsp; &nbsp;
关键字:
关键字:
<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>
......@@ -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();
......
......@@ -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;
}
......
......@@ -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();
......
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