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
cb5ce456
Commit
cb5ce456
authored
Mar 20, 2023
by
hujiebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:
parent
64b173dd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
2 deletions
+26
-2
user.go
cv/user_cv/user.go
+26
-2
No files found.
cv/user_cv/user.go
View file @
cb5ce456
...
...
@@ -732,6 +732,28 @@ func GetUserDetail(model *domain.Model, userId mysql.ID, myUserId mysql.ID) (*Cv
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
})
groupPowerUsers
,
err
:=
groupPower_m
.
MGetGroupPowerUsers
(
model
,
[]
mysql
.
ID
{
groupPowerId
})
var
memberMax
int
grade
:=
groupPowerGrades
[
groupPowerId
]
.
Grade
if
grade
>=
groupPower_e
.
GroupPowerGrade0
&&
grade
<=
groupPower_e
.
GroupPowerGradeMax
{
if
grade
==
groupPower_e
.
GroupPowerGrade0
{
memberMax
=
300
}
if
grade
==
groupPower_e
.
GroupPowerGrade1
{
memberMax
=
500
}
if
grade
==
groupPower_e
.
GroupPowerGrade2
{
memberMax
=
800
}
if
grade
==
groupPower_e
.
GroupPowerGrade3
{
memberMax
=
1200
}
}
memberNum
:=
len
(
groupPowerUsers
[
groupPowerId
])
if
memberNum
>
memberMax
{
memberMax
=
memberNum
}
groupPowerMembers
:=
[
2
]
int
{
memberNum
,
memberMax
}
// 0->memberNum 1->memberLimit
up
:=
user_m
.
UserProperty
{}
rides
,
err
:=
up
.
BatchGet
(
mysql
.
Db
,
[]
uint64
{
userId
})
...
...
@@ -821,14 +843,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
],
groupPowerInfos
[
groupPowerId
]
.
Nameplate
,
groupPowerGrades
[
groupPowerId
],
activityUserScore
.
Grade
,
medals
[
userId
],
medalInfo
[
userId
],
rooms
[
userId
],
powers
[
userId
],
powerNames
[
userId
],
groupPowerInfos
[
groupPowerId
]
.
Nameplate
,
groupPowerGrades
[
groupPowerId
],
groupPowerMembers
,
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
,
powerNameplate
string
,
grade
groupPower_m
.
GroupPowerGrade
,
noble
*
noble_m
.
UserNoble
,
isOfficialStaff
bool
,
medals
[]
uint32
,
medalInfo
[]
medal_cv
.
CvMedal
,
room
string
,
power
uint64
,
powerName
string
,
powerNameplate
string
,
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
)
{
room
,
err
:=
group_m
.
ToTxGroupId
(
model
,
room
)
...
...
@@ -873,6 +895,8 @@ func userToDetailOne(model *domain.Model, user *user_m.User, myUserId mysql.ID,
Name
:
powerName
,
Nameplate
:
powerNameplate
,
Grade
:
grade
.
Grade
,
MemberNum
:
mysql
.
Num
(
members
[
0
]),
MemberMax
:
mysql
.
Num
(
members
[
1
]),
},
PhoneInfo
:
phoneInfo
,
ThirdList
:
thirdList
,
...
...
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