Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hilo-user
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
chenweijian
hilo-user
Commits
db812065
Commit
db812065
authored
Jun 15, 2023
by
hujiebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
把level也返回
parent
3684327b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
inner.go
route/user_r/inner.go
+7
-2
No files found.
route/user_r/inner.go
View file @
db812065
...
@@ -242,10 +242,15 @@ func GetUserCpPair(c *gin.Context) (*mycontext.MyContext, error) {
...
@@ -242,10 +242,15 @@ func GetUserCpPair(c *gin.Context) (*mycontext.MyContext, error) {
m
[
uid
]
=
true
m
[
uid
]
=
true
}
}
pairs
:=
cp_m
.
MGetCpRelation
(
model
,
userIds
)
pairs
:=
cp_m
.
MGetCpRelation
(
model
,
userIds
)
var
response
[][
2
]
uint64
var
cpIds
[]
mysql
.
ID
for
_
,
pair
:=
range
pairs
{
cpIds
=
append
(
cpIds
,
pair
.
Id
)
}
levels
:=
cp_m
.
MGetCpLevel
(
model
,
cpIds
)
var
response
[][
3
]
uint64
for
_
,
pair
:=
range
pairs
{
for
_
,
pair
:=
range
pairs
{
if
m
[
pair
.
UserId1
]
&&
m
[
pair
.
UserId2
]
{
if
m
[
pair
.
UserId1
]
&&
m
[
pair
.
UserId2
]
{
response
=
append
(
response
,
[
2
]
mysql
.
ID
{
pair
.
UserId1
,
pair
.
UserId2
})
response
=
append
(
response
,
[
3
]
mysql
.
ID
{
pair
.
UserId1
,
pair
.
UserId2
,
uint64
(
levels
[
pair
.
Id
]
.
Level
)
})
}
}
}
}
resp
.
ResponseOk
(
c
,
response
)
resp
.
ResponseOk
(
c
,
response
)
...
...
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