@@ -85,7 +85,7 @@ func TestLogicExtServer_SendMessage(t *testing.T) { | |||||
func TestLogicExtServer_protoUnmarshal(t *testing.T) { | func TestLogicExtServer_protoUnmarshal(t *testing.T) { | ||||
db.InitMysql(config.MySQL) | db.InitMysql(config.MySQL) | ||||
var msg model.Message | var msg model.Message | ||||
if err := db.DB.Table("message_000").Where("`id` = 192914").First(&msg).Error; err != nil { | |||||
if err := db.DB.Table("message_000").Where("`id` = 10912").First(&msg).Error; err != nil { | |||||
if err == gorm.ErrRecordNotFound { | if err == gorm.ErrRecordNotFound { | ||||
fmt.Println(err) | fmt.Println(err) | ||||
return | return | ||||
@@ -93,7 +93,7 @@ func TestLogicExtServer_protoUnmarshal(t *testing.T) { | |||||
} | } | ||||
var temp pb.Command | var temp pb.Command | ||||
var temp1 pb.AddGroupMembersPush | |||||
var temp1 pb.UpdateGroupPush | |||||
err := proto.Unmarshal(msg.Content, &temp) | err := proto.Unmarshal(msg.Content, &temp) | ||||
if err != nil { | if err != nil { | ||||
fmt.Println(err) | fmt.Println(err) | ||||
@@ -47,7 +47,7 @@ func (*groupApp) GetGroup(ctx context.Context, groupId int64) (*pb.Group, error) | |||||
if err != nil { | if err != nil { | ||||
return nil, err | return nil, err | ||||
} | } | ||||
if !strings.Contains(group.Name, "官方") && masterId == "68823769" { | |||||
if !strings.Contains(group.Name, "官方") && !strings.Contains(group.Name, "运营中心") && masterId == "68823769" { | |||||
for _, member := range group.Members { | for _, member := range group.Members { | ||||
if member.UserId == userId && member.MemberType != int(pb.MemberType_GMT_ADMIN) { | if member.UserId == userId && member.MemberType != int(pb.MemberType_GMT_ADMIN) { | ||||
group.Name = "我的推荐人群" | group.Name = "我的推荐人群" | ||||
@@ -19,4 +19,5 @@ var Logic = map[string]int{ | |||||
"/pb.LogicExt/UpdateGroup": 8, | "/pb.LogicExt/UpdateGroup": 8, | ||||
"/pb.LogicExt/CreateGroup": 9, | "/pb.LogicExt/CreateGroup": 9, | ||||
"/pb.LogicExt/SetGroupRemoveBannedMembers": 10, | "/pb.LogicExt/SetGroupRemoveBannedMembers": 10, | ||||
"/pb.LogicExt/SendRedPacket": 11, | |||||
} | } |