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
373f8e64
Commit
373f8e64
authored
Jul 25, 2023
by
hujiebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
txGroupId
parent
dc9bbe6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
mic_change.go
domain/service/event_s/mic_change.go
+9
-9
No files found.
domain/service/event_s/mic_change.go
View file @
373f8e64
...
...
@@ -22,10 +22,10 @@ func GroupInMicChangeEvent() {
})
}
func
MicAllRPush
(
model
*
domain
.
Model
,
txGroupUi
d
string
,
userId
uint64
,
externalId
string
)
error
{
model
.
Log
.
Infof
(
"MicChangeRPush MicAllRPush begin groupUuid:%v, externalId:%v"
,
txGroupUi
d
,
externalId
)
func
MicAllRPush
(
model
*
domain
.
Model
,
imGroupI
d
string
,
userId
uint64
,
externalId
string
)
error
{
model
.
Log
.
Infof
(
"MicChangeRPush MicAllRPush begin groupUuid:%v, externalId:%v"
,
imGroupI
d
,
externalId
)
imGroupId
,
err
:=
group_m
.
ToImGroupId
(
model
,
txGroupUi
d
)
txGroupId
,
err
:=
group_m
.
ToTxGroupId
(
model
,
imGroupI
d
)
if
err
!=
nil
{
model
.
Log
.
Errorf
(
"ToImGroupId fail:%v"
,
err
)
return
err
...
...
@@ -33,13 +33,13 @@ func MicAllRPush(model *domain.Model, txGroupUid string, userId uint64, external
//
micContents
,
err
:=
group_m
.
GetMicAllContent
(
model
,
imGroupId
)
if
err
!=
nil
{
model
.
Log
.
Errorf
(
"MicChangeRPush MicAllRPush getMicAllContent err:%+v, micContents:%v groupUuid:%v, externalId:%v"
,
err
,
micContents
,
txGroup
Ui
d
,
externalId
)
model
.
Log
.
Errorf
(
"MicChangeRPush MicAllRPush getMicAllContent err:%+v, micContents:%v groupUuid:%v, externalId:%v"
,
err
,
micContents
,
txGroup
I
d
,
externalId
)
return
err
}
for
_
,
micContent
:=
range
micContents
{
//麦上是默认值,就不用推
if
micContent
.
Forbid
==
false
&&
micContent
.
User
==
nil
&&
micContent
.
AgoraId
==
0
&&
micContent
.
Lock
==
false
&&
micContent
.
ExternalId
==
""
&&
micContent
.
MicForbid
==
false
{
model
.
Log
.
Infof
(
"MicChangeRPush MicAllRPush default micContent:%v, groupUuid:%v, externalId:%v, micContent:%+v"
,
micContent
,
txGroup
Ui
d
,
externalId
,
micContent
)
model
.
Log
.
Infof
(
"MicChangeRPush MicAllRPush default micContent:%v, groupUuid:%v, externalId:%v, micContent:%+v"
,
micContent
,
txGroup
I
d
,
externalId
,
micContent
)
continue
}
micContentStr
,
err
:=
json
.
Marshal
(
micContent
)
...
...
@@ -62,14 +62,14 @@ func MicAllRPush(model *domain.Model, txGroupUid string, userId uint64, external
MysteryCode
:
v
.
MysteryCode
,
})
}
if
err
:=
rpc
.
SendSocketMicChange
(
seqId
,
userId
,
externalId
,
txGroup
Ui
d
,
uint32
(
micContent
.
I
),
micContent
.
Lock
,
micContent
.
Forbid
,
micContent
.
MicForbid
,
micContent
.
AgoraId
,
if
err
:=
rpc
.
SendSocketMicChange
(
seqId
,
userId
,
externalId
,
txGroup
I
d
,
uint32
(
micContent
.
I
),
micContent
.
Lock
,
micContent
.
Forbid
,
micContent
.
MicForbid
,
micContent
.
AgoraId
,
tmpMicUser
.
Id
,
tmpMicUser
.
ExternalId
,
tmpMicUser
.
Avatar
,
tmpMicUser
.
Nick
,
uint32
(
tmpMicUser
.
Sex
),
tmpMicUser
.
Code
,
tmpMicUser
.
IsVip
,
uint32
(
tmpMicUser
.
NobleLeave
),
tmpMicUser
.
HeadwearPicUrl
,
tmpMicUser
.
HeadwearEffectUrl
,
tmpMicUser
.
HeadwearReverseEffectUrl
,
uint32
(
tmpMicUser
.
SvipLevel
),
tmpMicUser
.
MicEffect
,
tmpMicUser
.
HeadwearIcon
,
svip
);
err
!=
nil
{
model
.
Log
.
Errorf
(
"MicAllRPush err:%+v, groupUuid:%v, externalId:%v, micContent:%+v"
,
err
,
txGroup
Ui
d
,
externalId
,
string
(
micContentStr
))
model
.
Log
.
Errorf
(
"MicAllRPush err:%+v, groupUuid:%v, externalId:%v, micContent:%+v"
,
err
,
txGroup
I
d
,
externalId
,
string
(
micContentStr
))
}
else
{
model
.
Log
.
Infof
(
"MicChangeRPush MicAllRPush Marshal micContent, groupUuid:%v, externalId:%v, micContent:%+v"
,
txGroup
Ui
d
,
externalId
,
string
(
micContentStr
))
model
.
Log
.
Infof
(
"MicChangeRPush MicAllRPush Marshal micContent, groupUuid:%v, externalId:%v, micContent:%+v"
,
txGroup
I
d
,
externalId
,
string
(
micContentStr
))
}
}
model
.
Log
.
Infof
(
"MicAllRPush end groupUuid:%v, externalId:%v"
,
txGroup
Ui
d
,
externalId
)
model
.
Log
.
Infof
(
"MicAllRPush end groupUuid:%v, externalId:%v"
,
txGroup
I
d
,
externalId
)
return
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