import http from '@/utils/httpRequest' import type { ManageListResponse, ManagePageParams } from './types' /** * 橘视厅调用日志(设备调用橘视厅 API 的日志) */ export interface JstCallLogItem { id: number /** 请求URL(可能带反引号和query参数) */ apiPath: string /** 请求方法 */ requestMethod?: string /** 请求体 */ requestBody?: string /** 响应体 */ responseBody?: string /** HTTP状态码 */ responseCode?: number /** 是否成功(1=成功,0=失败) */ success: number /** 耗时(ms) */ duration?: number /** 关联数据ID */ dataId?: number /** 请求头(JSON字符串) */ requestHeaders?: string /** 客户端IP */ clientIp?: string /** 错误信息 */ errorMessage?: string /** 关联设备MAC */ mac?: string /** 关联设备SN */ deviceSn?: string /** 关联设备UID */ deviceUid?: string /** 门店组织ID */ storeOrgId?: number /** 设备所属门店名称 */ storeOrgName?: string /** 门店编码 */ storeOrgCode?: string /** 门店类型 */ storeOrgType?: string createTime: string } /** * 橘视厅调用日志查询参数 */ export interface JstCallLogListParams extends ManagePageParams { mac?: string beginTime?: string endTime?: string apiPath?: string requestBody?: string /** 结果筛选:1=成功,0=失败 */ success?: number } /** 橘视厅调用日志列表 */ export function getJstCallLogList(params?: JstCallLogListParams): Promise> { return http.get(http.adornUrl('/manage/jst/call-log/list'), { params: http.adornParams(params || {}) }).then(res => res.data) }