import { Injectable } from '@nestjs/common' import { ServiceResponse } from '@/response/response.interface' import { HttpClientService } from '@/shared/http-client/http-client.service' @Injectable() export class ChatManagementHttpService { private readonly baseUrl = 'http://192.168.206.189:8083/api' constructor(private readonly httpClientService: HttpClientService) {} private async makeRequest( endpoint: string, params?: Record ): Promise> { const url = `${this.baseUrl}/${endpoint}` return this.httpClientService.get(url, params) } async makeRequestPost( endpoint: string, params?: Record ): Promise> { const url = `${this.baseUrl}/${endpoint}` return this.httpClientService.post(url, params) } // 获取对话总览列表 async getStaffSessionSummary( staff_id?: string, status?: string, page?: number, size?: number ): Promise> { return this.makeRequest('getStaffSessionSummary', { staff_id, status, page, size }) } // 获取客服人员列表 async getStaffList( page?: number, size?: number ): Promise> { return this.makeRequest('getStaffList', { page, size }) } // 获取客服对话列表 async getStaffSessionList( staff_id: string, page_id?: number, page_size?: number ): Promise> { return this.makeRequest('getStaffSessionList', { staff_id, page_id, page_size }) } // 获取客服微信对话详情列表 async getConversationList( user_id: string, staff_id: string, status?: number, page_id?: number ): Promise> { return this.makeRequest('getConversationList', { user_id, staff_id, status, page_id }) } }