import { ApiClientFactory } from '../core/api.client.factory'; import { IOnlineNemberByTime, ITopicErrorRateRecord, IDayAnswerNumberRecord, IDayAnswerPassRateRecord } from '../model/wifiEducate.model'; export class WifiEducateService { constructor(private factory: ApiClientFactory) {} // 近24小时在线人数 async loadOnlineNemberByTime(projectId: string, deviceId: string): Promise { const url = `/api/web/projects/${projectId}/wifiEducate/getOnlineNemberByTime?deviceId=${deviceId}`; const result = await this.factory.entity.get(url); return result; } // 近一个月错题排行 async loadTopicErrorRateRecord(projectId: string, params: any): Promise { const url = `/api/web/projects/${projectId}/wifiEducate/getTopicErrorRateRecord`; const result = await this.factory.entity.get(url, params); return result; } // 错题详情 async loadTopicErrorRateRecordDetail(projectId: string, deviceId: string, params: any): Promise { const url = `/api/web/projects/${projectId}/wifiEducate/getTopicErrorRateRecordDetail/${deviceId}`; const result = await this.factory.entity.get(url, params); return result; } // 日答题人数(开累) async loadDayAnswerNumberRecord(projectId: string, deviceId: string): Promise { const url = `/api/web/projects/${projectId}/wifiEducate/getDayAnswerNumberRecord?deviceId=${deviceId}`; const result = await this.factory.entity.get(url); return result; } // 日答题正确率统计(开累) async loadDayAnswerPassRateRecord(projectId: string, deviceId: string): Promise { const url = `/api/web/projects/${projectId}/wifiEducate/getDayAnswerPassRateRecord?deviceId=${deviceId}`; const result = await this.factory.entity.get(url); return result; } }