Commit Graph
53 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 4911730012 fix🐛: give the natural keys a constraint the database can keep
sys_user.username, sys_role.role_key and sys_dict_type.dict_type had no
unique index. Uniqueness was a SELECT COUNT followed by an INSERT, which
two concurrent requests both pass — and login resolves a username with
First, so which of the two accounts answers is whichever the database
returns.

The index cannot be on the key alone, because a soft-deleted row keeps
occupying the name and a deleted user's username could never be used
again. It has to include the delete marker, and the marker has to be
non-null: two live rows are (alice, NULL) and (alice, NULL), and NULL is
not equal to NULL, so an index over a nullable marker admits both. That
is the worst of the three states — a constraint that reads as protection
and binds nothing — and there is a test that demonstrates it rather than
asserting it.

ModelTime.DeletedAt is milliseconds since the epoch now, zero while the
row is live. Sixteen tables carry it; the migration converts each one,
preserving when each deleted row was deleted, then adds the three
indexes.

Written to be re-runnable rather than transactional, because DDL does not
roll back on MySQL and an operator whose first attempt failed halfway
should have nothing to do but run it again. It refuses before altering
anything if a table already holds duplicates, naming them, rather than
letting the index fail and leaving the operator to guess.

The timestamp conversion happens in Go: turning a timestamp into epoch
milliseconds is spelled differently by every dialect this supports, and
these row counts do not justify four versions of it.
2026-08-22 11:27:22 +08:00
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 3c9ce5b6b0 chore🔧: 升级 x/image 修复 TIFF 解码漏洞 2026-08-10 22:17:28 +08:00
zhangwenjian 7cddef33a2 git🙈: 将 go.sum 纳入版本控制 2026-08-10 20:51:00 +08:00
linwenxiang 2bfd8c51b1 修复sql问题
修改gorm log
2021-03-10 22:19:10 +08:00
linwenxiang db7abdda33 更新sdk依赖 2021-03-10 11:35:19 +08:00
linwenxiang 25d8364bf4 修改,兼容go-admin sdk方案 2021-03-09 19:12:49 +08:00
linwenxiang 75711922b4 调整log代码,兼容zap扩展支持fields 2021-03-05 15:13:36 +08:00
linwenxiang 39dd1ee6f8 兼容casbin2.24.0版本log
迁移脚本编译时不打包
2021-03-05 13:23:21 +08:00
linwenxiang e2952fa393 调整整体架构写法
调整db用法
调整日志用法
调整模版
2021-03-04 23:45:16 +08:00
linwenxiang 78671ae99e 升级核心依赖库 2021-02-25 11:28:37 +08:00
linwenxiang 5ff282c23d feat :添加资源管理中的需要开放的必开接口 2021-02-25 01:32:06 +08:00
linwenxiang 128739f097 优化response结构
优化日志writer
2021-01-20 00:31:52 +08:00
linwenxiang da96902ca4 修改日志输出模式:
单文件,在内容中区分,方便对接各种日志系统
2020-12-20 19:45:04 +08:00
linwenxiang d9347de392 修改工具库目录
更新gorm到最新版
2020-12-10 17:55:33 +08:00
linwenxiang 9731b7baaf 整合三方依赖 2020-12-10 10:45:14 +08:00
linwenxiang 5f873914e0 config重构 2020-12-08 20:28:26 +08:00
linwenxiang 2790abf1ad 修复cache包问题 2020-12-02 21:11:53 +08:00
zhangwenjian 52be3f6153 feat oss 文件上传 2020-11-12 20:18:53 +08:00
zhangwenjian 17b850d0a8 Update go.sum 2020-11-03 15:13:54 +08:00
zhangwenjian 78db91785c Merge branch 'dev' of https://github.com/go-admin-team/go-admin into go-admin-team-dev 2020-11-03 15:13:18 +08:00
zhangwenjian 411b9d3380 config 🔧 修改go.mod版本信息 2020-11-03 15:07:20 +08:00
linwenxiang 7382a44162 go-admin-core依赖1.2.2版本 2020-11-03 11:35:14 +08:00
linwenxiang 4b5b0507e9 增加链路追踪,熟悉的朋友可以将go-admin作为微服务的网关使用😄 2020-10-30 14:52:49 +08:00
linwenxiang ccd76445f2 日志全部改为go-admin-core库日志,去除对其他项目的依赖 2020-10-29 19:22:23 +08:00
linwenxiang da4637d285 logger模块移入go-admin-core仓库,修改log用法暂时折中
fixme:后期要尽快改成统一的log处理方式
2020-10-26 22:37:44 +08:00
linwenxiang 52f42616a2 近期bug修复,迁移go-admin-core库, Fixed #272 Fixed #261 2020-10-21 10:09:47 +08:00
linwenxiang 1e8544f1ce 支持限流,200QPS 2020-10-12 20:15:28 +08:00
linwenxiang a06bd289b3 升级gorm 2020-09-17 21:04:10 +08:00
linwenxiang 6bc3e6c00b 优化模版生成 2020-09-16 22:42:13 +08:00
zhangwenjian b8f8bfd400 Merge branch 'dev' of https://github.com/wenjianzhang/go-admin into dev 2020-09-12 01:08:35 +08:00
zhangwenjian 2d15f91f2e feat:update gen 2020-09-12 01:07:35 +08:00
linwenxiang 317d417824 升级go-admin-core库 2020-09-11 23:03:14 +08:00
zhangwenjian 77499b50cc update:update gen code temp 2020-08-29 16:32:59 +08:00
zhangwenjian 58c7b43759 Merge branch 'dev' of https://github.com/wenjianzhang/go-admin into dev 2020-08-29 15:34:41 +08:00
zhangwenjian ce80857d5f feat:added dto 2020-08-29 15:33:44 +08:00
linwenxiang 8817f02038 修改core仓库名称 2020-08-29 15:15:03 +08:00
linwenxiang 486a77762c 修改通用search语法结构 2020-08-28 21:01:56 +08:00
zhangwenjian 1dffcb7199 Merge branch 'dev' of https://github.com/wenjianzhang/go-admin into dev 2020-08-28 00:06:55 +08:00
zhangwenjian c69a7d9fd9 feat: format reference 2020-08-28 00:02:53 +08:00
linwenxiang 65c4cfd684 支持search 2020-08-27 22:24:32 +08:00
linwenxiang 60c7496f7b gorm升级到v2版本 2020-08-27 11:17:15 +08:00
zhangwenjian 77bfc07826 fix: job nil bug 2020-08-18 00:03:02 +08:00
zhangwenjian 509709f3fb feat: update auto job (#191) 2020-08-12 18:21:04 +08:00
linwenxiang 2b794c03cc 支持缓存+队列,支持驱动:redis、memory 2020-08-10 20:57:17 +08:00
wenjianzhang f3adadd6ef feat:update log 2020-07-24 18:10:25 +08:00
Bo-Yi Wu d3d8e76d03 chore(gin): upgrade to v1.6.3
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-07-13 12:21:42 +08:00
wenjianzhang 8a1614f64d feat:Extraction of configuration parameters 2020-07-06 13:53:15 +08:00
zhangwenjian 0177fb17b7 feat[Https]: added https support (#113) 2020-06-11 23:56:05 +08:00