Merge branch 'feature/testing_daily_count' of 8.136.139.249:wmtx/platform into feature/finance_payment_20210115

master
chenzhi 4 years ago
commit b592554501

@ -301,6 +301,20 @@ class TestingResourceController extends ThinkController
$repository = new TestingResourceRepository();
$records = $repository->makeDailyCountData($dbdata);
if (!empty($isExport)) {
data2csv($records, '测试资源申请统计', [
'create_day_time' => '申请日期',
'role_name' => '角色名称',
'game_name' => '游戏名称',
'server_name' => '区服名称',
'user_account' => '测试账号',
'apply_username' => '申请人',
'promote_account' => '所属推广员',
'level_top_promote' => '所属会长',
'apply_amount' => '总申请金额',
'provide_amount' => '实发金额'
]);
}
$pagination = set_pagination($count, $row);
$gameRepository = new GameRepository();
$gameId = $params['game_id'] ?? 0;

@ -157,6 +157,7 @@
<th>测试账号</th>
<th>申请人</th>
<th>所属推广员</th>
<th>所属会长</th>
<th>总申请金额</th>
<th>实发金额</th>
<th>操作</th>
@ -177,6 +178,7 @@
<td>{$record.user_account}</td>
<td>{$record.apply_username}</td>
<td>{$record.promote_account}</td>
<td>{$record.level_top_promote}</td>
<td>{$record.apply_amount}</td>
<td>{$record.provide_amount}</td>
<td>
@ -191,8 +193,8 @@
</div>
<div class="page">
<!-- <a class="sch-btn export-btn"
href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a> -->
<a class="sch-btn export-btn"
href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a>
{$_page|default=''}
</div>

@ -165,7 +165,7 @@ class TestingResourceRepository
$applyAdmins = index_by_column('id', $applyAdmins);
if (count($users) > 0) {
$promotes = M('promote', 'tab_')->field(['id', 'account'])->where(['id' => ['in', array_column($users, 'promote_id')]])->select();
$promotes = M('promote', 'tab_')->field(['id', 'account', 'level1_id'])->where(['id' => ['in', array_column($users, 'promote_id')]])->select();
$promotes = index_by_column('id', $promotes);
}
$verifyAdminIds = array_column($batches, 'verify_admin_id');
@ -236,6 +236,11 @@ class TestingResourceRepository
$promotes = $result['promotes'];
$verifyAdmins = $result['verifyAdmins'];
$applyAdmins = $result['applyAdmins'];
if(!empty($promotes)){
$levelTopPromotes = M('promote', 'tab_')->where(['id' => ['in', array_unique(array_column($promotes,'level1_id'))]])->getField('id,account',true);
}else{
$levelTopPromotes = [];
}
//获取申请人
$records = [];
foreach ($items as $batch) {
@ -244,6 +249,7 @@ class TestingResourceRepository
$user = $users[$batch['user_id']] ?? null;
$applyPromote = $applyPromotes[$batch['apply_promote_id']] ?? null;
$promote = $user && isset($promotes[$user['promote_id']]) ? $promotes[$user['promote_id']] : null;
$levelTopPromote = $promote && isset($levelTopPromotes[$promote['level1_id']]) ? $levelTopPromotes[$promote['level1_id']] : null;
$verifyAdmin = $verifyAdmins[$batch['verify_admin_id']] ?? null;
$applyAdmin = $applyAdmins[$batch['apply_admin_id']] ?? null;
$jumpParm = [
@ -262,6 +268,7 @@ class TestingResourceRepository
'user_account' => $role ?$role['user_account'] : '--',
'apply_username' => $applyPromote ? $applyPromote['account'] . '[推广员]' : ($applyAdmin ? $applyAdmin['username'] . '[管理员]' : ''),
'promote_account' => $promote['account'],
'level_top_promote'=>$levelTopPromote,
'apply_amount' => $batch['apply_amount'],
'provide_amount' => $batch['provide_amount'],
'jump_url'=>$jumpUrl

@ -1481,19 +1481,19 @@ class DownloadController extends BaseController
if (!empty(I('begtime')) && empty(I('endtime'))) {
if (!empty(I('begtime')) && empty(I('endtime'))) {
$map['tab_spend.spend_time'] = ['egt', strtotime(I('begtime'))];
} elseif (empty(I('begtime')) && !empty(I('endtime'))) {
$map['tab_spend.spend_time'] = ['elt', strtotime(I('endtime')) + 86399];
} elseif (!empty(I('begtime')) && !empty(I('endtime'))) {
$map['tab_spend.spend_time'] = ['between', [strtotime(I('begtime')), strtotime(I('endtime')) + 86399]];
}else {
$nowTime = date('Y-m-d');
$initBegTime = date('Y-m-d', strtotime('-6 day', strtotime($nowTime)));
$initEndTime = date('Y-m-d');
$initBegTime = strtotime($initBegTime);
$initEndTime = strtotime($initEndTime);
$map['tab_spend.spend_time'] = ['between',[$initBegTime,$initEndTime]];
// $nowTime = date('Y-m-d');
// $initBegTime = date('Y-m-d', strtotime('-6 day', strtotime($nowTime)));
// $initEndTime = date('Y-m-d');
// $initBegTime = strtotime($initBegTime);
// $initEndTime = strtotime($initEndTime);
// $map['tab_spend.spend_time'] = ['between',[$initBegTime,$initEndTime]];
}
if ($payedBegTime) {

@ -241,6 +241,8 @@ class QueryController extends BaseController
$parameter['row'] = $row;
$parameter['begtime'] = $initBegTime;
$parameter['endtime'] = $initEndTime;
$parameter['payed_begtime'] = I("payed_begtime", '');
$parameter['payed_endtime'] = I("payed_endtime", '');
$parameter['relation_game_id'] = $relationGameId;
$parameter['sdk_version'] = $sdkVersion;
$parameter['server_id'] = $serverId;

@ -432,15 +432,28 @@
layer.msg('到账时间间隔不能超过31天请重新选择日期');
return false;
}
if (sdate && !edate) {
layer.msg('下单结束时间不能为空');
return false;
}
if (!sdate && edate) {
layer.msg('下单开始时间不能为空');
return false;
}
if (payed_sdate && !payed_edate) {
layer.msg('到账结束时间不能为空');
return false;
}
if (!payed_sdate && payed_edate) {
layer.msg('到账开始时间不能为空');
return false;
}
if (!edate && !sdate && !payed_sdate && !payed_edate) {
layer.msg('时间不能为空');
return false;
}
var url = $(this).attr('url');

@ -368,7 +368,7 @@ class PaymentController extends BaseController
//获取自身
$remark = ($oldInfo['remark'] .'该打款由线上转为线下付款,原支付宝用户:'. $company_info['ali_user'].',支付宝账号为:'.$company_info['ali_account']);
//修改自身
$res = M("company_statement_info","tab_")->where("id = {$id}")->save(['verify_status' => 2, 'pay_check' => 0, 'pay_check_member_id' => 0, 'pay_check_time' => 0, 'remark' => $remark]);
$res = M("company_statement_info","tab_")->where("id = {$id}")->save(['verify_status' => 2,'pay_status'=>0,'pay_time'=>0,'pay_info'=>'','pay_check' => 0, 'pay_check_member_id' => 0, 'pay_check_time' => 0, 'remark' => $remark]);
if(empty($res)){
$this->ajaxReturn(['status' =>0 ,'msg'=>'转换失败','data'=>[]]);
}

@ -283,11 +283,10 @@
</if>
<if condition="$data['pay_status'] eq -1">
<a class='confirm changeCompanyInfo' data-id="{$data['id']}">更新打款信息</a>
</if>
<if condition="$data['pay_status'] neq 1">
<a class='confirm changePayTapy' data-id="{$data['id']}">转线下打款</a>
</if>
<!-- <if condition="$data['pay_check'] eq 0">-->
<!-- <a class='confirm setPayment' data-id='{$data.id}'>打款信息确认</a>-->
<!-- </if>-->
</td>
</tr>
<volist name="data.son_info" id="s_data">

Loading…
Cancel
Save