diff --git a/domain/service/group_s/group_op.go b/domain/service/group_s/group_op.go index 30732b8f00b74fa85223ada1f5580bb78bba5edf..45ae38998a75dfa4fafc724fe99e75e4be51240b 100644 --- a/domain/service/group_s/group_op.go +++ b/domain/service/group_s/group_op.go @@ -27,6 +27,7 @@ import ( "hilo-group/domain/model/noble_m" "hilo-group/domain/model/res_m" "hilo-group/domain/model/user_m" + "hilo-group/domain/service/group_mic_s" "hilo-group/domain/service/signal_s" "hilo-group/myerr" "hilo-group/myerr/bizerr" @@ -418,7 +419,8 @@ func (s *GroupService) RemoveZombie(model *domain.Model, groupId string) (string //离开房间 func (s *GroupService) GroupLeave(userId uint64, externalId string, groupId string) error { model := domain.CreateModelContext(s.svc.MyContext) - + // check cp麦位置 + group_mic_s.NewGroupPowerService(s.svc.MyContext).CheckCpLeaveMic(groupId, userId) _, err := group_m.RoomLivingLeave(model, userId, externalId, groupId) return err } diff --git a/test/cp_test.go b/test/cp_test.go new file mode 100644 index 0000000000000000000000000000000000000000..ccf61b696b652a614455647033ae8b7cabf82841 --- /dev/null +++ b/test/cp_test.go @@ -0,0 +1,12 @@ +package test + +import ( + "git.hilo.cn/hilo-common/domain" + "git.hilo.cn/hilo-common/rpc" + "testing" +) + +func TestGetCpRelation(t *testing.T) { + cpRelation, err := rpc.GetUserCpRelation(domain.CreateModelNil(), 7642) + t.Logf("%v-%v", cpRelation, err) +}