This commit is contained in:
weiz 2024-02-26 15:34:16 +08:00
parent b1cba49907
commit 54b4b6882d
2 changed files with 3 additions and 3 deletions

View File

@ -41,7 +41,7 @@ class DeptLogic extends BaseLogic
Dept::create([
'org_id' => $params['org_id'],
'name' => $params['name'],
'leader' => $params['leader'],
'leader' => $params['leader'] ?? 0,
'mobile' => $params['mobile'],
'status' => $params['status'],
'sort' => $params['sort'] ?? 0
@ -63,7 +63,7 @@ class DeptLogic extends BaseLogic
'id' => $params['id'],
'org_id' => $params['org_id'],
'name' => $params['name'],
'leader' => $params['leader'],
'leader' => $params['leader'] ?? 0,
'mobile' => $params['mobile'],
'status' => $params['status'],
'sort' => $params['sort'] ?? 0

View File

@ -33,7 +33,7 @@ class DeptValidate extends BaseValidate
'id' => 'require|checkDept',
'org_id' => 'require|checkOrg',
'name' => 'require|length:1,30',
'leader' => 'require|checkLeader',
'leader' => 'checkLeader',
'mobile' => 'require|mobile',
'status' => 'require|in:0,1',
'sort' => 'egt:0',