客服可以给会话设置个人备注, 设置 快捷回复
建群自动话术
This commit is contained in:
@@ -68,3 +68,79 @@ func (s *Service) MarkRead(principal Principal, conversationID uint64) error {
|
||||
}
|
||||
return s.repo.MarkRead(principal, conversationID)
|
||||
}
|
||||
|
||||
func (s *Service) TransferConversation(principal Principal, conversationID uint64, req TransferRequest) error {
|
||||
if s.repo == nil {
|
||||
return ErrDependencyUnavailable
|
||||
}
|
||||
if conversationID == 0 || req.ToAdminID == 0 {
|
||||
return ErrInvalidMessage
|
||||
}
|
||||
return s.repo.TransferConversation(principal, conversationID, req.ToAdminID)
|
||||
}
|
||||
|
||||
func (s *Service) GetAvailableSupportAdmins() ([]SupportAdminDTO, error) {
|
||||
if s.repo == nil {
|
||||
return nil, ErrDependencyUnavailable
|
||||
}
|
||||
return s.repo.GetAvailableSupportAdmins()
|
||||
}
|
||||
|
||||
func (s *Service) ListConversationsWithFilter(principal Principal, page, pageSize int, filter string) (*PaginatedResult, error) {
|
||||
if s.repo == nil {
|
||||
return nil, ErrDependencyUnavailable
|
||||
}
|
||||
return s.repo.ListConversationsWithFilter(principal, page, pageSize, filter)
|
||||
}
|
||||
|
||||
func (s *Service) UpdateRemark(principal Principal, conversationID uint64, req UpdateRemarkRequest) error {
|
||||
if s.repo == nil {
|
||||
return ErrDependencyUnavailable
|
||||
}
|
||||
return s.repo.UpdateRemark(principal, conversationID, req.Remark)
|
||||
}
|
||||
|
||||
func (s *Service) ListQuickReplies(adminID uint64) ([]QuickReplyDTO, error) {
|
||||
if s.repo == nil {
|
||||
return nil, ErrDependencyUnavailable
|
||||
}
|
||||
return s.repo.ListQuickReplies(adminID)
|
||||
}
|
||||
|
||||
func (s *Service) CreateQuickReply(adminID uint64, req CreateQuickReplyRequest) (*QuickReplyDTO, error) {
|
||||
if s.repo == nil {
|
||||
return nil, ErrDependencyUnavailable
|
||||
}
|
||||
if req.Title == "" || req.Content == "" {
|
||||
return nil, ErrInvalidMessage
|
||||
}
|
||||
return s.repo.CreateQuickReply(adminID, req)
|
||||
}
|
||||
|
||||
func (s *Service) UpdateQuickReply(adminID uint64, replyID uint64, req UpdateQuickReplyRequest) error {
|
||||
if s.repo == nil {
|
||||
return ErrDependencyUnavailable
|
||||
}
|
||||
return s.repo.UpdateQuickReply(adminID, replyID, req)
|
||||
}
|
||||
|
||||
func (s *Service) DeleteQuickReply(adminID uint64, replyID uint64) error {
|
||||
if s.repo == nil {
|
||||
return ErrDependencyUnavailable
|
||||
}
|
||||
return s.repo.DeleteQuickReply(adminID, replyID)
|
||||
}
|
||||
|
||||
func (s *Service) GetAutoWelcomeMessage() string {
|
||||
if s.repo == nil {
|
||||
return ""
|
||||
}
|
||||
return s.repo.GetAutoWelcomeMessage()
|
||||
}
|
||||
|
||||
func (s *Service) UpdateAutoWelcomeMessage(message string) error {
|
||||
if s.repo == nil {
|
||||
return ErrDependencyUnavailable
|
||||
}
|
||||
return s.repo.UpdateAutoWelcomeMessage(message)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user