优化快捷回复联想与个人调用统计,数据统计支持自定义日期
/ 按输入码与个人频次建议(最多10条,唯一自动填入),正文关键字联想;统计页可日历选区间并统一中文日历。
This commit is contained in:
@@ -242,13 +242,18 @@ func (h *SessionHandler) Export(c *gin.Context) {
|
||||
}
|
||||
|
||||
// Export 导出统计报告 CSV(KPI + 坐席绩效 + 渠道分布)。
|
||||
// GET /api/statistics/export
|
||||
// GET /api/statistics/export?from=&to= 或 period=
|
||||
func (h *StatisticsHandler) Export(c *gin.Context) {
|
||||
if !requireStatisticsAccess(c) {
|
||||
return
|
||||
}
|
||||
r, err := parseStatsRange(c)
|
||||
if err != nil {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"code": 400, "message": err.Error()})
|
||||
return
|
||||
}
|
||||
tenantID := middleware.GetTenantID(c)
|
||||
sessions, messages, err := loadStatisticsData(tenantID)
|
||||
sessions, messages, err := loadStatisticsData(tenantID, r)
|
||||
if err != nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"code": 500, "message": "导出统计失败"})
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user