浏览代码

feat: 完成开发

huangzhichao 1 周之前
父节点
当前提交
9f3b896297

+ 0 - 4
src/dto/chat-management.ts

@@ -58,8 +58,4 @@ export class GetConversationListDto {
   @IsNumber()
   @IsOptional()
   page: number
-
-  @IsNumber()
-  @IsOptional()
-  size: number
 }

+ 2 - 3
src/module/chat-management/chat-management.controller.ts

@@ -50,13 +50,12 @@ export class ChatManagementController {
   @Get('conversation-list')
   @ApiOperation({ summary: '获取会话列表' })
   async getConversationList(@Query() query: GetConversationListDto) {
-    const { customerId, staffId, status, page, size } = query
+    const { customerId, staffId, status, page } = query
     return this.chatManagementService.getConversationList(
       customerId,
       staffId,
       status,
-      page,
-      size
+      page
     )
   }
 }

+ 6 - 8
src/module/chat-management/service/chat-management-http.service.ts

@@ -85,30 +85,28 @@ export class ChatManagementHttpService {
   // 获取客服对话列表
   async getStaffSessionList(
     staff_id: string,
-    page?: number,
+    page_id?: number,
     page_size?: number
   ): Promise<ServiceResponse<StaffSession[]>> {
     return this.makeRequest<StaffSession[]>('getStaffSessionList', {
       staff_id,
-      page,
+      page_id,
       page_size
     })
   }
 
   // 获取客服微信对话详情列表
   async getConversationList(
-    customer_id: string,
+    user_id: string,
     staff_id: string,
     status?: number,
-    page?: number,
-    size?: number
+    page_id?: number
   ): Promise<ServiceResponse<ChatConversation[]>> {
     return this.makeRequest<ChatConversation[]>('getConversationList', {
-      customer_id,
+      user_id,
       staff_id,
       status,
-      page,
-      size
+      page_id
     })
   }
 }

+ 2 - 4
src/module/chat-management/service/chat-management.service.ts

@@ -86,15 +86,13 @@ export class ChatManagementService implements IChatManagementService {
     customerId: string,
     staffId: string,
     status?: number,
-    page?: number,
-    size?: number
+    page?: number
   ): Promise<ServiceResponse<ChatConversation[]>> {
     const { code, data, msg } = await this.httpService.getConversationList(
       customerId,
       staffId,
       status,
-      page,
-      size
+      page
     )
     if (code !== HttpStatusCode.OK) {
       return {