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
e678d573
Commit
e678d573
authored
Mar 14, 2023
by
hujiebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:nameplate user detail one
parent
3a831553
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
user.go
cv/user_cv/user.go
+13
-5
No files found.
cv/user_cv/user.go
View file @
e678d573
...
...
@@ -698,6 +698,8 @@ func GetUserDetail(model *domain.Model, userId mysql.ID, myUserId mysql.ID) (*Cv
}
powers
:=
map
[
mysql
.
ID
]
uint64
{
userId
:
groupPowerId
}
powerNames
:=
map
[
mysql
.
ID
]
string
{
userId
:
groupPowerName
}
groupPowerInfos
,
err
:=
groupPower_m
.
MGetGroupPowerInfoMap
(
model
,
[]
mysql
.
ID
{
groupPowerId
})
groupPowerGrades
,
err
:=
groupPower_m
.
MGetGroupPowerGrade
(
model
,
[]
mysql
.
ID
{
groupPowerId
})
up
:=
user_m
.
UserProperty
{}
rides
,
err
:=
up
.
BatchGet
(
mysql
.
Db
,
[]
uint64
{
userId
})
...
...
@@ -787,14 +789,14 @@ func GetUserDetail(model *domain.Model, userId mysql.ID, myUserId mysql.ID) (*Cv
return
userToDetailOne
(
model
,
&
user
,
myUserId
,
userTradeUnion
,
likeN
>
0
,
likeMe
>
0
,
rel
,
isVip
,
expireTime
,
svip
,
headwear
,
ride
,
wealthUserScore
.
Grade
,
charmUserScore
.
Grade
,
activityUserScore
.
Grade
,
medals
[
userId
],
medalInfo
[
userId
],
rooms
[
userId
],
powers
[
userId
],
powerNames
[
userId
],
activityUserScore
.
Grade
,
medals
[
userId
],
medalInfo
[
userId
],
rooms
[
userId
],
powers
[
userId
],
powerNames
[
userId
],
groupPowerInfos
[
groupPowerId
]
.
Nameplate
,
groupPowerGrades
[
groupPowerId
],
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
,
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
,
noble
*
noble_m
.
UserNoble
,
isOfficialStaff
bool
,
medals
[]
uint32
,
medalInfo
[]
medal_cv
.
CvMedal
,
room
string
,
power
uint64
,
powerName
string
,
powerNameplate
string
,
grade
groupPower_m
.
GroupPowerGrade
,
noble
*
noble_m
.
UserNoble
,
isOfficialStaff
bool
,
myGroups
[]
group_m
.
GroupInfo
,
phoneInfo
*
user_m
.
UserPhoneInfo
,
thirdList
[]
int8
,
countryManager
*
country_cv
.
CVCountryManager
)
(
*
CvUserDetail
,
error
)
{
room
,
err
:=
group_m
.
ToTxGroupId
(
model
,
room
)
...
...
@@ -834,9 +836,15 @@ func userToDetailOne(model *domain.Model, user *user_m.User, myUserId mysql.ID,
CurrentRoom
:
room
,
MyGroupPower
:
power
,
MyGroupPowerName
:
powerName
,
PhoneInfo
:
phoneInfo
,
ThirdList
:
thirdList
,
CountryManager
:
countryManager
,
GroupPower
:
GroupPower
{
Id
:
power
,
Name
:
powerName
,
Nameplate
:
powerNameplate
,
Grade
:
grade
.
Grade
,
},
PhoneInfo
:
phoneInfo
,
ThirdList
:
thirdList
,
CountryManager
:
countryManager
,
}
if
noble
!=
nil
{
cvUserDetail
.
Noble
=
noble_cv
.
CvNoble
{
...
...
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