-
Notifications
You must be signed in to change notification settings - Fork 257
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
检查清单
- 已经在 GitHub Issues 中搜索过该问题
是什么版本出现了此问题?
v1.1.1
使用的什么数据库?
MySQL 8.x
使用的哪种方式部署?
Docker
在线站点地址
发生了什么?
我使用docker进行部署,后台存储尝试使用了mysql8.1和5.7都会出现这个问题,新增一个菜单后,进行拖拽改变顺序会报错update menu failed:
相关日志输出
2023-10-10T15:44:10.528+0800 INFO impl/menu.go:36 [2.258ms] [rows:0] UPDATE `menu` SET `team`='',`priority`=0,`name`='首页',`url`='/',`target`='_self',`icon`='',`parent_id`=0 WHERE `menu`.`id` = 1
2023-10-10T15:44:10.529+0800 ERROR handler/server.go:229 handler error {"error": "update menu failed", "errorVerbose": "update menu failed\ngithub.com/go-sonic/sonic/util/xerr.ErrorType.New\n\tgithub.com/go-sonic/sonic/util/xerr/error.go:41\ngithub.com/go-sonic/sonic/service/impl.(*menuServiceImpl).UpdateBatch.func1\n\tgithub.com/go-sonic/sonic/service/impl/menu.go:49\ngithub.com/go-sonic/sonic/dal.(*Query).Transaction.func1\n\tgithub.com/go-sonic/sonic/dal/gen.go:210\ngorm.io/gorm.(*DB).Transaction\n\tgorm.io/gorm@v1.25.1/finisher_api.go:660\ngithub.com/go-sonic/sonic/dal.(*Query).Transaction\n\tgithub.com/go-sonic/sonic/dal/gen.go:210\ngithub.com/go-sonic/sonic/service/impl.(*menuServiceImpl).UpdateBatch\n\tgithub.com/go-sonic/sonic/service/impl/menu.go:32\ngithub.com/go-sonic/sonic/handler/admin.(*MenuHandler).UpdateMenuBatch\n\tgithub.com/go-sonic/sonic/handler/admin/menu.go:164\ngithub.com/go-sonic/sonic/handler.(*Server).wrapHandler.func1\n\tgithub.com/go-sonic/sonic/handler/server.go:227\ngithub.com/gin-gonic/gin.(*Context).Next\n\tgithub.com/gin-gonic/gin@v1.8.2/context.go:173\ngithub.com/go-sonic/sonic/handler/middleware.(*InstallRedirectMiddleware).InstallRedirect.func1\n\tgithub.com/go-sonic/sonic/handler/middleware/install.go:43\ngithub.com/gin-gonic/gin.(*Context).Next\n\tgithub.com/gin-gonic/gin@v1.8.2/context.go:173\ngithub.com/go-sonic/sonic/handler/middleware.(*RecoveryMiddleware).RecoveryWithLogger.func1\n\tgithub.com/go-sonic/sonic/handler/middleware/recovery.go:62\ngithub.com/gin-gonic/gin.(*Context).Next\n\tgithub.com/gin-gonic/gin@v1.8.2/context.go:173\ngithub.com/go-sonic/sonic/handler/middleware.(*GinLoggerMiddleware).LoggerWithConfig.func1\n\tgithub.com/go-sonic/sonic/handler/middleware/log.go:50\ngithub.com/gin-gonic/gin.(*Context).Next\n\tgithub.com/gin-gonic/gin@v1.8.2/context.go:173\ngithub.com/gin-gonic/gin.(*Engine).handleHTTPRequest\n\tgithub.com/gin-gonic/gin@v1.8.2/gin.go:616\ngithub.com/gin-gonic/gin.(*Engine).ServeHTTP\n\tgithub.com/gin-gonic/gin@v1.8.2/gin.go:572\nnet/http.serverHandler.ServeHTTP\n\tnet/http/server.go:2947\nnet/http.(*conn).serve\n\tnet/http/server.go:1991\nruntime.goexit\n\truntime/asm_amd64.s:1594\n\nupdate menu failed\n"}
2023-10-10T15:44:10.530+0800 INFO [GIN] {"beginTime": "2023-10-10T15:44:10.516+0800", "status": 500, "latency": 0.013991632, "clientIP": "149.88.70.180", "method": "PUT", "path": "/api/admin/menus/batch"}
2023-10-10T15:44:11.142+0800 INFO impl/user.go:175 [0.959ms] [rows:1] SELECT * FROM `user` WHERE `user`.`id` = 1 LIMIT 1
2023-10-10T15:44:11.144+0800 INFO impl/menu.go:102 [1.228ms] [rows:6] SELECT * FROM `menu` ORDER BY `menu`.`priority`
附加信息
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working