|
|
@@ -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();
|