fix: 补齐渠道全量合计筛选导出及有效端目标遗漏

This commit is contained in:
Yvan
2026-11-05 10:57:06 +08:00
parent 297a892518
commit 1aa15d3dc8
22 changed files with 545 additions and 88 deletions
+11
View File
@@ -16,6 +16,17 @@ func (h *Analytics) Channels(c *gin.Context) {
Fail(c, "统计查询参数不正确")
return
}
if req.Export {
data, err := h.service.Export(c.Request.Context(), &req)
if err != nil {
Fail(c, errors.FromError(err).Message)
return
}
c.Header("Content-Disposition", "attachment; filename=channel-statistics.xlsx")
c.Header("success", "true")
c.Data(200, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", data)
return
}
data, err := h.service.Channels(c.Request.Context(), &req)
if err != nil {
Fail(c, errors.FromError(err).Message)