This commit is contained in:
苏尹岚
2020-12-29 15:24:03 +08:00
parent 55189e1693
commit 8f6a6bf47d

View File

@@ -357,6 +357,9 @@ func UpdateMessageGroup(ctx *jxcontext.Context, groupID int, payload map[string]
if err = dao.GetEntity(db, messageGroup, "GroupID"); err != nil {
return 0, err
}
if messageGroup.UserID != ctx.GetUserID() {
return 0, fmt.Errorf("只有群主才能修改群信息!")
}
valid := dao.StrictMakeMapByStructObject(payload, messageGroup, ctx.GetUserName())
if len(valid) > 0 {
dao.Begin(db)