更新
This commit is contained in:
@@ -32,6 +32,16 @@ foreach ($overview['member_options'] as $member) {
|
||||
throw new RuntimeException('member_options 缺少树形下拉展示部门');
|
||||
}
|
||||
}
|
||||
$enabledOperatorCount = 0;
|
||||
foreach ($overview['operator_options'] as $operator) {
|
||||
$isEnabled = (int) ($operator['disable'] ?? 0) === 0;
|
||||
if ($isEnabled) {
|
||||
$enabledOperatorCount++;
|
||||
}
|
||||
if ((bool) ($operator['can_grant'] ?? false) !== $isEnabled) {
|
||||
throw new RuntimeException('操作人可授权状态不应依赖目标账号预先拥有页面权限');
|
||||
}
|
||||
}
|
||||
$memberIds = array_values(array_unique(array_map('intval', array_column($overview['member_options'], 'id'))));
|
||||
if ($memberIds !== []) {
|
||||
$disabledMemberCount = (int) Db::name('admin')->whereIn('id', $memberIds)->where('disable', '<>', 0)->count();
|
||||
@@ -83,10 +93,11 @@ if ($scopedAdmin) {
|
||||
}
|
||||
|
||||
echo sprintf(
|
||||
"WECOM_PROMOTION_OVERVIEW_SMOKE_OK configured=%d callback=%d pools=%d links=%d members=%d\n",
|
||||
"WECOM_PROMOTION_OVERVIEW_SMOKE_OK configured=%d callback=%d pools=%d links=%d members=%d operators=%d\n",
|
||||
!empty($overview['config']['ready']) ? 1 : 0,
|
||||
!empty($overview['config']['callback_ready']) ? 1 : 0,
|
||||
count($overview['pools']),
|
||||
count($overview['links']),
|
||||
count($overview['member_options'])
|
||||
count($overview['member_options']),
|
||||
$enabledOperatorCount
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user