This commit is contained in:
oneao committed 2025-11-11 17:27:41 +08:00
1 parent 994321d049
commit b68a37f40b
7 files changed
+91 -47

No files matched your search

@@ -28,7 +28,9 @@ func InitDefaultCategories(userID int64) error {
fmt.Printf("系统分类数量: %d\n", len(sysCategories))
// 2. 构建批量插入数据
userCategories := make([]mapx.M, 0, len(sysCategories))
//userCategories := make([]mapx.M, 0, len(sysCategories))
userCategories := mapx.NewArr(len(sysCategories))
for i, row := range sysCategories {
m := mapx.New().SetKV(
"id", idgen.NextId(),
@@ -52,6 +54,7 @@ func InitDefaultCategories(userID int64) error {
}
func getUserCategory(c *router.Context) error {
fmt.Println("请求进入了====")
userId := c.GetUserID()
// 查询当前用户的分类