wugg 2 years ago
parent
commit
cca4cf8226
1 changed files with 3 additions and 2 deletions
  1. 3 2
      app/admin/controller/User.php

+ 3 - 2
app/admin/controller/User.php

@@ -61,8 +61,9 @@ class User extends BaseController{
             }
             unset($post['status']);
     	}
-    	if($post["level"]!=""){
-    		$where[]=["b.level","=",$post["level"]];
+    	if($post["islevel"]!=""){
+
+    		$where[]=$post["islevel"]==1?["b.level","=",1]:["b.level","<>",1];
             $uid =Db::name("user_role")->alias("a")
             ->leftJoin("role b","a.roleid=b.id")->where($where)->column("uid");
             $post['uid'] = $uid;