为各服务接口补 /// 中文注释:swagger 恢复中文说明(admin 203 / user 93 / customer 12 / fishgame 4)
This commit is contained in:
@@ -18,6 +18,9 @@ public class CustomerController : BaseController
|
||||
_customerService = customerService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 发起会话 - 用户点击客服入口时调用
|
||||
/// </summary>
|
||||
[HttpPost("start")]
|
||||
public async Task<BaseResponse<ConversationEntity>> StartConversation([FromBody] StartConversationParam param)
|
||||
{
|
||||
@@ -28,6 +31,9 @@ public class CustomerController : BaseController
|
||||
return this.ToFailResult<ConversationEntity>(result.msg);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 发送消息 - 在会话中发送文字或图片消息
|
||||
/// </summary>
|
||||
[HttpPost("message")]
|
||||
public async Task<BaseResponse<string>> SendMessage([FromBody] SendMessageParam param)
|
||||
{
|
||||
@@ -38,6 +44,9 @@ public class CustomerController : BaseController
|
||||
return this.ToFailResult<string>(result.msg);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取消息列表 - 获取指定会话的所有聊天记录
|
||||
/// </summary>
|
||||
[HttpGet("messages/{conversationId}")]
|
||||
public async Task<ListResponse<MessageEntity>> GetMessages(string conversationId)
|
||||
{
|
||||
@@ -48,6 +57,9 @@ public class CustomerController : BaseController
|
||||
return this.ToListFailResult<MessageEntity>(result.msg);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取会话列表 - 获取所有会话或指定客服的会话
|
||||
/// </summary>
|
||||
[HttpGet("conversations")]
|
||||
public async Task<ListResponse<ConversationResponse>> GetConversations([FromQuery] string? customerId)
|
||||
{
|
||||
@@ -58,6 +70,9 @@ public class CustomerController : BaseController
|
||||
return this.ToListFailResult<ConversationResponse>(result.msg);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取当前用户的会话列表 - 获取当前登录用户的所有会话及聊天记录
|
||||
/// </summary>
|
||||
[HttpGet("my-conversations")]
|
||||
public async Task<ListResponse<ConversationResponse>> GetMyConversations()
|
||||
{
|
||||
@@ -69,6 +84,9 @@ public class CustomerController : BaseController
|
||||
return this.ToListFailResult<ConversationResponse>(result.msg);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 结束会话 - 关闭指定的会话
|
||||
/// </summary>
|
||||
[HttpPost("end")]
|
||||
public async Task<BaseResponse<string>> EndConversation([FromBody] EndConversationParam param)
|
||||
{
|
||||
@@ -79,7 +97,9 @@ public class CustomerController : BaseController
|
||||
return this.ToFailResult<string>(result.msg);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取在线客服列表 - 获取当前所有在线的客服人员
|
||||
/// </summary>
|
||||
[HttpGet("online")]
|
||||
public async Task<ListResponse<CustomerEntity>> GetOnlineCustomers()
|
||||
{
|
||||
@@ -90,6 +110,9 @@ public class CustomerController : BaseController
|
||||
return this.ToListFailResult<CustomerEntity>(result.msg);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新客服状态 - 设置客服的在线/离线状态
|
||||
/// </summary>
|
||||
[HttpPost("status")]
|
||||
public async Task<BaseResponse<string>> UpdateCustomerStatus([FromBody] UpdateStatusParam param)
|
||||
{
|
||||
@@ -100,6 +123,9 @@ public class CustomerController : BaseController
|
||||
return this.ToFailResult<string>(result.msg);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 标记会话已读 - 客服点击会话时调用,更新该用户所有会话的最后读取时间
|
||||
/// </summary>
|
||||
[HttpPost("mark-read")]
|
||||
public async Task<BaseResponse<string>> MarkAsRead([FromBody] MarkReadParam param)
|
||||
{
|
||||
@@ -110,6 +136,9 @@ public class CustomerController : BaseController
|
||||
return this.ToFailResult<string>(result.msg);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取聊天记录 - 获取指定会话的所有消息
|
||||
/// </summary>
|
||||
[HttpGet("chatlog/{conversationId}")]
|
||||
public async Task<ListResponse<MessageEntity>> GetChatLog(string conversationId)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user