feat: 增加分销商黑名单
This commit is contained in:
parent
2d725ecd53
commit
06606539d2
|
|
@ -5,6 +5,7 @@ import (
|
||||||
"ai_scheduler/pkg"
|
"ai_scheduler/pkg"
|
||||||
"fmt"
|
"fmt"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
|
"slices"
|
||||||
|
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
|
|
@ -16,6 +17,13 @@ const (
|
||||||
GreenStyle = "${color: 00B050;horizontal:center;vertical:center;borderColor:#000000}"
|
GreenStyle = "${color: 00B050;horizontal:center;vertical:center;borderColor:#000000}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var resellerBlackList = []string{
|
||||||
|
"悦跑",
|
||||||
|
"电商-独立",
|
||||||
|
"蓝星严选连续包月",
|
||||||
|
"通钱",
|
||||||
|
}
|
||||||
|
|
||||||
type BbxtTools struct {
|
type BbxtTools struct {
|
||||||
cacheDir string
|
cacheDir string
|
||||||
excelTempDir string
|
excelTempDir string
|
||||||
|
|
@ -138,7 +146,7 @@ func (b *BbxtTools) StatisOursProductLossSum(now time.Time) (report []*ReportRes
|
||||||
fmt.Sprintf("%.2f", v.Total),
|
fmt.Sprintf("%.2f", v.Total),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if v.Total <= -500 {
|
if v.Total <= -500 && !slices.Contains(resellerBlackList, v.ResellerName) {
|
||||||
gt = append(gt, v)
|
gt = append(gt, v)
|
||||||
totalSum500 += v.Total
|
totalSum500 += v.Total
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue