修复无法正常删除部门成员的问题
Signed-off-by: vilson <545522390@qq.com>
This commit is contained in:
parent
2d1f668f72
commit
c6c58b580a
@ -81,10 +81,9 @@ class DepartmentMember extends CommonModel
|
||||
}
|
||||
$result = $hasJoined->delete();
|
||||
$department_codes = self::where(['account_code' => $accountCode, 'organization_code' => $orgCode])->column('department_code');
|
||||
if ($department_codes) {
|
||||
$department_codes = implode(',', $department_codes);
|
||||
MemberAccount::update(['department_code' => $department_codes], ['code' => $accountCode]);
|
||||
}
|
||||
!$department_codes && $department_codes = [];
|
||||
$department_codes = implode(',', $department_codes);
|
||||
MemberAccount::update(['department_code' => $department_codes], ['code' => $accountCode]);
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user