注销
Build docker and publish / build (20.15.1) (push) Successful in 7m34s

This commit is contained in:
2026-03-17 07:12:42 -07:00
parent 3cd22d8538
commit dcdbabdb13
15 changed files with 195 additions and 51 deletions
@@ -82,7 +82,7 @@ func (l *GetFamilyDetailLogic) GetFamilyDetail(req *types.GetFamilyDetailRequest
memberItem := types.FamilyMemberItem{
UserId: member.UserId,
Identifier: identifier,
DeviceNo: deviceNoMap[member.UserId],
DeviceID: deviceNoMap[member.UserId],
Role: member.Role,
RoleName: mapFamilyRoleName(member.Role),
Status: member.Status,
@@ -37,7 +37,7 @@ func (l *GetUserDetailLogic) GetUserDetail(req *types.GetDetailRequest) (*types.
tool.DeepCopy(&resp, userInfo)
for i, d := range userInfo.UserDevices {
if i < len(resp.UserDevices) {
resp.UserDevices[i].DeviceNo = tool.DeviceIdToHash(d.Id)
resp.UserDevices[i].DeviceID = tool.DeviceIdToHash(d.Id)
}
}
if referCode := strings.TrimSpace(resp.ReferCode); referCode != "" {
@@ -163,10 +163,10 @@ func (l *GetUserListLogic) GetUserList(req *types.GetUserListRequest) (*types.Ge
}
u.AuthMethods = authMethods
// 填充 DeviceNo
// 填充 DeviceID
for i, d := range item.UserDevices {
if i < len(u.UserDevices) {
u.UserDevices[i].DeviceNo = tool.DeviceIdToHash(d.Id)
u.UserDevices[i].DeviceID = tool.DeviceIdToHash(d.Id)
}
}
@@ -36,7 +36,7 @@ func (l *GetUserSubscribeDevicesLogic) GetUserSubscribeDevices(req *types.GetUse
tool.DeepCopy(&userRespList, list)
for i, d := range list {
if i < len(userRespList) {
userRespList[i].DeviceNo = tool.DeviceIdToHash(d.Id)
userRespList[i].DeviceID = tool.DeviceIdToHash(d.Id)
}
}
return &types.GetUserSubscribeDevicesResponse{
+5 -1
View File
@@ -89,7 +89,11 @@ func (l *SendEmailCodeLogic) SendEmailCode(req *types.SendCodeRequest) (resp *ty
// Generate verification code
code := random.Key(6, 0)
scene := constant.ParseVerifyType(req.Type).String()
taskPayload.Type = queue.EmailTypeVerify
if scene == constant.DeleteAccount.String() {
taskPayload.Type = queue.EmailTypeDeleteAccount
} else {
taskPayload.Type = queue.EmailTypeVerify
}
taskPayload.Scene = scene
taskPayload.Email = req.Email
taskPayload.Subject = "Verification code"
@@ -38,7 +38,7 @@ func (l *GetDeviceListLogic) GetDeviceList() (resp *types.GetDeviceListResponse,
tool.DeepCopy(&userRespList, list)
for i, d := range list {
if i < len(userRespList) {
userRespList[i].DeviceNo = tool.DeviceIdToHash(d.Id)
userRespList[i].DeviceID = tool.DeviceIdToHash(d.Id)
}
}
resp = &types.GetDeviceListResponse{
@@ -47,7 +47,7 @@ func (l *QueryUserInfoLogic) QueryUserInfo() (resp *types.User, err error) {
tool.DeepCopy(resp, u)
for i, d := range u.UserDevices {
if i < len(resp.UserDevices) {
resp.UserDevices[i].DeviceNo = tool.DeviceIdToHash(d.Id)
resp.UserDevices[i].DeviceID = tool.DeviceIdToHash(d.Id)
}
}
// refer_code 为空时自动生成