Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
b31698b9
Commit
b31698b9
authored
Dec 25, 2025
by
shaw
Browse files
fix: 修复账户代理ip编辑保存不生效的bug
parent
eeaff85e
Changes
1
Hide whitespace changes
Inline
Side-by-side
backend/internal/service/admin_service.go
View file @
b31698b9
...
...
@@ -638,6 +638,7 @@ func (s *adminServiceImpl) UpdateAccount(ctx context.Context, id int64, input *U
}
if
input
.
ProxyID
!=
nil
{
account
.
ProxyID
=
input
.
ProxyID
account
.
Proxy
=
nil
// 清除关联对象,防止 GORM Save 时根据 Proxy.ID 覆盖 ProxyID
}
// 只在指针非 nil 时更新 Concurrency(支持设置为 0)
if
input
.
Concurrency
!=
nil
{
...
...
@@ -662,7 +663,8 @@ func (s *adminServiceImpl) UpdateAccount(ctx context.Context, id int64, input *U
}
}
return
account
,
nil
// 重新查询以确保返回完整数据(包括正确的 Proxy 关联对象)
return
s
.
accountRepo
.
GetByID
(
ctx
,
id
)
}
// BulkUpdateAccounts updates multiple accounts in one request.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment