This commit is contained in:
邹宗楠
2022-11-11 17:23:01 +08:00
parent 0c4c9a7f84
commit 8d172ad781
4 changed files with 7935 additions and 72 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -346,3 +346,37 @@ func Test11111(t *testing.T) {
fmt.Println(randNumber)
}
}
func TestGetProductUpdateRule(t *testing.T) {
keys := make(map[int64]bool, 0)
data, _ := a.GetShopCategory(0)
for _, v1 := range data {
if len(v1.Children) > 0 {
for _, v2 := range v1.Children {
if len(v2.Children) > 0 {
for _, v3 := range v2.Children {
if len(v3.Children) > 0 {
for _, v4 := range v3.Children {
if v4.Enable {
keys[v4.Id] = a.GetProductUpdateRule(v4.Id)
}
}
}
keys[v3.Id] = a.GetProductUpdateRule(v3.Id)
}
}
keys[v2.Id] = a.GetProductUpdateRule(v2.Id)
}
}
keys[v1.Id] = a.GetProductUpdateRule(v1.Id)
}
globals.SugarLogger.Debugf("====%d", len(keys))
globals.SugarLogger.Debugf("====%s", utils.Format4Output(keys, false))
}
func TestCcccc(t *testing.T) {
v, ok := CategoryIsSupplyDayReturnRule[20008]
if ok {
fmt.Println(v)
}
}