cqp 1 lună în urmă
părinte
comite
a0b50b77bf
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      app/Service/TeamService.php

+ 2 - 2
app/Service/TeamService.php

@@ -196,13 +196,13 @@ class TeamService extends Service
 
         if($is_add){
             $bool = Team::where('code',$data['code'])
-                ->where('top_depart_id', $data['top_depart_id'])
+                ->where('top_depart_id', $user['top_depart_id'])
                 ->where('del_time',0)
                 ->exists();
         }else{
             if(empty($data['id'])) return [false,'ID不能为空'];
             $bool = Team::where('code',$data['code'])
-                ->where('top_depart_id', $data['top_depart_id'])
+                ->where('top_depart_id', $user['top_depart_id'])
                 ->where('id','<>',$data['id'])
                 ->where('del_time',0)
                 ->exists();