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
12397b2d
Commit
12397b2d
authored
Sep 03, 2023
by
iamhujiebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:SyncGroupRoomLiving功成身退
parent
8c36debc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
24 deletions
+0
-24
router.go
route/router.go
+0
-24
No files found.
route/router.go
View file @
12397b2d
...
@@ -5,11 +5,9 @@ import (
...
@@ -5,11 +5,9 @@ import (
"git.hilo.cn/hilo-common/domain"
"git.hilo.cn/hilo-common/domain"
"git.hilo.cn/hilo-common/mycontext"
"git.hilo.cn/hilo-common/mycontext"
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin"
"github.com/go-redis/redis/v8"
ginSwagger
"github.com/swaggo/gin-swagger"
ginSwagger
"github.com/swaggo/gin-swagger"
"github.com/swaggo/gin-swagger/swaggerFiles"
"github.com/swaggo/gin-swagger/swaggerFiles"
"hilo-user/_const/enum/msg_e"
"hilo-user/_const/enum/msg_e"
"hilo-user/_const/redis_key/group_k"
_
"hilo-user/docs"
_
"hilo-user/docs"
"hilo-user/domain/model/msg_m"
"hilo-user/domain/model/msg_m"
"hilo-user/resp"
"hilo-user/resp"
...
@@ -90,7 +88,6 @@ func InitRouter() *gin.Engine {
...
@@ -90,7 +88,6 @@ func InitRouter() *gin.Engine {
innerProp
.
POST
(
"/ride/send"
,
wrapper
(
user_r
.
SendUserRide
))
// 下发座驾
innerProp
.
POST
(
"/ride/send"
,
wrapper
(
user_r
.
SendUserRide
))
// 下发座驾
}
}
r
.
GET
(
"/test"
,
wrapper
(
Test
))
r
.
GET
(
"/test"
,
wrapper
(
Test
))
r
.
GET
(
"/sync/group_room_living"
,
wrapper
(
SyncGroupRoomLiving
))
return
r
return
r
}
}
...
@@ -106,24 +103,3 @@ func Test(c *gin.Context) (*mycontext.MyContext, error) {
...
@@ -106,24 +103,3 @@ func Test(c *gin.Context) (*mycontext.MyContext, error) {
resp
.
ResponseOk
(
c
,
struct
{}{})
resp
.
ResponseOk
(
c
,
struct
{}{})
return
myCtx
,
nil
return
myCtx
,
nil
}
}
func
SyncGroupRoomLiving
(
c
*
gin
.
Context
)
(
*
mycontext
.
MyContext
,
error
)
{
myCtx
:=
mycontext
.
CreateMyContext
(
c
.
Keys
)
var
model
=
domain
.
CreateModelContext
(
myCtx
)
key
:=
group_k
.
GetPrefixGroupRoomLiving
()
res
,
err
:=
model
.
Redis
.
ZRangeWithScores
(
model
,
key
,
0
,
-
1
)
.
Result
()
if
err
!=
nil
{
return
myCtx
,
err
}
for
_
,
v
:=
range
res
{
err
:=
model
.
RedisCluster
.
ZAdd
(
model
,
key
,
&
redis
.
Z
{
Score
:
v
.
Score
,
Member
:
v
.
Member
,
})
.
Err
()
if
err
!=
nil
{
return
myCtx
,
err
}
}
resp
.
ResponseOk
(
c
,
struct
{}{})
return
myCtx
,
nil
}
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