This commit is contained in:
2026-08-16 09:02:39 +08:00
parent c554152f4f
commit f7f6db8695
105 changed files with 2535 additions and 948 deletions
+3 -2
View File
@@ -68,8 +68,9 @@ func TestDictionaryImportKeepsHierarchyInOneTransaction(t *testing.T) {
ctx := context.Background()
repo := &dictionaryRepo{data: data}
parentID := uint(10)
dictionary := &biz.Dictionary{Name: "status", Type: "status", Status: true}
details := []*biz.DictionaryDetail{{ID: 10, Label: "parent", Value: "1", Status: true}, {ID: 11, Label: "child", Value: "2", ParentID: &parentID, Status: true}}
active := true
dictionary := &biz.Dictionary{Name: "status", Type: "status", Status: &active}
details := []*biz.DictionaryDetail{{ID: 10, Label: "parent", Value: "1", Status: &active}, {ID: 11, Label: "child", Value: "2", ParentID: &parentID, Status: &active}}
if err := repo.ImportDictionary(ctx, dictionary, details); err != nil {
t.Fatal(err)
}