|
|
|
@ -3066,7 +3066,7 @@ class DownloadController extends BaseController {
|
|
|
|
|
$pages = ceil($accessNum / $perSize);
|
|
|
|
|
for($i = 1; $i <= $pages; $i++) {
|
|
|
|
|
|
|
|
|
|
$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')
|
|
|
|
|
$data = $model->field('pay_order_number,game_name,user_account,promote_id,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')
|
|
|
|
|
->limit(($i-1)*$perSize ,$perSize)
|
|
|
|
@ -3084,6 +3084,14 @@ class DownloadController extends BaseController {
|
|
|
|
|
->where(array('id' => ['in',$withdrawIds]))
|
|
|
|
|
->getField('id,status');
|
|
|
|
|
|
|
|
|
|
$promotes = [];
|
|
|
|
|
$promoteService = new PromoteService();
|
|
|
|
|
if (count($data) > 0) {
|
|
|
|
|
$promoteIds = array_column($data, 'promote_id');
|
|
|
|
|
$promotes = M('promote', 'tab_')->field(['id', 'chain', 'account'])->where(['id' => ['in', $promoteIds]])->select();
|
|
|
|
|
$promotes = index_by_column('id', $promotes);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
foreach ($data as &$list) {
|
|
|
|
|
//提现状态
|
|
|
|
|
$list['pay_order_number'] = $this->encryption($list['pay_order_number']);
|
|
|
|
@ -3115,11 +3123,12 @@ class DownloadController extends BaseController {
|
|
|
|
|
$list['pay_amount_nei'] = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$promoteGroup = isset($promotes[$list['promote_id']]) ? $promoteService->getGroupNameByChain($promotes[$list['promote_id']]['chain'], $list['promote_id']) : '';
|
|
|
|
|
|
|
|
|
|
$csvData["pay_order_number"] = $list["pay_order_number"];
|
|
|
|
|
$csvData["game_name"] = $list["game_name"];
|
|
|
|
|
$csvData["user_account"] = $list["user_account"];
|
|
|
|
|
$csvData["promote_account"] = $list["promote_account"];
|
|
|
|
|
$csvData["promote_account"] = $list["promote_account"] . ($promoteGroup == '' ? '' : '(' . $promoteGroup . ')');
|
|
|
|
|
$csvData["pay_amount"] = $list["pay_amount"];
|
|
|
|
|
$csvData["pay_amount_zhi"] = $list["pay_amount_zhi"];
|
|
|
|
|
$csvData["pay_amount_nei"] = $list["pay_amount_nei"];
|
|
|
|
@ -3620,10 +3629,12 @@ class DownloadController extends BaseController {
|
|
|
|
|
->limit(($i-1)*$perSize ,$perSize)
|
|
|
|
|
->select();
|
|
|
|
|
|
|
|
|
|
$promoteService = new PromoteService();
|
|
|
|
|
$promoteIds = array_column($data, 'promote_id');
|
|
|
|
|
$promotes = M('promote', 'tab_')->field(['id', 'chain', 'account'])->where(['id' => ['in', $promoteIds]])->select();
|
|
|
|
|
$promotes = index_by_column('id', $promotes);
|
|
|
|
|
if (count($data) > 0) {
|
|
|
|
|
$promoteService = new PromoteService();
|
|
|
|
|
$promoteIds = array_column($data, 'promote_id');
|
|
|
|
|
$promotes = M('promote', 'tab_')->field(['id', 'chain', 'account'])->where(['id' => ['in', $promoteIds]])->select();
|
|
|
|
|
$promotes = index_by_column('id', $promotes);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
foreach($data as $key => $value) {
|
|
|
|
|
// if (empty($value['user_account']) ) {
|
|
|
|
|