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
0500449b
Commit
0500449b
authored
Aug 28, 2023
by
iamhujiebin
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
bf30a995
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
8 deletions
+4
-8
country.go
domain/cache/res_c/country.go
+2
-2
mic.go
domain/model/group_m/mic.go
+2
-6
No files found.
domain/cache/res_c/country.go
View file @
0500449b
...
@@ -18,7 +18,7 @@ func GetCountryIconMap(model *domain.Model) (map[string]string, error) {
...
@@ -18,7 +18,7 @@ func GetCountryIconMap(model *domain.Model) (map[string]string, error) {
if
len
(
m
)
<=
0
{
if
len
(
m
)
<=
0
{
return
map
[
string
]
string
{},
nil
return
map
[
string
]
string
{},
nil
}
}
SaveAllCountryIcon
(
model
,
m
)
//
SaveAllCountryIcon(model, m)
}
}
return
m
,
nil
return
m
,
nil
}
}
...
@@ -47,7 +47,7 @@ func GetCountryAreaMap(model *domain.Model) (map[string]string, error) {
...
@@ -47,7 +47,7 @@ func GetCountryAreaMap(model *domain.Model) (map[string]string, error) {
if
len
(
m
)
<=
0
{
if
len
(
m
)
<=
0
{
return
map
[
string
]
string
{},
nil
return
map
[
string
]
string
{},
nil
}
}
SaveAllCountryArea
(
model
,
m
)
//
SaveAllCountryArea(model, m)
}
}
return
m
,
nil
return
m
,
nil
}
}
...
...
domain/model/group_m/mic.go
View file @
0500449b
...
@@ -876,6 +876,8 @@ var micGroupNumCache = gcache.New(10000).LRU().Build()
...
@@ -876,6 +876,8 @@ var micGroupNumCache = gcache.New(10000).LRU().Build()
// 获取麦上有人的群组&&麦上的人数
// 获取麦上有人的群组&&麦上的人数
// 带lru缓存,1min
// 带lru缓存,1min
func
GetMicHasInGroupNum
(
model
*
domain
.
Model
)
(
map
[
string
]
int64
,
error
)
{
func
GetMicHasInGroupNum
(
model
*
domain
.
Model
)
(
map
[
string
]
int64
,
error
)
{
m
:=
make
(
map
[
string
]
int64
)
return
m
,
nil
// get from cache
// get from cache
if
data
,
err
:=
micGroupNumCache
.
Get
(
micGroupNumKey
);
err
==
nil
{
if
data
,
err
:=
micGroupNumCache
.
Get
(
micGroupNumKey
);
err
==
nil
{
//model.Log.Infof("GetMicHasInGroupNum cache hit:%v", data)
//model.Log.Infof("GetMicHasInGroupNum cache hit:%v", data)
...
@@ -891,12 +893,6 @@ func GetMicHasInGroupNum(model *domain.Model) (map[string]int64, error) {
...
@@ -891,12 +893,6 @@ func GetMicHasInGroupNum(model *domain.Model) (map[string]int64, error) {
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
myerr
.
WrapErr
(
err
)
return
nil
,
myerr
.
WrapErr
(
err
)
}
}
// todo 临时处理
m
:=
make
(
map
[
string
]
int64
)
for
_
,
v
:=
range
groupUuids
{
m
[
v
]
=
10
}
return
m
,
nil
//
//
resultGroupUuids
:=
make
(
map
[
string
]
int64
,
len
(
groupUuids
))
resultGroupUuids
:=
make
(
map
[
string
]
int64
,
len
(
groupUuids
))
//循环lua判断是否, 最后的保证,(猜想:真正麦上有人的群没有很多)
//循环lua判断是否, 最后的保证,(猜想:真正麦上有人的群没有很多)
...
...
hujiebin
@hujiebin
mentioned in commit
5a04f6b5
·
Aug 27, 2023
mentioned in commit
5a04f6b5
mentioned in commit 5a04f6b5d7831f3a461721947e3d5907e85c1097
Toggle commit list
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