class DepartmentManagementImpl implements DepartmentManagementService {

    @Override
    public CommonResult updateDepartmentById(Department department) {
        if (departmentMapper.get(department.getId()) == null) {
            return CommonResult.fail(E_602);
        }
        int count = departmentMapper.update(department);
        if (count == 0) {
            return CommonResult.fail();
        }
        return CommonResult.success(count);
    }

}