Browse Source

update

master
DengBiao 1 year ago
parent
commit
99872463b0
3 changed files with 4 additions and 3 deletions
  1. +2
    -2
      internal/logic/api/logic_ext_test.go
  2. +1
    -1
      internal/logic/app/group_app.go
  3. +1
    -0
      pkg/urlwhitelist/urlwhitelist.go

+ 2
- 2
internal/logic/api/logic_ext_test.go View File

@@ -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)


+ 1
- 1
internal/logic/app/group_app.go View File

@@ -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 = "我的推荐人群"


+ 1
- 0
pkg/urlwhitelist/urlwhitelist.go View File

@@ -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,
} }

Loading…
Cancel
Save