12份功能提交

master
zhengyongxing 4 years ago
parent 21592a67cd
commit fb0acddb3f

@ -1070,8 +1070,10 @@ class CompanyStatementPoolController extends ThinkController
return; return;
} }
} }
//线上打款审核状态撤回
M("company_statement_info","tab_")->where("pool_id={$id}")->save(['verify_status'=>0,'pay_verify_status'=>0,'verify_time'=>'','verify_member_id'=>0]); M("company_statement_info","tab_")->where("pool_id={$id}")->save(['pay_verify_status'=>0,'verify_time'=>'','verify_member_id'=>0]);
//线上打款支付宝状态撤回
M("company_statement_info","tab_")->where("pool_id={$id} and verify_status != 2")->save(['verify_status'=>0]);
foreach ($company_statement_info as $key => $value) { foreach ($company_statement_info as $key => $value) {
$is_hav = M("pay_statement_info","tab_")->where(['statement_info_id'=>$value['id']])->find(); $is_hav = M("pay_statement_info","tab_")->where(['statement_info_id'=>$value['id']])->find();
@ -1849,12 +1851,13 @@ class CompanyStatementPoolController extends ThinkController
$limit_amount = 50000; $limit_amount = 50000;
$dbres = $this->DBModel->field("id")->where("id in ({$ids})")->select(); $dbres = $this->DBModel->field("id,company_type")->where("id in ({$ids})")->select();
foreach($dbres as $key=>$value){ foreach($dbres as $key=>$value){
$statement_data_info = M("company_statement_info","tab_") $statement_data_info = M("company_statement_info","tab_")
->where(['pool_id'=>$value['id']]) ->where(['pool_id'=>$value['id']])
->select(); ->select();
if ($value['company_type'] == 2){ if ($value['company_type'] == 2){
//循环info汇总详单 //循环info汇总详单
foreach ($statement_data_info as $skey => $svalue) { foreach ($statement_data_info as $skey => $svalue) {
@ -1879,6 +1882,7 @@ class CompanyStatementPoolController extends ThinkController
$save = []; $save = [];
$handle_statement = []; $handle_statement = [];
// dump($handle_data);
//将同一时间的汇总详单记录起来 //将同一时间的汇总详单记录起来
foreach ($handle_data as $hk => $hv) { foreach ($handle_data as $hk => $hv) {
$statement_time = explode('-', $hk); $statement_time = explode('-', $hk);
@ -1891,7 +1895,7 @@ class CompanyStatementPoolController extends ThinkController
$game_list = $shv['game_list']; $game_list = $shv['game_list'];
foreach ($game_list as $gk => $gv) { foreach ($game_list as $gk => $gv) {
$statement_money += $gv['sum_money']; $statement_money += $gv['sum_money']+$gv['reward']+$gv['reward']-$gv['fine'];
} }
} }
@ -2018,6 +2022,7 @@ class CompanyStatementPoolController extends ThinkController
} }
} }
} }
} }
} }

@ -420,6 +420,7 @@ class PaymentController extends BaseController
// $val['ratio'] = 0; // $val['ratio'] = 0;
// } // }
// } // }
$val['sum_money'] = $val['sum_money']-$val['fine']+$val['reward'];
if (!$val['increment_ratio']) { if (!$val['increment_ratio']) {
$val['increment_ratio'] = 0; $val['increment_ratio'] = 0;
} }
@ -1035,15 +1036,41 @@ class PaymentController extends BaseController
($status == 1)?($status_str = '已审核通过'):($status_str = '已审核拒绝'); ($status == 1)?($status_str = '已审核通过'):($status_str = '已审核拒绝');
$save = [
'pay_verify_status'=>$status,
'verify_time'=>time(),
'verify_member_id'=>$member_id
];
$verify = M("company_statement_info","tab_") $verify = M("company_statement_info","tab_")
->where([ ->where([
'id'=>['in',$id] 'id'=>['in',$id]
]) ])
->save([ ->save($save);
'pay_verify_status'=>$status,
'verify_time'=>time(), $companyStatementInfo = M("company_statement_info","tab_")
'verify_member_id'=>$member_id ->where([
]); 'id'=>['in',$id]
])
->select();
foreach ($companyStatementInfo as $key => $value) {
if ($value['statement_money'] < 0) {
$payres["remark"] = '打款金额非正,直接打款成功';
$pay_info = json_encode($payres, JSON_UNESCAPED_UNICODE);
M("company_statement_info","tab_")
->where([
'id'=>['in',$value['id']]
])
->save(['pay_status'=>1,'pay_time'=>time(),'pay_type'=>2,'pay_info'=>$pay_info]);
M("pay_statement_info","tab_")
->where([
'statement_info_id'=>['in',$value['id']]
])
->save(['pay_status'=>1,'pay_time'=>time(),'pay_type'=>2,'pay_info'=>$pay_info]);
}
}
if ($verify) { if ($verify) {
$this->ajaxReturn(['status'=>1,'msg'=>$status_str]); $this->ajaxReturn(['status'=>1,'msg'=>$status_str]);

Loading…
Cancel
Save