From ecd2490a243c5ce042f60b612ecbdd72057a9ff7 Mon Sep 17 00:00:00 2001 From: renzhiyuan <465386466@qq.com> Date: Fri, 16 Jan 2026 09:15:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/biz/group_config.go | 5 +++++ internal/tools/bbxt/bbxt.go | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/biz/group_config.go b/internal/biz/group_config.go index 4b25bb3..8987119 100644 --- a/internal/biz/group_config.go +++ b/internal/biz/group_config.go @@ -452,6 +452,11 @@ func (g *GroupConfigBiz) GetReportCache(ctx context.Context, day time.Time, tota v.Manager = ResellerProductRelation[v.ResellerId].AfterSaleName for _, vv := range v.ProductLoss { if _, ex := ResellerProductRelation[v.ResellerId].Products[vv.ProductId]; !ex { + vv.LossReason = "未填写" + continue + } + if len(ResellerProductRelation[v.ResellerId].Products[vv.ProductId].LossReason) == 0 { + vv.LossReason = "未填写" continue } vv.LossReason = ResellerProductRelation[v.ResellerId].Products[vv.ProductId].LossReason diff --git a/internal/tools/bbxt/bbxt.go b/internal/tools/bbxt/bbxt.go index de1e638..9f20182 100644 --- a/internal/tools/bbxt/bbxt.go +++ b/internal/tools/bbxt/bbxt.go @@ -263,7 +263,7 @@ func (b *BbxtTools) GetResellerLossMannagerAndLossReasonFromApi(ctx context.Cont for _, product := range v.ProductLoss { relationMap[v.ResellerId].Products[product.ProductId] = &LossReason{ ProductName: product.ProductName, - LossReason: "未填写", // 初始化为未填写 + LossReason: "", // 初始化为未填写 } } }