Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hilo-group
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujiebin
hilo-group
Commits
1f15d4a0
Commit
1f15d4a0
authored
Mar 20, 2023
by
hujiebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
groupPowerInfos[user.ID].Icon
parent
ffb7acdc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
user.go
cv/user_cv/user.go
+6
-3
No files found.
cv/user_cv/user.go
View file @
1f15d4a0
...
@@ -71,6 +71,7 @@ type CvUserDetail struct {
...
@@ -71,6 +71,7 @@ type CvUserDetail struct {
type
GroupPower
struct
{
type
GroupPower
struct
{
Id
uint64
`json:"id"`
// 群主所在的势力ID
Id
uint64
`json:"id"`
// 群主所在的势力ID
Icon
string
`json:"icon"`
// 家族头像
Name
string
`json:"name"`
// 群主所在的势力的名称
Name
string
`json:"name"`
// 群主所在的势力的名称
Nameplate
string
`json:"nameplate"`
// 势力铭牌
Nameplate
string
`json:"nameplate"`
// 势力铭牌
Grade
groupPower_e
.
GroupPowerGrade
`json:"grade"`
// 等级
Grade
groupPower_e
.
GroupPowerGrade
`json:"grade"`
// 等级
...
@@ -564,6 +565,7 @@ func userToDetail(user *user_m.User, myUserId mysql.ID, userTradeUnion *user_m.U
...
@@ -564,6 +565,7 @@ func userToDetail(user *user_m.User, myUserId mysql.ID, userTradeUnion *user_m.U
cvUserDetail
.
MyGroupPowerName
=
powerNames
[
user
.
ID
]
cvUserDetail
.
MyGroupPowerName
=
powerNames
[
user
.
ID
]
cvUserDetail
.
GroupPower
=
GroupPower
{
cvUserDetail
.
GroupPower
=
GroupPower
{
Id
:
groupPowerInfos
[
user
.
ID
]
.
ID
,
Id
:
groupPowerInfos
[
user
.
ID
]
.
ID
,
Icon
:
groupPowerInfos
[
user
.
ID
]
.
Icon
,
Name
:
groupPowerInfos
[
user
.
ID
]
.
Name
,
Name
:
groupPowerInfos
[
user
.
ID
]
.
Name
,
Nameplate
:
groupPowerInfos
[
user
.
ID
]
.
Nameplate
,
Nameplate
:
groupPowerInfos
[
user
.
ID
]
.
Nameplate
,
Grade
:
powerGrades
[
user
.
ID
]
.
Grade
,
Grade
:
powerGrades
[
user
.
ID
]
.
Grade
,
...
@@ -843,14 +845,14 @@ func GetUserDetail(model *domain.Model, userId mysql.ID, myUserId mysql.ID) (*Cv
...
@@ -843,14 +845,14 @@ func GetUserDetail(model *domain.Model, userId mysql.ID, myUserId mysql.ID) (*Cv
return
userToDetailOne
(
model
,
&
user
,
myUserId
,
userTradeUnion
,
likeN
>
0
,
likeMe
>
0
,
return
userToDetailOne
(
model
,
&
user
,
myUserId
,
userTradeUnion
,
likeN
>
0
,
likeMe
>
0
,
rel
,
isVip
,
expireTime
,
svip
,
headwear
,
ride
,
wealthUserScore
.
Grade
,
charmUserScore
.
Grade
,
rel
,
isVip
,
expireTime
,
svip
,
headwear
,
ride
,
wealthUserScore
.
Grade
,
charmUserScore
.
Grade
,
activityUserScore
.
Grade
,
medals
[
userId
],
medalInfo
[
userId
],
rooms
[
userId
],
powers
[
userId
],
powerNames
[
userId
],
groupPowerInfos
[
groupPowerId
]
.
Nameplate
,
groupPowerGrades
[
groupPowerId
],
groupPowerMembers
,
activityUserScore
.
Grade
,
medals
[
userId
],
medalInfo
[
userId
],
rooms
[
userId
],
powers
[
userId
],
powerNames
[
userId
],
groupPowerInfos
[
groupPowerId
],
groupPowerGrades
[
groupPowerId
],
groupPowerMembers
,
noble
,
superManagerMap
[
userId
],
myGroups
,
phoneInfo
,
thirdList
,
cvCountryManager
)
noble
,
superManagerMap
[
userId
],
myGroups
,
phoneInfo
,
thirdList
,
cvCountryManager
)
}
}
// 单用户版,简化参数
// 单用户版,简化参数
func
userToDetailOne
(
model
*
domain
.
Model
,
user
*
user_m
.
User
,
myUserId
mysql
.
ID
,
userTradeUnion
*
user_m
.
UserTradeUnion
,
isLike
bool
,
likeMe
bool
,
hvMap
map
[
mysql
.
ID
]
Relation
,
func
userToDetailOne
(
model
*
domain
.
Model
,
user
*
user_m
.
User
,
myUserId
mysql
.
ID
,
userTradeUnion
*
user_m
.
UserTradeUnion
,
isLike
bool
,
likeMe
bool
,
hvMap
map
[
mysql
.
ID
]
Relation
,
isVip
bool
,
vipExpireTime
*
int64
,
svip
rpc
.
CvSvip
,
headwear
*
headwear_cv
.
CvHeadwear
,
ride
property_cv
.
CvProperty
,
wealthGrade
uint32
,
charmGrade
uint32
,
activityGrade
uint32
,
isVip
bool
,
vipExpireTime
*
int64
,
svip
rpc
.
CvSvip
,
headwear
*
headwear_cv
.
CvHeadwear
,
ride
property_cv
.
CvProperty
,
wealthGrade
uint32
,
charmGrade
uint32
,
activityGrade
uint32
,
medals
[]
uint32
,
medalInfo
[]
medal_cv
.
CvMedal
,
room
string
,
power
uint64
,
powerName
string
,
power
Nameplate
string
,
grade
groupPower_m
.
GroupPowerGrade
,
members
[
2
]
int
,
noble
*
noble_m
.
UserNoble
,
isOfficialStaff
bool
,
medals
[]
uint32
,
medalInfo
[]
medal_cv
.
CvMedal
,
room
string
,
power
uint64
,
powerName
string
,
power
Info
groupPower_m
.
GroupPowerInfo
,
grade
groupPower_m
.
GroupPowerGrade
,
members
[
2
]
int
,
noble
*
noble_m
.
UserNoble
,
isOfficialStaff
bool
,
myGroups
[]
group_m
.
GroupInfo
,
phoneInfo
*
user_m
.
UserPhoneInfo
,
thirdList
[]
int8
,
countryManager
*
country_cv
.
CVCountryManager
)
(
*
CvUserDetail
,
error
)
{
myGroups
[]
group_m
.
GroupInfo
,
phoneInfo
*
user_m
.
UserPhoneInfo
,
thirdList
[]
int8
,
countryManager
*
country_cv
.
CVCountryManager
)
(
*
CvUserDetail
,
error
)
{
room
,
err
:=
group_m
.
ToTxGroupId
(
model
,
room
)
room
,
err
:=
group_m
.
ToTxGroupId
(
model
,
room
)
...
@@ -893,7 +895,8 @@ func userToDetailOne(model *domain.Model, user *user_m.User, myUserId mysql.ID,
...
@@ -893,7 +895,8 @@ func userToDetailOne(model *domain.Model, user *user_m.User, myUserId mysql.ID,
GroupPower
:
GroupPower
{
GroupPower
:
GroupPower
{
Id
:
power
,
Id
:
power
,
Name
:
powerName
,
Name
:
powerName
,
Nameplate
:
powerNameplate
,
Icon
:
powerInfo
.
Icon
,
Nameplate
:
powerInfo
.
Nameplate
,
Grade
:
grade
.
Grade
,
Grade
:
grade
.
Grade
,
MemberNum
:
mysql
.
Num
(
members
[
0
]),
MemberNum
:
mysql
.
Num
(
members
[
0
]),
MemberMax
:
mysql
.
Num
(
members
[
1
]),
MemberMax
:
mysql
.
Num
(
members
[
1
]),
...
...
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