From 2edea5f0fbc51b633f51cf1ca67f0785866b3ede Mon Sep 17 00:00:00 2001 From: wuchao <1272174216@qq.com> Date: Wed, 24 Sep 2025 11:03:20 +0800 Subject: [PATCH] =?UTF-8?q?feat(statistics):=E9=87=8D=E6=9E=84=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E7=BB=9F=E8=AE=A1=E6=95=B0=E6=8D=AE=E7=BB=93=E6=9E=84?= =?UTF-8?q?=E4=BB=A5=E6=94=AF=E6=8C=81=E5=A4=9A=E6=97=B6=E9=97=B4=E8=8C=83?= =?UTF-8?q?=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改 ZltxOrderStatisticsResponse 结构体以包含最近三天和最近一个月的数据 - 为不同时间范围的统计数据创建嵌套结构体 -保持原有字段如 code 和 error 不变 - 更新数据序列化格式以适应新的嵌套结构 - 确保与现有 API 响应格式向后兼容 --- internal/tools/zltx_statistics.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/internal/tools/zltx_statistics.go b/internal/tools/zltx_statistics.go index 1956b9a..9cedc12 100644 --- a/internal/tools/zltx_statistics.go +++ b/internal/tools/zltx_statistics.go @@ -58,9 +58,12 @@ func (z ZltxOrderStatisticsTool) Execute(channel chan entitys.ResponseData, c *w } type ZltxOrderStatisticsResponse struct { - Code int `json:"code"` - Data []ZltxOrderStatisticsData `json:"data"` - Error string `json:"error"` + Code int `json:"code"` + Data struct { + RecentThreeDays []ZltxOrderStatisticsData `json:"recentThreeDays"` + RecentOneMonth []ZltxOrderStatisticsData `json:"recentOneMonth"` + } `json:"data"` + Error string `json:"error"` } type ZltxOrderStatisticsData struct {