'use strict'; const MainService = require('../main'); class WarehouseIndexService extends MainService { /** * 心跳接口,返回服务可用性与仓库上下文信息。 * @return {Promise} 心跳响应。 */ async ping() { const { warehouseId, appKey } = this.getInfo(); return { warehouse_id: warehouseId, app_key: appKey, server_time: Math.floor(Date.now() / 1000), status: 'ok', }; } } module.exports = WarehouseIndexService;