Commit Graph
32 Commits
Author SHA1 Message Date
zhangwenjian 8ffde94433 chore🔧: move to go-admin-core v2
Every import of the module changes, not only the seven packages that
moved out of sdk/pkg: Go requires the major version in the path from v2
on. Both happen in one pass —

    go run github.com/go-admin-team/go-admin-core/tools/coreupgrade@v2.0.0 -w -v2 .
    go mod tidy

— which is the command the release notes give, run here as a consumer
would run it. 210 imports across 95 files.

The compatibility shims this used are gone in v2, so the paths that
moved had to move: sdk/pkg/captcha, sdk/pkg/jwtauth and its user
package, sdk/pkg/response and sdk/pkg/casbin.

The count of unformatted files is unchanged at 34, none of them touched
by this: the tool reformats a file only if it was already gofmt clean,
so a migration cannot disappear into whitespace.
2026-08-23 13:26:46 +08:00
zhangwenjian 88bab51056 fix🐛: stop hand-writing the soft-delete condition, and check the count
Two things in front of the unique-index work, both safe on their own.

getSysMenuByRoleName carried "deleted_at is null" in its where clause.
GORM adds that condition itself for a model with a DeletedAt field, so
it was a duplicate — and one phrased as a column being null, which stops
being true the moment the column stops being nullable. A schema that
moves to a non-null delete marker would have turned this query into one
that matches nothing, silently, for admin users only.

SysDictType.Insert dropped the error from its duplicate check: a query
that failed left the count at zero and the insert went ahead as though
the name were free.

The test pins what the removed clause was there for. Its counter-proof
is Unscoped rather than deleting the field — taking ModelTime off the
model fails to compile, which proves nothing.
2026-08-22 11:11:03 +08:00
zhanluxianshen 2d76430f89 clean err define in methods.
Signed-off-by: zhanluxianshen <zhanluxianshen@163.com>
2024-07-10 15:03:33 +08:00
zhangwenjian 42f3025217 fix🐛: Fix the problem that api saving fails when creating a new menu 2022-11-03 14:00:48 +08:00
zhaodongdong c004b3d333 fix🐛:e.Log.Errorf("db error:%s", err)输出的err没有被赋值 2022-09-14 17:42:09 +08:00
zhangzhenlun 096663ac91 fix🐛: fix rolemenu 2022-08-09 14:26:43 +08:00
wenjianzhang 7e571b038f fix🐛: fix rolemenu 2022-08-09 10:18:21 +08:00
zhangwenjian 86187e4c79 fix🐛: 修复获取菜单接口menurole,数据不完整 (#676) 2022-08-07 21:49:24 +08:00
zhangwenjian 83b219458f fix🐛: 菜单中paths未设置问题修复 2022-07-29 18:44:22 +08:00
zhangwenjian 5a65fcd477 fix🐛: 修复菜单树 2021-08-10 14:58:04 +08:00
zhangwenjian 41ff26edc8 fix🐛: 修复菜单的目录(#500) 2021-07-23 00:33:00 +08:00
zhangwenjian a45113258c refactor🎨: update request mode name 2021-07-15 00:43:06 +08:00
zhangwenjian dd22d55ee7 refactor🎨: request name cancel 2021-07-14 09:14:44 +08:00
zhangwenjian 1130d20f14 refactor🎨: dto》request 2021-07-05 00:03:38 +08:00
zhangwenjian a0b7d9969a Revert "refactor🎨:注释未使用的对象"
This reverts commit 3358eeb54c.
2021-06-17 11:28:51 +08:00
zhangwenjian 3358eeb54c refactor🎨:注释未使用的对象 2021-06-17 11:28:37 +08:00
zhangwenjian df46f86130 fix🐛: 修复菜单更新是不能更新绑定api的问题 2021-06-13 21:27:14 +08:00
zhangwenjian a8820a0aac refactor🎨: 菜单以及菜单角色模块调整 2021-06-10 11:24:59 +08:00
wenjianzhang 9a2c0729f6 refactor🎨: 缩减函数名称 2021-06-07 20:37:01 +08:00
zhangwenjian 190dcfedc0 refactor🎨: 缩减函数名称 2021-06-07 16:39:26 +08:00
zhangwenjian f5d9a22f83 perf👌 调整菜单代码结构 2021-05-31 23:37:04 +08:00
wenjianzhang 765775c54d Merge branch 'dev' of github.com:go-admin-team/go-admin into dev 2021-05-20 23:00:49 +08:00
wenjianzhang 44545f3d5b feat 结构统一调整 2021-05-20 22:59:09 +08:00
linwenxiang e23a1f615f feat 优化logger使用 2021-05-19 19:31:04 +08:00
wenjianzhang b2345039e4 refactor🎨 移除设置log函数 2021-05-16 21:47:49 +08:00
zhangwenjian 33275573f9 refactor🎨 链式调用改造 2021-05-16 16:17:37 +08:00
wenjianzhang dfd460c50b feat apis路径简化 2021-05-14 12:19:22 +08:00
linwenxiang 25d8364bf4 修改,兼容go-admin sdk方案 2021-03-09 19:12:49 +08:00
linwenxiang 21a81a534c 部分bug修复 2021-03-07 15:37:14 +08:00
linwenxiang e2952fa393 调整整体架构写法
调整db用法
调整日志用法
调整模版
2021-03-04 23:45:16 +08:00
wenjianzhang 792c8874aa perf👌 : 岗位、角色功能改造 2021-01-16 21:46:57 +08:00
zhangwenjian 8a3659d949 perf👌 : 部门和菜单功能改造 2021-01-16 15:05:12 +08:00