feat: 为用户设备添加 DeviceNo 字段并实现 ID 混淆,同时在迁移脚本中新增 ID 重建逻辑。
Build docker and publish / build (20.15.1) (push) Has been cancelled

This commit is contained in:
2026-03-15 19:38:37 -07:00
parent 3db14ae472
commit 3d732c0361
9 changed files with 274 additions and 10 deletions
@@ -44,6 +44,11 @@ func (l *QueryUserInfoLogic) QueryUserInfo() (resp *types.User, err error) {
return nil, errors.Wrapf(xerr.NewErrCode(xerr.InvalidAccess), "Invalid Access")
}
tool.DeepCopy(resp, u)
for i, d := range u.UserDevices {
if i < len(resp.UserDevices) {
resp.UserDevices[i].DeviceNo = tool.DeviceIdToHash(d.Id)
}
}
ownerEmailMethod := l.fillFamilyContext(resp, u.Id)
var userMethods []types.UserAuthMethod