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
0411e76f
Commit
0411e76f
authored
Mar 16, 2023
by
hujiebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:移动一下增加用户天上麦时长位置
parent
796e14c7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
event_init.go
domain/service/event_s/event_init.go
+15
-1
group_mic.go
domain/service/group_mic_s/group_mic.go
+0
-5
No files found.
domain/service/event_s/event_init.go
View file @
0411e76f
...
...
@@ -17,6 +17,7 @@ import (
"hilo-group/domain/model/diamond_m"
"hilo-group/domain/model/groupPower_m"
"hilo-group/domain/model/group_m"
"hilo-group/domain/model/mic_m"
"hilo-group/domain/model/msg_m"
"hilo-group/domain/model/task_m"
"hilo-group/domain/model/user_m"
...
...
@@ -521,5 +522,18 @@ func OnMic() {
}
return
nil
})
// 用户上麦时长
mic_ev
.
AddOnMicEventAsync
(
func
(
model
*
domain
.
Model
,
e
interface
{})
error
{
event
,
ok
:=
e
.
(
*
mic_ev
.
OnMicEvent
)
if
!
ok
{
model
.
Log
.
Errorf
(
"AddOnMicEventSync event type err"
)
return
nil
}
if
err
:=
mic_m
.
IncrUserOnMic
(
model
,
event
.
UserId
,
event
.
Timestamp
);
err
!=
nil
{
model
.
Log
.
Errorf
(
"cron micIn IncrUserOnMic err:%v"
,
err
)
}
else
{
model
.
Log
.
Infof
(
"cron micIn IncrUserOnMic success,userId:%v"
,
event
.
UserId
)
}
return
nil
})
}
domain/service/group_mic_s/group_mic.go
View file @
0411e76f
...
...
@@ -12,7 +12,6 @@ import (
"hilo-group/domain/event/group_ev"
"hilo-group/domain/model/groupPower_m"
"hilo-group/domain/model/group_m"
"hilo-group/domain/model/mic_m"
"hilo-group/domain/service/signal_s"
"hilo-group/myerr"
"hilo-group/myerr/bizerr"
...
...
@@ -323,9 +322,5 @@ func (s *GroupMicService) IncrGroupPowerOnMicExpAndTime(groupId string, userId u
if
err
:=
groupPower_m
.
IncrGroupPowerStarOnMic
(
model
,
groupPowerId
,
userId
,
joinMicTimestamp
);
err
!=
nil
{
model
.
Log
.
Errorf
(
"IncrGroupPowerOnMicTime fail:%v"
,
err
)
}
// 增加用户天上麦时长
if
err
:=
mic_m
.
IncrUserOnMic
(
model
,
userId
,
joinMicTimestamp
);
err
!=
nil
{
model
.
Log
.
Errorf
(
"IncrUserOnMic fail:%v"
,
err
)
}
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