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
62d93839
Commit
62d93839
authored
Aug 07, 2023
by
chenweijian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1v1游戏
parent
ab72f7bd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
create_group.go
cron/group_cron/create_group.go
+2
-1
group_op.go
domain/service/group_s/group_op.go
+2
-2
No files found.
cron/group_cron/create_group.go
View file @
62d93839
...
@@ -4,6 +4,7 @@ import (
...
@@ -4,6 +4,7 @@ import (
"git.hilo.cn/hilo-common/domain"
"git.hilo.cn/hilo-common/domain"
"git.hilo.cn/hilo-common/resource/config"
"git.hilo.cn/hilo-common/resource/config"
"github.com/robfig/cron"
"github.com/robfig/cron"
"hilo-group/_const/enum/group_e"
"hilo-group/domain/service/group_s"
"hilo-group/domain/service/group_s"
)
)
...
@@ -19,7 +20,7 @@ func CreateGroup() {
...
@@ -19,7 +20,7 @@ func CreateGroup() {
if
config
.
AppIsRelease
()
{
if
config
.
AppIsRelease
()
{
userId
=
41
userId
=
41
}
}
err
:=
group_s
.
NewGroupService
(
model
.
MyContext
)
.
CreateGroupMulByUid
(
userId
,
10
)
err
:=
group_s
.
NewGroupService
(
model
.
MyContext
)
.
CreateGroupMulByUid
(
userId
,
10
,
group_e
.
TwoMicNumType
)
if
err
!=
nil
{
if
err
!=
nil
{
model
.
Log
.
Errorf
(
"CreateGroupMulByUid fail:%v"
,
err
)
model
.
Log
.
Errorf
(
"CreateGroupMulByUid fail:%v"
,
err
)
}
}
...
...
domain/service/group_s/group_op.go
View file @
62d93839
...
@@ -514,7 +514,7 @@ func dealActDataAfterEnterRoom(myContext *mycontext.MyContext, userId, rideId ui
...
@@ -514,7 +514,7 @@ func dealActDataAfterEnterRoom(myContext *mycontext.MyContext, userId, rideId ui
}
}
// 创建房间,慎用
// 创建房间,慎用
func
(
s
*
GroupService
)
CreateGroupMulByUid
(
userId
uint64
,
num
int
)
error
{
func
(
s
*
GroupService
)
CreateGroupMulByUid
(
userId
uint64
,
num
int
,
micNumType
group_e
.
GroupMicNumType
)
error
{
model
:=
domain
.
CreateModel
(
s
.
svc
.
CtxAndDb
)
model
:=
domain
.
CreateModel
(
s
.
svc
.
CtxAndDb
)
if
lock
:=
redisCli
.
Lock
(
group_k
.
GetGroupLockKey
(
userId
),
time
.
Second
*
5
);
!
lock
{
if
lock
:=
redisCli
.
Lock
(
group_k
.
GetGroupLockKey
(
userId
),
time
.
Second
*
5
);
!
lock
{
...
@@ -603,7 +603,7 @@ func (s *GroupService) CreateGroupMulByUid(userId uint64, num int) error {
...
@@ -603,7 +603,7 @@ func (s *GroupService) CreateGroupMulByUid(userId uint64, num int) error {
ChannelId
:
channelId
,
ChannelId
:
channelId
,
MicOn
:
true
,
MicOn
:
true
,
LoadHistory
:
false
,
LoadHistory
:
false
,
MicNumType
:
group_e
.
TenM
icNumType
,
MicNumType
:
m
icNumType
,
TouristMic
:
1
,
TouristMic
:
1
,
TouristSendMsg
:
1
,
TouristSendMsg
:
1
,
TouristSendPic
:
1
,
TouristSendPic
:
1
,
...
...
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