fix: 更新经销商黑名单数据处理逻辑
This commit is contained in:
parent
895e6ecfbd
commit
aed04af9cd
|
|
@ -29,6 +29,14 @@ var resellerBlackList = []string{
|
||||||
"通钱-2025年12月",
|
"通钱-2025年12月",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var resellerBlackListProduct = []string{
|
||||||
|
"悦跑",
|
||||||
|
"电商-独立",
|
||||||
|
"蓝星严选连续包月",
|
||||||
|
"通钱-2025年12月",
|
||||||
|
"彦浩同行",
|
||||||
|
}
|
||||||
|
|
||||||
type BbxtTools struct {
|
type BbxtTools struct {
|
||||||
cacheDir string
|
cacheDir string
|
||||||
excelTempDir string
|
excelTempDir string
|
||||||
|
|
@ -149,14 +157,14 @@ func (b *BbxtTools) StatisOursProductLossSum(now time.Time) (report []*ReportRes
|
||||||
)
|
)
|
||||||
// 构建分组
|
// 构建分组
|
||||||
for _, v := range resellers {
|
for _, v := range resellers {
|
||||||
if v.Total <= -100 && !slices.Contains(resellerBlackList, v.ResellerName) {
|
if v.Total <= -100 && !slices.Contains(resellerBlackListProduct, v.ResellerName) {
|
||||||
total = append(total, []string{
|
total = append(total, []string{
|
||||||
fmt.Sprintf("%s", v.ResellerName),
|
fmt.Sprintf("%s", v.ResellerName),
|
||||||
fmt.Sprintf("%.2f", v.Total),
|
fmt.Sprintf("%.2f", v.Total),
|
||||||
})
|
})
|
||||||
totalSum += v.Total
|
totalSum += v.Total
|
||||||
}
|
}
|
||||||
if v.Total <= -500 && !slices.Contains(resellerBlackList, v.ResellerName) {
|
if v.Total <= -500 && !slices.Contains(resellerBlackListProduct, v.ResellerName) {
|
||||||
gt = append(gt, v)
|
gt = append(gt, v)
|
||||||
totalSum500 += v.Total
|
totalSum500 += v.Total
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue