deviceno
All checks were successful
Build docker and publish / build (20.15.1) (push) Successful in 7m26s
All checks were successful
Build docker and publish / build (20.15.1) (push) Successful in 7m26s
This commit is contained in:
parent
4b528184ea
commit
282e1e4087
@ -82,7 +82,7 @@ func (l *GetFamilyDetailLogic) GetFamilyDetail(req *types.GetFamilyDetailRequest
|
|||||||
memberItem := types.FamilyMemberItem{
|
memberItem := types.FamilyMemberItem{
|
||||||
UserId: member.UserId,
|
UserId: member.UserId,
|
||||||
Identifier: identifier,
|
Identifier: identifier,
|
||||||
DeviceID: deviceNoMap[member.UserId],
|
DeviceNo : deviceNoMap[member.UserId],
|
||||||
Role: member.Role,
|
Role: member.Role,
|
||||||
RoleName: mapFamilyRoleName(member.Role),
|
RoleName: mapFamilyRoleName(member.Role),
|
||||||
Status: member.Status,
|
Status: member.Status,
|
||||||
|
|||||||
@ -37,7 +37,7 @@ func (l *GetUserDetailLogic) GetUserDetail(req *types.GetDetailRequest) (*types.
|
|||||||
tool.DeepCopy(&resp, userInfo)
|
tool.DeepCopy(&resp, userInfo)
|
||||||
for i, d := range userInfo.UserDevices {
|
for i, d := range userInfo.UserDevices {
|
||||||
if i < len(resp.UserDevices) {
|
if i < len(resp.UserDevices) {
|
||||||
resp.UserDevices[i].DeviceID = tool.DeviceIdToHash(d.Id)
|
resp.UserDevices[i].DeviceNo = tool.DeviceIdToHash(d.Id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if referCode := strings.TrimSpace(resp.ReferCode); referCode != "" {
|
if referCode := strings.TrimSpace(resp.ReferCode); referCode != "" {
|
||||||
|
|||||||
@ -166,7 +166,7 @@ func (l *GetUserListLogic) GetUserList(req *types.GetUserListRequest) (*types.Ge
|
|||||||
// 填充 DeviceID
|
// 填充 DeviceID
|
||||||
for i, d := range item.UserDevices {
|
for i, d := range item.UserDevices {
|
||||||
if i < len(u.UserDevices) {
|
if i < len(u.UserDevices) {
|
||||||
u.UserDevices[i].DeviceID = tool.DeviceIdToHash(d.Id)
|
u.UserDevices[i].DeviceNo = tool.DeviceIdToHash(d.Id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,7 @@ func (l *GetUserSubscribeDevicesLogic) GetUserSubscribeDevices(req *types.GetUse
|
|||||||
tool.DeepCopy(&userRespList, list)
|
tool.DeepCopy(&userRespList, list)
|
||||||
for i, d := range list {
|
for i, d := range list {
|
||||||
if i < len(userRespList) {
|
if i < len(userRespList) {
|
||||||
userRespList[i].DeviceID = tool.DeviceIdToHash(d.Id)
|
userRespList[i].DeviceNo = tool.DeviceIdToHash(d.Id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return &types.GetUserSubscribeDevicesResponse{
|
return &types.GetUserSubscribeDevicesResponse{
|
||||||
|
|||||||
@ -38,7 +38,7 @@ func (l *GetDeviceListLogic) GetDeviceList() (resp *types.GetDeviceListResponse,
|
|||||||
tool.DeepCopy(&userRespList, list)
|
tool.DeepCopy(&userRespList, list)
|
||||||
for i, d := range list {
|
for i, d := range list {
|
||||||
if i < len(userRespList) {
|
if i < len(userRespList) {
|
||||||
userRespList[i].DeviceID = tool.DeviceIdToHash(d.Id)
|
userRespList[i].DeviceNo = tool.DeviceIdToHash(d.Id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
resp = &types.GetDeviceListResponse{
|
resp = &types.GetDeviceListResponse{
|
||||||
|
|||||||
@ -47,7 +47,7 @@ func (l *QueryUserInfoLogic) QueryUserInfo() (resp *types.User, err error) {
|
|||||||
tool.DeepCopy(resp, u)
|
tool.DeepCopy(resp, u)
|
||||||
for i, d := range u.UserDevices {
|
for i, d := range u.UserDevices {
|
||||||
if i < len(resp.UserDevices) {
|
if i < len(resp.UserDevices) {
|
||||||
resp.UserDevices[i].DeviceID = tool.DeviceIdToHash(d.Id)
|
resp.UserDevices[i].DeviceNo = tool.DeviceIdToHash(d.Id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// refer_code 为空时自动生成
|
// refer_code 为空时自动生成
|
||||||
|
|||||||
@ -682,7 +682,7 @@ type FamilyDetail struct {
|
|||||||
type FamilyMemberItem struct {
|
type FamilyMemberItem struct {
|
||||||
UserId int64 `json:"user_id"`
|
UserId int64 `json:"user_id"`
|
||||||
Identifier string `json:"identifier"`
|
Identifier string `json:"identifier"`
|
||||||
DeviceID string `json:"device_id"`
|
DeviceNo string `json:"device_no"`
|
||||||
Role uint8 `json:"role"`
|
Role uint8 `json:"role"`
|
||||||
RoleName string `json:"role_name"`
|
RoleName string `json:"role_name"`
|
||||||
Status uint8 `json:"status"`
|
Status uint8 `json:"status"`
|
||||||
@ -2957,7 +2957,7 @@ type UserDevice struct {
|
|||||||
Id int64 `json:"id"`
|
Id int64 `json:"id"`
|
||||||
Ip string `json:"ip"`
|
Ip string `json:"ip"`
|
||||||
Identifier string `json:"identifier"`
|
Identifier string `json:"identifier"`
|
||||||
DeviceID string `json:"device_id"`
|
DeviceNo string `json:"device_no"`
|
||||||
UserAgent string `json:"user_agent"`
|
UserAgent string `json:"user_agent"`
|
||||||
Online bool `json:"online"`
|
Online bool `json:"online"`
|
||||||
Enabled bool `json:"enabled"`
|
Enabled bool `json:"enabled"`
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user