/// <reference path="../pb_data/types.d.ts" />

const { fail } = require(`${__hooks}/bai_api_pb_hooks/bai_api_shared/utils/response.js`)

routerUse(function (e) {
    try {
        return e.next()
    } catch (err) {
        const status =
            (err && typeof err.statusCode === 'number' && err.statusCode)
            || (err && typeof err.status === 'number' && err.status)
            || 500

        return fail(e, (err && err.message) || '服务器内部错误', (err && err.data) || {}, status)
    }
})

require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/system/hello.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/system/health.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/system/users-count.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/system/refresh-token.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/platform/login.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/platform/register.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/company/records-create.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/dictionary/list.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/dictionary/detail.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/dictionary/create.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/dictionary/update.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/dictionary/delete.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/attachment/list.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/attachment/detail.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/attachment/upload.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/attachment/delete.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/document/list.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/document/detail.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/document/create.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/document/update.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/document/delete.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/product/list.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/product/detail.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/product/create.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/product/update.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/product/delete.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/scheme-template/list.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/scheme-template/detail.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/scheme-template/create.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/scheme-template/update.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/scheme-template/delete.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/scheme/list.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/scheme/detail.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/scheme/create.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/scheme/update.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/scheme/delete.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/cart/list.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/cart/detail.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/cart/create.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/cart/update.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/cart/delete.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/order/list.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/order/detail.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/order/create.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/order/update.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/order/delete.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/cart-order/manage-users.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/cart-order/manage-user-update.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/document-history/list.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/sdk-permission/context.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/sdk-permission/role-save.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/sdk-permission/role-delete.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/sdk-permission/user-role-update.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/sdk-permission/collection-save.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/sdk-permission/manageplatform-sync.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/wechat/login.js`)
require(`${__hooks}/bai_api_pb_hooks/bai_api_routes/wechat/profile.js`)


