测试资源管理日志添加

master
zhengyongxing 5 years ago
parent 31a0a174bd
commit 9cb8fadf39

@ -361,6 +361,13 @@ class ExportController extends Controller
flush();//必须同时使用 ob_flush() 和flush() 函数来刷新输出缓冲。 flush();//必须同时使用 ob_flush() 和flush() 函数来刷新输出缓冲。
} }
fclose($fp); fclose($fp);
$getData = $_GET;
unset($getData['id']);
unset($getData['xlsname']);
addOperationLog(['op_type'=>3,'key'=>getNowDate(),'op_name'=>'导出实时注册','url'=>U('Promote/ch_reg_list', $getData),'menu'=>'推广员-数据管理-实时注册-导出实时注册']);
exit(); exit();
break; break;
case 3: case 3:
@ -1029,6 +1036,13 @@ class ExportController extends Controller
foreach ($xlsData as $key=>$v){ foreach ($xlsData as $key=>$v){
$xlsData[$key]['pay_way'] = get_info_status($v['pay_way'],21); $xlsData[$key]['pay_way'] = get_info_status($v['pay_way'],21);
} }
$getData = $_GET;
unset($getData['id']);
unset($getData['xlsname']);
addOperationLog(['op_type'=>3,'key'=>getNowDate(),'op_name'=>'导出会长代充记录','url'=>U('Promote/agent_list', $getData),'menu'=>'推广员-数据管理-实时注册-导出会长代充记录']);
break; break;
case 6: case 6:
if (isset($_REQUEST['account'])) { if (isset($_REQUEST['account'])) {
@ -6708,6 +6722,11 @@ class ExportController extends Controller
} }
$getData = $_GET;
unset($getData['id']);
unset($getData['xlsname']);
addOperationLog(['op_type'=>3,'key'=>getNowDate(),'op_name'=>'导出平台币转移记录','url'=>U('PromoteCoin/record', $getData),'menu'=>'推广员-数据管理-实时注册-导出平台币转移记录']);
$this->exportExcel($xlsName, $xlsCell, $xlsData); $this->exportExcel($xlsName, $xlsCell, $xlsData);
@ -7138,6 +7157,12 @@ class ExportController extends Controller
flush();//必须同时使用 ob_flush() 和flush() 函数来刷新输出缓冲。 flush();//必须同时使用 ob_flush() 和flush() 函数来刷新输出缓冲。
} }
$getData = $_GET;
unset($getData['id']);
unset($getData['xlsname']);
addOperationLog(['op_type'=>3,'key'=>getNowDate(),'op_name'=>'导出实时充值','url'=>U('Promote/spend_list', $getData),'menu'=>'推广员-数据管理-实时注册-导出实时充值']);
fclose($fp); fclose($fp);
exit(); exit();
// $this->exportExcel($xlsName, $xlsCell, $xlsData); // $this->exportExcel($xlsName, $xlsCell, $xlsData);

@ -57,6 +57,11 @@ class StatementController extends ThinkController
$id = $_REQUEST['id']; $id = $_REQUEST['id'];
$res = M("statement","tab_")->where("id = '{$id}'")->delete(); $res = M("statement","tab_")->where("id = '{$id}'")->delete();
if($res !== false){ if($res !== false){
$statementData = M('statement','tab_')->where(['id'=>$id])->find();
addOperationLog(['op_type'=>2,'key'=>$statementData['company_name'].date('YmdHis',$statementData['statement_begin_time']).date('YmdHis',$statementData['statement_end_time']),'op_name'=>'删除上游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-删除上游对账单']);
$this->ajaxReturn(array("success"=>"ok","code"=>0)); $this->ajaxReturn(array("success"=>"ok","code"=>0));
}else{ }else{
$this->ajaxReturn(array("error"=>"database error","code"=>2000)); $this->ajaxReturn(array("error"=>"database error","code"=>2000));

@ -234,6 +234,11 @@ class StatementMangementController extends ThinkController
$is_del = M('statement','tab_')->where(['id'=>$id])->delete(); $is_del = M('statement','tab_')->where(['id'=>$id])->delete();
if ($is_del) { if ($is_del) {
$statementData = M('statement','tab_')->where(['id'=>$id])->find();
addOperationLog(['op_type'=>2,'key'=>$statementData['company_name'].date('YmdHis',$statementData['statement_begin_time']).date('YmdHis',$statementData['statement_end_time']),'op_name'=>'删除下游对账单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-删除下游对账单']);
$this->ajaxReturn(['code'=>0,'success'=>'ok']); $this->ajaxReturn(['code'=>0,'success'=>'ok']);
} else { } else {
$this->ajaxReturn(['code'=>2000,'error'=>'no']); $this->ajaxReturn(['code'=>2000,'error'=>'no']);
@ -601,6 +606,9 @@ class StatementMangementController extends ThinkController
$is_save = M('statement','tab_')->add($data); $is_save = M('statement','tab_')->add($data);
if ($is_save) { if ($is_save) {
addOperationLog(['op_type'=>0,'key'=>'个人结算单'.getNowDate(),'op_name'=>'生成下游个人结算单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-生成下游个人结算单']);
$this->ajaxReturn(['status'=>1,'msg'=>'生成成功']); $this->ajaxReturn(['status'=>1,'msg'=>'生成成功']);
} else { } else {
$this->ajaxReturn(['status'=>0,'msg'=>'生成失败']); $this->ajaxReturn(['status'=>0,'msg'=>'生成失败']);
@ -636,7 +644,7 @@ class StatementMangementController extends ThinkController
$statement = M('statement','tab_') $statement = M('statement','tab_')
->field('ext_field') ->field('ext_field')
->where(['statement_type'=>2]) ->where('ext_field is not null')
->select(); ->select();
$withdrawData = []; $withdrawData = [];
@ -828,6 +836,9 @@ class StatementMangementController extends ThinkController
// echo M('statement','tab_')->_sql();die(); // echo M('statement','tab_')->_sql();die();
if ($is_save) { if ($is_save) {
addOperationLog(['op_type'=>1,'key'=>'个人结算单'.getNowDate(),'op_name'=>'编辑下游个人结算单','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-编辑下游个人结算单']);
$this->ajaxReturn(['status'=>1,'msg'=>'修改成功']); $this->ajaxReturn(['status'=>1,'msg'=>'修改成功']);
} else { } else {
$this->ajaxReturn(['status'=>0,'msg'=>'修改失败']); $this->ajaxReturn(['status'=>0,'msg'=>'修改失败']);
@ -868,6 +879,15 @@ class StatementMangementController extends ThinkController
$isVerify = M('statement','tab_')->where(['id'=>['in',$order]])->save(['verify_status'=>1]); $isVerify = M('statement','tab_')->where(['id'=>['in',$order]])->save(['verify_status'=>1]);
if ($isVerify) { if ($isVerify) {
$data = M('statement','tab_')->where(['id'=>['in',$order]])->select();
foreach ($data as $key => $value) {
addOperationLog(['op_type'=>1,'key'=>$value['company_name'].date('YmdHis',$value['statement_begin_time']).date('YmdHis',$value['statement_end_time']),'op_name'=>'编辑结算单审核通过','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-结算单审核通过']);
}
$this->ajaxReturn(['status'=>1]); $this->ajaxReturn(['status'=>1]);
} else { } else {
$this->ajaxReturn(['status'=>0]); $this->ajaxReturn(['status'=>0]);
@ -887,6 +907,15 @@ class StatementMangementController extends ThinkController
$isVerify = M('statement','tab_')->where(['id'=>['in',$order]])->save(['verify_status'=>2]); $isVerify = M('statement','tab_')->where(['id'=>['in',$order]])->save(['verify_status'=>2]);
if ($isVerify) { if ($isVerify) {
$data = M('statement','tab_')->where(['id'=>['in',$order]])->select();
foreach ($data as $key => $value) {
addOperationLog(['op_type'=>1,'key'=>$value['company_name'].date('YmdHis',$value['statement_begin_time']).date('YmdHis',$value['statement_end_time']),'op_name'=>'编辑结算单审核通过','url'=>U('StatementMangement/lists'),'menu'=>'推广员-结算管理-结算单管理-结算单审核通过']);
}
$this->ajaxReturn(['status'=>1]); $this->ajaxReturn(['status'=>1]);
} else { } else {
$this->ajaxReturn(['status'=>0]); $this->ajaxReturn(['status'=>0]);

@ -81,6 +81,11 @@ class TestResourceController extends ThinkController
$isFreeze = M('user','tab_')->where("id=".$supportId)->save($data); $isFreeze = M('user','tab_')->where("id=".$supportId)->save($data);
if ($isFreeze) { if ($isFreeze) {
$userData = M('user','tab_')->where("id=".$supportId)->find();
addOperationLog(['op_type'=>1,'key'=>$userData['account'],'op_name'=>'编辑冻结账号','url'=>U('StatementMangement/lists'),'menu'=>'推广员-测试资源-扶持号管理-冻结账号']);
$this->ajaxReturn(['status'=>1, 'msg'=> '冻结成功']); $this->ajaxReturn(['status'=>1, 'msg'=> '冻结成功']);
} else { } else {
$this->ajaxReturn(['status'=>0, 'msg'=> '冻结失败']); $this->ajaxReturn(['status'=>0, 'msg'=> '冻结失败']);
@ -100,6 +105,11 @@ class TestResourceController extends ThinkController
$isFreeze = M('user','tab_')->where("id=".$supportId)->save($data); $isFreeze = M('user','tab_')->where("id=".$supportId)->save($data);
if ($isFreeze) { if ($isFreeze) {
$userData = M('user','tab_')->where("id=".$supportId)->find();
addOperationLog(['op_type'=>1,'key'=>$userData['account'],'op_name'=>'编辑解冻账号','url'=>U('StatementMangement/lists'),'menu'=>'推广员-测试资源-扶持号管理-解冻账号']);
$this->ajaxReturn(['status'=>1, 'msg'=> '启用成功']); $this->ajaxReturn(['status'=>1, 'msg'=> '启用成功']);
} else { } else {
$this->ajaxReturn(['status'=>0, 'msg'=> '启用失败']); $this->ajaxReturn(['status'=>0, 'msg'=> '启用失败']);
@ -119,6 +129,11 @@ class TestResourceController extends ThinkController
$passward = M('user','tab_')->where("id=".$supportId)->save($data); $passward = M('user','tab_')->where("id=".$supportId)->save($data);
if ($passward) { if ($passward) {
$userData = M('user','tab_')->where("id=".$supportId)->find();
addOperationLog(['op_type'=>1,'key'=>$userData['account'],'op_name'=>'编辑重置密码','url'=>U('StatementMangement/lists'),'menu'=>'推广员-测试资源-扶持号管理-重置密码']);
$this->ajaxReturn(['status'=>1, 'msg'=> '新密码:'.$password]); $this->ajaxReturn(['status'=>1, 'msg'=> '新密码:'.$password]);
} else { } else {
$this->ajaxReturn(['status'=>0, 'msg'=> '重置密码失败']); $this->ajaxReturn(['status'=>0, 'msg'=> '重置密码失败']);
@ -376,6 +391,8 @@ class TestResourceController extends ThinkController
// $map['apply_status']=['neq',0]; // $map['apply_status']=['neq',0];
$map['apply_type']=0; $map['apply_type']=0;
$list= M('test_resource', 'tab_')->where($map)->find(); $list= M('test_resource', 'tab_')->where($map)->find();
// dump($list);die();
if ($list) { if ($list) {
M('test_resource', 'tab_')->rollback();//回滚 M('test_resource', 'tab_')->rollback();//回滚
$this->error(I('user_account')[$i].'账号已存在'); $this->error(I('user_account')[$i].'账号已存在');
@ -423,12 +440,16 @@ class TestResourceController extends ThinkController
$this->error('请输入账号'); $this->error('请输入账号');
} }
} }
addOperationLog(['op_type'=>0,'key'=>$i_account.'-'.I('game_name').'-'.I('server_name'),'op_name'=>'新增测试账号','url'=>U('testResource/index'),'menu'=>'推广员-测试资源-测试资源申请-新增测试账号']);
} }
if (session('apply_status')==0) { if (session('apply_status')==0) {
session('apply_status', null); session('apply_status', null);
$this->error('请输入账号'); $this->error('请输入账号');
} }
M('test_resource', 'tab_')->commit(); //提交事物 M('test_resource', 'tab_')->commit(); //提交事物
$this->success('添加成功',U('TestResource/index')); $this->success('添加成功',U('TestResource/index'));
} else { } else {
$this->meta_title = '新增测试账号'; $this->meta_title = '新增测试账号';
@ -471,6 +492,11 @@ class TestResourceController extends ThinkController
if($res===false){ if($res===false){
$this->error('更新失败'); $this->error('更新失败');
}else{ }else{
$userData = M('test_resource','tab_')->where($map)->find();
addOperationLog(['op_type'=>1,'key'=>$userData['user_account'].'-'.$userData['game_name'].'-'.$userData['server_name'],'op_name'=>'测试资源申请编辑','url'=>U('TestResource/edit',['id'=>$userData['id']]),'menu'=>'推广员-测试资源-测试资源申请-测试资源申请编辑']);
$this->success('更新成功', U('index')); $this->success('更新成功', U('index'));
} }
} }
@ -557,6 +583,9 @@ class TestResourceController extends ThinkController
}else{ }else{
//成功 //成功
} }
addOperationLog(['op_type'=>0,'key'=>$support['user_account'].'-'.$support['game_name'].'-'.$support['server_name'],'op_name'=>'测试资源申请后续','url'=>U('TestResource/apply',['id'=>$value]),'menu'=>'推广员-测试资源-测试资源申请-测试资源申请后续']);
} }
M('test_resource','tab_')->commit(); //提交事物 M('test_resource','tab_')->commit(); //提交事物
$this->success('申请成功',U('index')); $this->success('申请成功',U('index'));

Loading…
Cancel
Save