Ver Fonte

微信小程序

cqp há 2 dias atrás
pai
commit
5d5af4c0bf
1 ficheiros alterados com 2 adições e 0 exclusões
  1. 2 0
      app/Service/EmployeeService.php

+ 2 - 0
app/Service/EmployeeService.php

@@ -1034,6 +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('del_time',0)
                 ->exists();
             if($bool) return [false,'角色名称已存在'];
@@ -1042,6 +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('id','<>',$data['id'])
                 ->where('del_time',0)
                 ->exists();