74 lines
6.3 KiB
Go
74 lines
6.3 KiB
Go
package dto
|
||
|
||
import (
|
||
"customer-server/model/entity"
|
||
|
||
"gitea.com/red-future/common/beans"
|
||
"github.com/gogf/gf/v2/frame/g"
|
||
)
|
||
|
||
// AddDataStatisticsReq 添加数据统计
|
||
type AddDataStatisticsReq struct {
|
||
g.Meta `path:"/add" method:"post" tags:"数据统计" summary:"添加统计数据" dc:"记录每日客服的汇总统计数据"` // 路由: POST /data/statistics/add
|
||
Date string `json:"date" v:"required|date-format:2006-01-02"` // 日期,格式:YYYY-MM-DD
|
||
AccountName string `json:"accountName" v:"required"` // 客服账号名称
|
||
CustomerServiceName string `json:"customerServiceName" v:"required"` // 客服名称
|
||
CustomerServicePlatform string `json:"customerServicePlatform" v:"required"` // 客服平台
|
||
InboundCount int `json:"inboundCount"` // 进线数
|
||
ActiveCount int `json:"activeCount"` // 开口数
|
||
ServedCount int `json:"servedCount"` // 接待数
|
||
ContactCardSentCount int `json:"contactCardSentCount"` // 发名片数
|
||
NameCardSentCount int `json:"nameCardSentCount"` // 发留资卡数
|
||
LeftContactInfoCount int `json:"leftContactInfoCount"` // 留资数
|
||
ResponseRate30s float64 `json:"responseRate30s"` // 30s响应率
|
||
ResponseRate60s float64 `json:"responseRate60s"` // 60s响应率
|
||
ResponseRate360s float64 `json:"responseRate360s"` // 3分钟响应率
|
||
}
|
||
|
||
type AddDataStatisticsRes struct {
|
||
Id string `json:"id"`
|
||
}
|
||
|
||
// UpdateDataStatisticsReq 更新数据统计
|
||
type UpdateDataStatisticsReq struct {
|
||
g.Meta `path:"/update" method:"post" tags:"数据统计" summary:"更新统计数据" dc:"更新每日统计数据"` // 路由: POST /data/statistics/update
|
||
Id string `json:"id" v:"required"`
|
||
Date string `json:"date" v:"date-format:2006-01-02"`
|
||
AccountName string `json:"accountName"`
|
||
CustomerServiceName string `json:"customerServiceName"`
|
||
CustomerServicePlatform string `json:"customerServicePlatform"`
|
||
InboundCount *int `json:"inboundCount"`
|
||
ActiveCount *int `json:"activeCount"`
|
||
ServedCount *int `json:"servedCount"`
|
||
ContactCardSentCount *int `json:"contactCardSentCount"`
|
||
NameCardSentCount *int `json:"nameCardSentCount"`
|
||
LeftContactInfoCount *int `json:"leftContactInfoCount"`
|
||
ResponseRate30s *float64 `json:"responseRate30s"`
|
||
ResponseRate60s *float64 `json:"responseRate60s"`
|
||
ResponseRate360s *float64 `json:"responseRate360s"`
|
||
}
|
||
|
||
// ListDataStatisticsReq 获取数据统计列表
|
||
type ListDataStatisticsReq struct {
|
||
g.Meta `path:"/list" method:"get" tags:"数据统计" summary:"获取统计列表" dc:"分页查询统计数据,支持按平台、日期范围筛选"` // 路由: GET /data/statistics/list
|
||
beans.Page
|
||
// 同时写json和p ,同时支持get的 query解析和post的json解析
|
||
CustomerServicePlatform string `json:"customerServicePlatform" p:"customerServicePlatform" dc:"筛选:客服平台"` // 筛选:客服平台
|
||
StartDate string `json:"startDate" p:"startDate" dc:"筛选:开始日期(YYYY-MM-DD)"` // 筛选:开始日期
|
||
EndDate string `json:"endDate" p:"endDate" dc:"筛选:结束日期(YYYY-MM-DD)"` // 筛选:结束日期
|
||
}
|
||
|
||
type ListDataStatisticsRes struct {
|
||
List []*entity.DataStatistics `json:"list"`
|
||
Total int `json:"total"`
|
||
}
|
||
|
||
// ExportDataStatisticsReq 导出请求复用列表请求(忽略分页参数)
|
||
type ExportDataStatisticsReq struct {
|
||
g.Meta `path:"/export" method:"get" tags:"数据统计" summary:"导出统计数据" dc:"导出数据统计为ZIP文件(包含TXT)"` // 路由: GET /data/statistics/export
|
||
// 同时写json和p,同时支持get的query解析和post的json解析
|
||
CustomerServicePlatform string `json:"customerServicePlatform" p:"customerServicePlatform" dc:"筛选:客服平台"` // 筛选:客服平台
|
||
StartDate string `json:"startDate" p:"startDate" dc:"筛选:开始日期(YYYY-MM-DD)"` // 筛选:开始日期
|
||
EndDate string `json:"endDate" p:"endDate" dc:"筛选:结束日期(YYYY-MM-DD)"` // 筛选:结束日期
|
||
}
|