zhangwenjian
82ea8539eb
chore 🔧 : upgrade go-admin-core and route the queue through configuration
...
The pinned core dated from April, before sdk stopped being a separate module,
so the build resolved sdk packages from the old module and core packages from
the new one. Dropping the separate requirement is what makes the two agree
again.
Most of the diff is renames that came with that: the tenant accessors gained a
ByTenant suffix, GetDb now returns one database and GetAllDb the map, and
casbin moved to v3.
The change that matters is four call sites moving from GetMemoryQueue to
GetQueuePrefix. GetMemoryQueue returns a queue fixed at construction, so the
login log, the operate log and the api check ran in process no matter what the
settings file selected — a second instance saw none of it. GetQueuePrefix
returns whatever the configuration built, which is the point of being able to
configure a queue at all.
Verified against core at main: build and vet clean. The two file_store failures
are unchanged from before this branch; they need cloud credentials.
2026-08-18 22:14:08 +08:00
zhangwenjian
b81611ba72
chore 🔧 : 清理 refresh_token 的残留权限数据
...
接口移除后,库中仍留有三类记录:sys_api 的接口登记、sys_menu_api_rule 的
菜单绑定、casbin_rule 的策略。留着会让「接口管理」列出一个不存在的端点,
角色配置里也仍可勾选。
- 新装:从 db.sql 与 db-sqlserver.sql 的种子数据中删除该接口
- 已有部署:新增迁移清理,按 path 匹配而非固定 id,因为执行过
`server -a` 重新注册接口的库中 id 会与官方种子数据不同
2026-08-14 21:42:59 +08:00
zhangwenjian
ed9450a2d5
feat ✨ : 补充 demo 模块的菜单与权限种子数据
...
一个业务模块要在界面上可用,需要四类数据协同:
sys_api 后端路由登记,Casbin 据此判定
sys_menu 侧边栏菜单,含目录 M、菜单 C、按钮 F 三级
sys_menu_api_rule 菜单与接口的关联,角色保存时据此生成策略
casbin_rule 实际生效的权限策略
菜单的 menu_name 与前端组件 name 保持一致(DemoProduct),按钮的
permission 与前端 v-permisaction 标识一致(demo:product:add 等)。
策略写入 casbin_rule 而非 sys_casbin_rule:后者对应的 models.CasbinRule
是历史遗留,其 7 列 size:512 唯一索引在 MySQL 下会超出索引长度限制,实际
生效的是 adapter 创建的 casbin_rule 表。
所有写入均为存在则更新、不存在则插入,迁移可安全地在已有数据的库上执行。
实测:在含 67 条菜单、121 条接口的库上执行后各表数据正确;清除版本记录重
跑一次,各表行数不变,确认幂等。
2026-08-14 16:57:55 +08:00
zhangwenjian
4d7c9e5a12
feat ✨ : 补充 demo 模块的建表迁移
...
放在 version/ 而非 version-local/:后者已被 .gitignore 忽略,是留给使用
者存放自身迁移脚本的位置,示例迁移需随框架一起分发。文件注释中说明了这
一区分。
2026-08-14 16:46:53 +08:00
zhangwenjian
d1f5fe5681
feat ✨ : 新增 app/demo 标准 CRUD 参照模块
...
作为编码约定的可执行参照物:文档会滞后,而这个模块过时会导致构建或测试
失败,因此以它为准。
目录骨架与自动注册文件由项目自带的脚手架生成:
go run main.go app -n demo
它同时产出 cmd/api/demo.go,其中的 init() 将路由追加进 AppRouters,
无需在任何中心文件手工登记。
模块本身演示了单表 CRUD 的推荐写法——直接使用 common/actions 提供的五个
通用 Action,因此只有 model、dto、router 三个业务文件,没有 apis 与
service。手写 Handler 的场景仅在业务超出单表 CRUD 时才需要。
DTO 中详情/删除入参内嵌 dto.ObjectById 以复用其 Bind 与 GetId,不重复
实现 uri 绑定与批量 ids 合并逻辑。
补充 8 项测试锁定通用 Action 的接口约束,其中最关键的是 Generate() 必须
返回副本——Action 在并发请求间复用实例,就地返回会串数据。反向验证:将
Generate 改为就地返回,测试立即失败。
2026-08-14 16:46:09 +08:00
wenjianzhang
a5cc0a9e29
Add read and write timeout to HTTP server
2025-09-10 09:39:54 +08:00
wenjianzhang
76411f80bc
refactor 🎨 : 优化日志记录方式,统一使用 log.Info 替代 log.Println
2025-04-08 20:30:35 +08:00
wenjianzhang
d366df372d
feat ✨ : Log file size control and retention days control
2023-11-03 18:59:20 +08:00
wenjianzhang
7281d05efc
fix 🐛 : Fixed system startup Network output problem
2023-11-03 17:42:01 +08:00
wenjianzhang
9ff094b6f5
fix 🐛 : Fixed data migration issue during multi-tenant configuration
2023-11-03 17:36:04 +08:00
wenjianzhang
37a5963cd6
perf 👌 : Optimize go warnings
2023-08-01 22:38:41 +08:00
wwhai
c48f70a7c6
fix: change 'os.Signal' channel to buffered
2023-05-04 23:25:43 +08:00
wenjianzhang
7d1b84e837
Merge pull request #706 from haimait/master-test
...
1. 修复日志创建时间筛选报错的bug.
2022-09-05 19:58:06 +08:00
wanghaima
0f742900f5
1. 修复日志创建时间筛选报错的bug.
...
2. 修复日志里操作人,修改人,userAgent为空的bug.
3. 迁移表时,日志表添加字段注释.
4. sys_opera_log表oper_param字段类型改为text,解决字段长度报错的问题
2022-09-04 10:02:26 +08:00
quanbisen
e6f4fac859
修复优雅重启不生效
2022-08-31 18:14:33 +08:00
NaturalGao
1f8babd9e7
fix: fix sys_router && add swag commond
2022-08-25 01:19:55 +08:00
infnan
0993173b1f
处理postgre启动报错问题
...
Signed-off-by: infnan <38274826+infnan@users.noreply.github.com >
2022-08-18 16:50:54 +08:00
zhangwenjian
7655d0fd38
fix 🐛 : Repair document address ( #692 )
2022-08-18 06:57:02 +08:00
zhangwenjian
869394c898
perf 👌 : Remove caspin table from data migration
2022-08-09 18:21:00 +08:00
zhangwenjian
289fbba8e0
perf 👌 : update casbin gorm adapter
2022-08-09 18:17:06 +08:00
zhangwenjian
a6ffac657e
fix 🐛 : Add MySQL judgment in data migration
2022-08-09 15:20:45 +08:00
zhangwenjian
56968c0bd2
Merge remote-tracking branch 'origin/master'
2022-08-08 18:03:04 +08:00
zhangwenjian
ef6b85faec
config 🔧 : Modify the instruction createapp to app
2022-08-08 18:02:50 +08:00
zhangwenjian
0d47fb4e68
Merge branch 'master' of github.com:go-admin-team/go-admin
2022-08-08 16:28:34 +08:00
zhangwenjian
8bfee8af16
refactor 🎨 : 添加菜单paths默认数据
2022-08-08 16:28:26 +08:00
Vingurzhou
9a596397ca
Update 1599190683659_tables.go
2022-08-08 11:28:55 +08:00
zhangwenjian
1bea64bb6d
config 🔧 : set DB CHARSET utf8mb4( #674 )
2022-08-08 10:16:43 +08:00
zhangwenjian
09bfdc3d39
config 🔧 : set DB CHARSET utf8mb4
2022-08-08 10:15:29 +08:00
wenjianzhang
50f14f7658
Merge branch 'dev' into wkf928592-patch-1
2022-06-05 10:36:20 +08:00
kaiyuan
eb33515e29
throw error if migrate failed
2022-04-08 10:32:07 +08:00
wenjianzhang
d02b52f383
feat ✨ : 添加sqlserver支持
2022-02-08 18:41:09 +08:00
zhangwenjian
24908a8732
refactor 🎨 : 添加error判断返回
2022-01-22 23:03:01 +08:00
wenjianzhang
0b73bd7b25
refactor 🎨 : 修改sqplite的支持
2022-01-22 19:37:56 +08:00
wenjianzhang
443c30d48c
Update 1599190683659_tables.go
2021-10-22 12:05:39 +08:00
wkf928592
ce9d9bd3ec
fix:在32位系统中做迁移时,版本号作为整型处理会造成内存溢出的问题
...
修改版本号作为字符串处理
2021-09-10 10:19:33 +08:00
Vincent
cee6bd6abd
fix:修复createapp未初始化导致无法创建app的问题
2021-07-15 10:21:26 +08:00
zhangwenjian
57d128144d
feat ✨ : Add the createapp command
2021-07-14 11:48:40 +08:00
zhangwenjian
b6be297a1e
refactor 🎨 : 添加默认demo代码生成表
2021-07-04 13:43:32 +08:00
zhangwenjian
862f24d8a7
refactor 🎨 : 移除服务管理
2021-06-30 01:52:47 +08:00
wenjianzhang
e2cb033670
refactor 🎨 : 增加server manager,提升服务启动流程规范
...
feature ✨ 增加server manager,提升服务启动流程规范
2021-06-29 16:58:50 +08:00
zhangwenjian
a6116ede02
refactor 🎨 : 修改字典类型status为int
2021-06-20 00:39:43 +08:00
zhangwenjian
b97b3bc6d8
refactor 🎨 :部门创建添加事务,已经修改status字段为int类型
2021-06-20 00:14:45 +08:00
zhangwenjian
25472887c9
refactor 🎨 :移除内容管理、行政区管理和资源管理
2021-06-18 21:34:57 +08:00
zhangwenjian
493d714723
refactor 🎨 :修改行政区数据sql
2021-06-17 21:46:19 +08:00
zhangwenjian
a911e73238
refactor 🎨 :调整行政区命名
2021-06-17 21:45:37 +08:00
zhangwenjian
185df737c8
refactor 🎨 :调整管理员和字典相关结构体字段顺序
2021-06-17 21:10:12 +08:00
linwenxiang
7e9919e3ae
feature ✨ 增加server manager,提升服务启动流程规范
2021-06-16 10:13:26 +08:00
wenjianzhang
13f09d6059
refactor 🎨 :数据迁移结构体重命名
2021-06-15 19:02:57 +08:00
wenjianzhang
1c9d2075d7
refactor 🎨 :调整接口和行政区结构体
2021-06-15 17:54:46 +08:00
wenjianzhang
3a688c06a1
refactor 🎨 :初始化脚本针对关键字添加引号
2021-06-15 17:54:04 +08:00