Selaa lähdekoodia

微信小程序

cqp 2 päivää sitten
vanhempi
sitoutus
d9a7aaadef
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      app/Service/EmployeeService.php

+ 2 - 2
app/Service/EmployeeService.php

@@ -1034,7 +1034,7 @@ class EmployeeService extends Service
         if($is_check){
             $bool = Role::where('title',$data['title'])
                 ->where('top_depart_id', $data['top_depart_id'])
-                ->where('tree_type', $data['select_tree_type'])
+                ->where('tree_type', $user['select_tree_type'])
                 ->where('del_time',0)
                 ->exists();
             if($bool) return [false,'角色名称已存在'];
@@ -1043,7 +1043,7 @@ class EmployeeService extends Service
             $top_depart_id = Role::where('id',$data['id'])->value('top_depart_id');
             $bool = Role::where('title',$data['title'])
                 ->where('top_depart_id',$top_depart_id)
-                ->where('tree_type', $data['select_tree_type'])
+                ->where('tree_type', $user['select_tree_type'])
                 ->where('id','<>',$data['id'])
                 ->where('del_time',0)
                 ->exists();