From d9468fb021b90e7d718567051b045ce66e18b641 Mon Sep 17 00:00:00 2001 From: RIceWqy <1840169763@qq.com> Date: Tue, 19 Dec 2023 20:28:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E7=B1=BB=E5=AE=9E=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/category/Category.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/module/category/Category.go b/module/category/Category.go index 5d26945..3d43075 100644 --- a/module/category/Category.go +++ b/module/category/Category.go @@ -17,5 +17,10 @@ type Category struct { } func (c *Category) AfterQuery(session basedboperat.DbTransactionSession) { + var children []Category + var list basedboperat.List + list.Limit = -1 + session.ListScan(&list, c, &children) + c.Children = children }