From 4e974efc1c254206969e045b0abde294ad1845db Mon Sep 17 00:00:00 2001 From: renzhiyuan <465386466@qq.com> Date: Wed, 31 Dec 2025 17:36:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4=E9=94=80=E5=94=AE?= =?UTF-8?q?=E5=88=86=E6=9E=90=E4=B8=8E=E6=8E=92=E8=A1=8C=E6=A6=9C=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/biz/ding_talk_bot.go | 8 ++++---- internal/tools/bbxt/bbxt.go | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/biz/ding_talk_bot.go b/internal/biz/ding_talk_bot.go index 0475021..2fccd07 100644 --- a/internal/biz/ding_talk_bot.go +++ b/internal/biz/ding_talk_bot.go @@ -516,15 +516,15 @@ func (d *DingTalkBotBiz) handleReport(ctx context.Context, rec *entitys.Recogniz } reports = append(reports, repo...) case "report_sales_analysis": - - repo, _err := rep.GetProfitRankingSum(t) + product := strings.Split(group.ProductName, ",") + repo, _err := rep.GetStatisOfficialProductSum(t, product) if _err != nil { return _err } reports = append(reports, repo) + case "report_ranking_of_distributors": - product := strings.Split(group.ProductName, ",") - repo, _err := rep.GetStatisOfficialProductSum(t, product) + repo, _err := rep.GetProfitRankingSum(t) if _err != nil { return _err } diff --git a/internal/tools/bbxt/bbxt.go b/internal/tools/bbxt/bbxt.go index 9bc400e..3eea5a7 100644 --- a/internal/tools/bbxt/bbxt.go +++ b/internal/tools/bbxt/bbxt.go @@ -243,7 +243,7 @@ func (b *BbxtTools) GetProfitRankingSum(now time.Time) (report *ReportRes, err e }, err } -// GetStatisOfficialProductSum 利润同比分销商排行榜 +// GetStatisOfficialProductSum 销量同比分析 func (b *BbxtTools) GetStatisOfficialProductSum(now time.Time, productName []string) (report *ReportRes, err error) { ct := []string{ @@ -302,7 +302,7 @@ func (b *BbxtTools) GetStatisOfficialProductSum(now time.Time, productName []str filePath := b.cacheDir + "/xstb_ana" + fmt.Sprintf("%d", time.Now().Unix()) + ".xlsx" err = b.SimpleFillExcelWithTitle(b.excelTempDir+"/"+"xstb_ana.xlsx", filePath, total, title) return &ReportRes{ - ReportName: "利润同比分销商排行榜", + ReportName: "销售同比分析", Title: title, Path: filePath, Data: total,