更新
This commit is contained in:
@@ -45,10 +45,18 @@ foreach ([
|
||||
"array_key_exists('status', \$changes)",
|
||||
"array_key_exists('skip_verify', \$changes)",
|
||||
"array_key_exists('automation_config', \$changes)",
|
||||
"array_key_exists('member_status', \$changes)",
|
||||
'array_replace($currentAutomation, $automationPatch)',
|
||||
'self::savePool($saveParams, $adminId, $adminInfo, false)',
|
||||
'self::updatePoolMemberStatuses(',
|
||||
'self::previewPoolMemberStatus(',
|
||||
'self::assertMemberDispatchReady(',
|
||||
'if ($dispatch !== null && $status === 0)',
|
||||
'至少需要保留一名当前可用的上线员工',
|
||||
'员工上下线需要单独批量保存',
|
||||
"'sync_error_count' => \$syncErrorCount",
|
||||
"'sync_queued_count' => \$syncQueuedCount",
|
||||
"'member_updated' => \$memberUpdated",
|
||||
"'results' => \$results",
|
||||
] as $needle) {
|
||||
if (!str_contains($method, $needle)) {
|
||||
@@ -63,14 +71,37 @@ if ($permissionValidation === false || $writeLoop === false || $permissionValida
|
||||
if (!str_contains($method, "false\n );")) {
|
||||
throw new RuntimeException('批量修改不得允许共享操作人绕过原管理范围批量编辑');
|
||||
}
|
||||
if (!str_contains($method, "Db::name('qywx_promotion_range_sync')->where('pool_id', \$poolId)->lock(true)->find()")
|
||||
|| !str_contains($sources['logic'], "'_status_only' => true")
|
||||
|| !str_contains($sources['logic'], '$eligibleUserIds = self::eligibleSelectedUserIds(')
|
||||
|| !str_contains($sources['logic'], '$createdRangeChanged = $createdRemote')
|
||||
|| !str_contains($sources['logic'], '$needsQueuedSync = !$createdRemote || $createdRangeChanged')
|
||||
|| !str_contains($sources['logic'], '$rangeShrank = array_diff($currentRange[\'userids\'], $nextRange[\'userids\']) !== []')
|
||||
|| !str_contains($sources['logic'], 'if ($isGoingOffline || $rangeShrank)')) {
|
||||
throw new RuntimeException('单个与批量员工状态更新未使用一致的事务锁和字段保留策略');
|
||||
}
|
||||
|
||||
$page = $sources['page'];
|
||||
foreach ([
|
||||
'批量修改方案',
|
||||
'全选可管理的分流方案',
|
||||
'allManageablePoolsSelected',
|
||||
'someManageablePoolsSelected',
|
||||
'toggleAllPoolSelection',
|
||||
'仅勾选的项目会覆盖到所选方案',
|
||||
'batchConfigApply.skip_verify',
|
||||
'batchConfigApply.fallback_url',
|
||||
'batchConfigApply.status',
|
||||
'batchConfigApply.member_status',
|
||||
'batchConfigForm.member_admin_ids',
|
||||
'batchMemberStatusById',
|
||||
'batchMemberDepartmentTree',
|
||||
'batchMemberTreeDefaultExpandedKeys',
|
||||
'selectableDepartments: true',
|
||||
'勾选部门可全选其下员工',
|
||||
'batchMemberOfflineBlockedPools',
|
||||
'批量修改员工上线状态',
|
||||
'员工上下线需单独批量保存',
|
||||
'batchConfigApply.reception',
|
||||
'batchConfigApply.customer',
|
||||
'batchConfigApply.welcome',
|
||||
@@ -82,6 +113,10 @@ foreach ([
|
||||
throw new RuntimeException("前端批量修改交互缺少 {$needle}");
|
||||
}
|
||||
}
|
||||
if (!str_contains($sources['api'], 'member_status?: {')
|
||||
|| !str_contains($sources['api'], 'member_updated: number')) {
|
||||
throw new RuntimeException('前端批量修改 API 缺少员工上下线契约');
|
||||
}
|
||||
if (!str_contains($sources['automationForm'], 'disabledSections?: AutomationSection[]')
|
||||
|| !str_contains($sources['automationForm'], 'backupExcludedMemberIds?: number[]')) {
|
||||
throw new RuntimeException('自动化表单未支持批量场景的分组禁用或主成员冲突约束');
|
||||
|
||||
Reference in New Issue
Block a user