routerAdd('POST', '/api/sdk-permission/collection-save', function (e) {
    const guards = require(`${__hooks}/bai_api_pb_hooks/bai_api_shared/middlewares/requestGuards.js`)
    const permissionService = require(`${__hooks}/bai_api_pb_hooks/bai_api_shared/services/sdkPermissionService.js`)
    const { success } = require(`${__hooks}/bai_api_pb_hooks/bai_api_shared/utils/response.js`)

    guards.requireJson(e)
    guards.requireManagePlatformUser(e)
    guards.duplicateGuard(e)

    const payload = guards.validateSdkPermissionCollectionSaveBody(e)
    const data = permissionService.saveCollectionRules(payload)

    return success(e, '保存集合权限成功', data)
})


