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
6d805dfd
Commit
6d805dfd
authored
Mar 16, 2023
by
hujiebin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/family' into feature/3.5
parents
4e1c124a
0411e76f
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 @
6d805dfd
...
...
@@ -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 @
6d805dfd
...
...
@@ -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