diff --git a/Application/Admin/Controller/QueryController.class.php b/Application/Admin/Controller/QueryController.class.php
index 8677e9841..341802d9b 100644
--- a/Application/Admin/Controller/QueryController.class.php
+++ b/Application/Admin/Controller/QueryController.class.php
@@ -1342,36 +1342,26 @@ class QueryController extends ThinkController
public function withdrawDetails($id)
{
- $page = intval(I('p', 1));
- $row = intval(I('row', 10));
- $id = intval($id);
- $map['withdraw_id'] = $id;
- $model = M('Spend', 'tab_');
- $data = $model
- ->field('pay_order_number,game_name,user_account,promote_account,pay_amount,pay_way,if(selle_ratio >= 0,selle_ratio,0) as selle_ratio,pay_time,selle_status,pay_status,withdraw_id')
- ->where($map)
- ->order('id desc')
- ->page($page, $row)
- ->select();
- $count = $model->where($map)->count('id');
-
- //提现状态
- $withdrawStatus = M('withdraw', 'tab_')
- ->where(array('id' => $id))
- ->getField('status');
- $withdrawStatus = \Home\Controller\FinanceController::$withdrawStatus[$withdrawStatus];
-
- foreach ($data as &$list) {
- $list['income'] = bcmul($list['pay_amount'], bcdiv($list['selle_ratio'], 100, 2), 2);
- $list['pay_time'] = date('Y-m-d H:i:s', $list['pay_time']);
+ $withdrawId = intval($id);
+ $withdraw = D('withdraw')->find($withdrawId);
+ $records = [];
+ if (!empty($withdraw) && !empty($withdraw['game_ratio'])) {
+ $gameRatios = json_decode($withdraw['game_ratio'], true);
+ foreach ($gameRatios as $gameId => $gameRatio) {
+ $gameName = D('game')->where(array('id' => $gameId))->getField('game_name');
+ foreach ($gameRatio as $list) {
+ $records[] = [
+ 'settlement_time' => "{$list['begin_time']} - {$list['end_time']}",
+ 'game_name' => $gameName ?? '未知',
+ 'sum_amount' => $list['sum_amount'],
+ 'ratio' => $list['selle_ratio'] . '%',
+ 'settlement_amount' => bcdiv(bcmul($list['sum_amount'], $list['selle_ratio'], 2), 100, 2),
+ ];
+ }
+ }
}
- $page = set_pagination($count, $row);
- if ($page) {
- $this->assign('_page', $page);
- }
- $this->assign('listData', $data);
- $this->assign('withdrawStatus', $withdrawStatus);
+ $this->assign('records', $records);
$this->display();
}
diff --git a/Application/Admin/View/Query/withdrawDetails.html b/Application/Admin/View/Query/withdrawDetails.html
index 17fb51e33..9babaf3e5 100644
--- a/Application/Admin/View/Query/withdrawDetails.html
+++ b/Application/Admin/View/Query/withdrawDetails.html
@@ -32,40 +32,23 @@ body{ padding: 0px; }
-
游戏订单号
- 游戏
- 玩家账号
- 推广员账号
- 订单总额
- 直充
- 内充
- 分成比例(直充|内充)
- 收益
- 充值时间
- 订单状态
+ 结算时间
+ 游戏名称
+ 流水总额
+ 分成比例
+ 结算总额