From e9d5d51b378ce5c5bc8ebcdc0cd8d58ff93464c9 Mon Sep 17 00:00:00 2001 From: fengsilin Date: Fri, 5 Jun 2026 17:10:04 +0800 Subject: [PATCH] =?UTF-8?q?fix(sync):=20=E4=BF=AE=E5=A4=8D=20Slave=20?= =?UTF-8?q?=E7=AB=AF=E7=BC=96=E8=BE=91=E5=90=8C=E6=AD=A5=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=97=B6=E8=AF=AF=E6=8A=A5=E4=BD=99=E9=A2=9D=E4=B8=8D=E5=8F=AF?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 前端对同步用户用 SyncedQuota 替代 Quota 展示,但后端比较时 用的是数据库真实 Quota 字段,导致两者不同而触发拦截。 改为比较 SyncedQuota,只有真正修改额度时才拦截。 --- controller/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller/user.go b/controller/user.go index c82118a..002b0c4 100644 --- a/controller/user.go +++ b/controller/user.go @@ -562,7 +562,7 @@ func UpdateUser(c *gin.Context) { common.ApiError(c, err) return } - if originUser.IsSyncedUser() && originUser.Quota != updatedUser.Quota { + if originUser.IsSyncedUser() && originUser.SyncedQuota != updatedUser.Quota { common.ApiErrorI18n(c, i18n.MsgSyncedUserQuotaCannotModify) return }