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
ed24d79a
Commit
ed24d79a
authored
Jun 15, 2023
by
hujiebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update rank.go
parent
ba988e4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
rank.go
route/cp_r/rank.go
+11
-7
No files found.
route/cp_r/rank.go
View file @
ed24d79a
...
@@ -245,13 +245,17 @@ func CpMy(c *gin.Context) (*mycontext.MyContext, error) {
...
@@ -245,13 +245,17 @@ func CpMy(c *gin.Context) (*mycontext.MyContext, error) {
func
CpAchievement
(
c
*
gin
.
Context
)
(
*
mycontext
.
MyContext
,
error
)
{
func
CpAchievement
(
c
*
gin
.
Context
)
(
*
mycontext
.
MyContext
,
error
)
{
myCtx
:=
mycontext
.
CreateMyContext
(
c
.
Keys
)
myCtx
:=
mycontext
.
CreateMyContext
(
c
.
Keys
)
model
:=
domain
.
CreateModelContext
(
myCtx
)
model
:=
domain
.
CreateModelContext
(
myCtx
)
_
,
lang
,
err
:=
req
.
GetUserIdLang
(
c
,
myCtx
)
if
err
!=
nil
{
return
myCtx
,
err
}
var
response
=
make
([]
cp_cv
.
CvCpAchievement
,
0
)
var
response
=
make
([]
cp_cv
.
CvCpAchievement
,
0
)
TypeDescMap
:=
map
[
cp_e
.
CpAchievement
]
string
{
// todo 翻译
TypeDescMap
:=
map
[
cp_e
.
CpAchievement
]
uint
{
cp_e
.
CpAchievementLevel
:
"等级分值最高"
,
cp_e
.
CpAchievementLevel
:
280
,
//
"等级分值最高",
cp_e
.
CpAchievementVisitors
:
"空间访问量最高"
,
cp_e
.
CpAchievementVisitors
:
281
,
//
"空间访问量最高",
cp_e
.
CpAchievementMonthRank
:
"月榜最高"
,
cp_e
.
CpAchievementMonthRank
:
282
,
//
"月榜最高",
cp_e
.
CpAchievementWeekRank
:
"周榜最高"
,
cp_e
.
CpAchievementWeekRank
:
283
,
//
"周榜最高",
cp_e
.
CpAchievementDayRank
:
"天榜最高"
,
cp_e
.
CpAchievementDayRank
:
284
,
//
"天榜最高",
}
}
achievements
:=
cp_m
.
GetCpAchievements
(
model
)
achievements
:=
cp_m
.
GetCpAchievements
(
model
)
var
userIds
[]
uint64
var
userIds
[]
uint64
...
@@ -269,7 +273,7 @@ func CpAchievement(c *gin.Context) (*mycontext.MyContext, error) {
...
@@ -269,7 +273,7 @@ func CpAchievement(c *gin.Context) (*mycontext.MyContext, error) {
User1
:
user_cv
.
UserToTiny
(
users
[
a
.
UserId1
]),
User1
:
user_cv
.
UserToTiny
(
users
[
a
.
UserId1
]),
User2
:
user_cv
.
UserToTiny
(
users
[
a
.
UserId2
]),
User2
:
user_cv
.
UserToTiny
(
users
[
a
.
UserId2
]),
Type
:
a
.
Type
,
Type
:
a
.
Type
,
TypeDesc
:
TypeDescMap
[
a
.
Type
]
,
TypeDesc
:
cp_m
.
GetTranslate
(
TypeDescMap
[
a
.
Type
],
lang
)
,
Score
:
a
.
Score
,
Score
:
a
.
Score
,
TimeUnix
:
a
.
UpdatedTime
.
Unix
(),
TimeUnix
:
a
.
UpdatedTime
.
Unix
(),
})
})
...
...
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