更新
This commit is contained in:
@@ -16,7 +16,7 @@ if (!$admin) {
|
||||
throw new RuntimeException('未找到 root 管理员,无法执行数据范围冒烟测试');
|
||||
}
|
||||
$overview = WecomPromotionLogic::overview((int) $admin['id'], $admin, 'https://example.test');
|
||||
foreach (['meta', 'config', 'summary', 'pools', 'links', 'member_options'] as $key) {
|
||||
foreach (['meta', 'config', 'summary', 'pools', 'links', 'member_options', 'department_options'] as $key) {
|
||||
if (!array_key_exists($key, $overview)) {
|
||||
throw new RuntimeException("overview 缺少 {$key}");
|
||||
}
|
||||
@@ -28,6 +28,12 @@ foreach ($overview['member_options'] as $member) {
|
||||
if (empty($member['id']) || empty($member['userid'])) {
|
||||
throw new RuntimeException('member_options 返回了未绑定企业微信 userid 的成员');
|
||||
}
|
||||
if (!array_key_exists('display_dept_id', $member)) {
|
||||
throw new RuntimeException('member_options 缺少树形下拉展示部门');
|
||||
}
|
||||
}
|
||||
if (!is_array($overview['department_options'])) {
|
||||
throw new RuntimeException('department_options 必须是部门树数组');
|
||||
}
|
||||
|
||||
$scopedAdmin = Db::name('admin')->where('root', 0)->whereNull('delete_time')->order('id', 'asc')->find();
|
||||
|
||||
Reference in New Issue
Block a user