|
|
@ -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'));
|
|
|
|