Commit 62d93839 authored by chenweijian's avatar chenweijian

1v1游戏

parent ab72f7bd
...@@ -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)
} }
......
...@@ -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.TenMicNumType, MicNumType: micNumType,
TouristMic: 1, TouristMic: 1,
TouristSendMsg: 1, TouristSendMsg: 1,
TouristSendPic: 1, TouristSendPic: 1,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment