fix: 优化经销商筛选逻辑并更新黑名单
This commit is contained in:
parent
4e804a4c52
commit
90e89d927e
|
|
@ -39,6 +39,8 @@ var ResellerBlackListProduct = []string{
|
|||
"蓝星严选连续包月",
|
||||
"通钱-2025年12月",
|
||||
"彦浩同行",
|
||||
"运营部测试专用",
|
||||
"彦浩直客商户",
|
||||
}
|
||||
|
||||
type BbxtTools struct {
|
||||
|
|
@ -222,15 +224,19 @@ func (b *BbxtTools) StatisOursProductLossSum(ctx context.Context, now time.Time,
|
|||
)
|
||||
// 构建分组
|
||||
for _, v := range resellers {
|
||||
if v.Total <= -100 && !slices.Contains(ResellerBlackListProduct, v.ResellerName) {
|
||||
if slices.Contains(ResellerBlackListProduct, v.ResellerName) {
|
||||
continue
|
||||
}
|
||||
if v.Total <= -100 {
|
||||
total = append(total, []string{
|
||||
fmt.Sprintf("%s", v.ResellerName),
|
||||
fmt.Sprintf("%.2f", v.Total),
|
||||
})
|
||||
num := decimal.NewFromFloat(v.Total)
|
||||
totalSum = totalSum.Add(num).Round(2)
|
||||
|
||||
totalDetail = append(totalDetail, v)
|
||||
}
|
||||
num := decimal.NewFromFloat(v.Total)
|
||||
totalSum = totalSum.Add(num).Round(2)
|
||||
//if v.Total <= -500 && !slices.Contains(ResellerBlackListProduct, v.ResellerName) {
|
||||
// gt = append(gt, v)
|
||||
// totalSum500 += v.Total
|
||||
|
|
|
|||
Loading…
Reference in New Issue