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,