Commit 373f8e64 authored by hujiebin's avatar hujiebin

txGroupId

parent dc9bbe6a
...@@ -22,10 +22,10 @@ func GroupInMicChangeEvent() { ...@@ -22,10 +22,10 @@ func GroupInMicChangeEvent() {
}) })
} }
func MicAllRPush(model *domain.Model, txGroupUid string, userId uint64, externalId string) error { func MicAllRPush(model *domain.Model, imGroupId string, userId uint64, externalId string) error {
model.Log.Infof("MicChangeRPush MicAllRPush begin groupUuid:%v, externalId:%v", txGroupUid, externalId) model.Log.Infof("MicChangeRPush MicAllRPush begin groupUuid:%v, externalId:%v", imGroupId, externalId)
imGroupId, err := group_m.ToImGroupId(model, txGroupUid) txGroupId, err := group_m.ToTxGroupId(model, imGroupId)
if err != nil { if err != nil {
model.Log.Errorf("ToImGroupId fail:%v", err) model.Log.Errorf("ToImGroupId fail:%v", err)
return err return err
...@@ -33,13 +33,13 @@ func MicAllRPush(model *domain.Model, txGroupUid string, userId uint64, external ...@@ -33,13 +33,13 @@ func MicAllRPush(model *domain.Model, txGroupUid string, userId uint64, external
// //
micContents, err := group_m.GetMicAllContent(model, imGroupId) micContents, err := group_m.GetMicAllContent(model, imGroupId)
if err != nil { if err != nil {
model.Log.Errorf("MicChangeRPush MicAllRPush getMicAllContent err:%+v, micContents:%v groupUuid:%v, externalId:%v", err, micContents, txGroupUid, externalId) model.Log.Errorf("MicChangeRPush MicAllRPush getMicAllContent err:%+v, micContents:%v groupUuid:%v, externalId:%v", err, micContents, txGroupId, externalId)
return err return err
} }
for _, micContent := range micContents { for _, micContent := range micContents {
//麦上是默认值,就不用推 //麦上是默认值,就不用推
if micContent.Forbid == false && micContent.User == nil && micContent.AgoraId == 0 && micContent.Lock == false && micContent.ExternalId == "" && micContent.MicForbid == false { 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, txGroupUid, externalId, micContent) model.Log.Infof("MicChangeRPush MicAllRPush default micContent:%v, groupUuid:%v, externalId:%v, micContent:%+v", micContent, txGroupId, externalId, micContent)
continue continue
} }
micContentStr, err := json.Marshal(micContent) micContentStr, err := json.Marshal(micContent)
...@@ -62,14 +62,14 @@ func MicAllRPush(model *domain.Model, txGroupUid string, userId uint64, external ...@@ -62,14 +62,14 @@ func MicAllRPush(model *domain.Model, txGroupUid string, userId uint64, external
MysteryCode: v.MysteryCode, MysteryCode: v.MysteryCode,
}) })
} }
if err := rpc.SendSocketMicChange(seqId, userId, externalId, txGroupUid, uint32(micContent.I), micContent.Lock, micContent.Forbid, micContent.MicForbid, micContent.AgoraId, if err := rpc.SendSocketMicChange(seqId, userId, externalId, txGroupId, 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.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 { 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, txGroupUid, externalId, string(micContentStr)) model.Log.Errorf("MicAllRPush err:%+v, groupUuid:%v, externalId:%v, micContent:%+v", err, txGroupId, externalId, string(micContentStr))
} else { } else {
model.Log.Infof("MicChangeRPush MicAllRPush Marshal micContent, groupUuid:%v, externalId:%v, micContent:%+v", txGroupUid, externalId, string(micContentStr)) model.Log.Infof("MicChangeRPush MicAllRPush Marshal micContent, groupUuid:%v, externalId:%v, micContent:%+v", txGroupId, externalId, string(micContentStr))
} }
} }
model.Log.Infof("MicAllRPush end groupUuid:%v, externalId:%v", txGroupUid, externalId) model.Log.Infof("MicAllRPush end groupUuid:%v, externalId:%v", txGroupId, externalId)
return nil return nil
} }
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