diff --git a/Application/Admin/Controller/TestResourceController.class.php b/Application/Admin/Controller/TestResourceController.class.php index 0057cde43..2c5e77a50 100644 --- a/Application/Admin/Controller/TestResourceController.class.php +++ b/Application/Admin/Controller/TestResourceController.class.php @@ -32,14 +32,14 @@ class TestResourceController extends ThinkController $map['tab_test_resource.role_name']=['like','%'.I('role_name').'%']; } if(!empty(I('user_account'))){ - $map['tab_test_resource.user_account']=I('user_account'); + $map['tab_test_resource.user_account']=['like','%'.I('user_account').'%']; } if(!empty(I('promote_name'))){ - $map['tab_test_resource.promote_account']=I('promote_name'); + $map['tab_test_resource.promote_account']=['like','%'.I('promote_name').'%']; } $data = M('test_resource','tab_') - ->field('tab_test_resource.id,tab_test_resource.user_id,tab_test_resource.game_name,tab_test_resource.server_name,tab_test_resource.user_account,tab_test_resource.promote_account,tab_test_resource.role_name,tab_test_resource.create_time,device_number,check_status') + ->field('tab_test_resource.id,tab_test_resource.user_id,tab_test_resource.game_name,tab_test_resource.server_name,tab_test_resource.user_account,tab_test_resource.promote_account,tab_test_resource.role_name,tab_test_resource.create_time,device_number,lock_status as check_status') ->join('left join tab_user as user on tab_test_resource.user_id = user.id') ->where($map) ->page($page,$row) @@ -51,7 +51,7 @@ class TestResourceController extends ThinkController } $count = M('test_resource','tab_') - ->field('tab_test_resource.game_name,tab_test_resource.server_name,tab_test_resource.user_account,tab_test_resource.promote_account,tab_test_resource.role_name,tab_test_resource.create_time,device_number,check_status') + ->field('tab_test_resource.game_name,tab_test_resource.server_name,tab_test_resource.user_account,tab_test_resource.promote_account,tab_test_resource.role_name,tab_test_resource.create_time,device_number,lock_status as check_status') ->join('left join tab_user as user on tab_test_resource.user_id = user.id') ->where($map) ->select(); @@ -73,7 +73,7 @@ class TestResourceController extends ThinkController } $data = [ - 'check_status' => 0 + 'lock_status' => 0 ]; $isFreeze = M('user','tab_')->where("id=".$supportId)->save($data); @@ -92,7 +92,7 @@ class TestResourceController extends ThinkController } $data = [ - 'check_status' => 1 + 'lock_status' => 1 ]; $isFreeze = M('user','tab_')->where("id=".$supportId)->save($data); @@ -353,9 +353,9 @@ class TestResourceController extends ThinkController for ($i=0; $i < $count ; $i++) { $i_account=I('user_account')[$i]; if (!empty($i_account)) { - $user=M('user', 'tab_')->field('promote_id,password,phone')->where(['account'=>$i_account])->find(); - $promote = $this->get_all_promote(); - if (!in_array($user['promote_id'], $promote)) { + $user=M('user', 'tab_')->field('promote_id,promote_account,password,phone')->where(['account'=>$i_account])->find(); +// $promote = $this->get_all_promote(); + if (!$user) { M('test_resource', 'tab_')->rollback();//回滚 $this->error($i_account.'账号不存在'); } @@ -414,14 +414,14 @@ class TestResourceController extends ThinkController $data['apply_resource']=I('apply_resource')[$i]; $data['apply_remark']=I('apply_remark')[$i]; - $data['apply_name']=$_SESSION['onethink_home']['promote_auth']['account']; - $data['apply_id']=$_SESSION['onethink_home']['promote_auth']['pid']; + $data['apply_name']=$user['promote_account']; + $data['apply_id']=$user['promote_id']; // $data['promote_id']=session("promote_auth.pid"); // $data['promote_account']=session("promote_auth.account"); - $data['promote_id']=$_SESSION['onethink_home']['promote_auth']['pid']; - $data['promote_account']=$_SESSION['onethink_home']['promote_auth']['account']; + $data['promote_id']=$user['promote_id']; + $data['promote_account']=$user['promote_account']; $data['create_time']=time(); $data['apply_type']=0; @@ -552,13 +552,13 @@ class TestResourceController extends ThinkController $data['apply_resource']=I('apply_resource'); $data['apply_remark']=I('apply_remark'); - $data['apply_name']=$_SESSION['onethink_home']['promote_auth']['account']; - $data['apply_id']=$_SESSION['onethink_home']['promote_auth']['pid']; + $data['apply_name']=$support['promote_account']; + $data['apply_id']=$support['promote_id']; // $data['promote_id']=session("promote_auth.pid"); // $data['promote_account']=session("promote_auth.account"); - $data['promote_id']=$_SESSION['onethink_home']['promote_auth']['pid']; - $data['promote_account']=$_SESSION['onethink_home']['promote_auth']['account']; + $data['promote_id']=$support['promote_id']; + $data['promote_account']=$support['promote_account']; $data['create_time']=time(); $data['apply_type']=1; @@ -609,7 +609,7 @@ class TestResourceController extends ThinkController unset($_REQUEST['start']);unset($_REQUEST['end']); } - $map['promote_id']=$_SESSION['onethink_home']['promote_auth']['pid']; +// $map['promote_id']=$_SESSION['onethink_home']['promote_auth']['pid']; $data=M('test_resource','tab_')->where($map)->order('id desc')->page($page,$row)->select(); $count=M('test_resource','tab_')->field('id')->where($map)->select(); $count = count($count);