Commit fd9cbe7d authored by chenweijian's avatar chenweijian

家族

parent 49443135
...@@ -1340,6 +1340,9 @@ func GroupPowerSetAdmin(c *gin.Context) (*mycontext.MyContext, error) { ...@@ -1340,6 +1340,9 @@ func GroupPowerSetAdmin(c *gin.Context) (*mycontext.MyContext, error) {
if optGroupPUser == nil { if optGroupPUser == nil {
return myContext, bizerr.GroupPowerUserHaveNoJoin return myContext, bizerr.GroupPowerUserHaveNoJoin
} }
if optUser.ID == userId { // 不能操作自己
return myContext, bizerr.GroupPowerHaveNoPower
}
// 目标身份 // 目标身份
var targetRole groupPower_e.GroupPowerUserRole var targetRole groupPower_e.GroupPowerUserRole
if optType == 1 { if optType == 1 {
...@@ -1352,7 +1355,7 @@ func GroupPowerSetAdmin(c *gin.Context) (*mycontext.MyContext, error) { ...@@ -1352,7 +1355,7 @@ func GroupPowerSetAdmin(c *gin.Context) (*mycontext.MyContext, error) {
return myContext, bizerr.GroupPowerHaveAlreadyChange return myContext, bizerr.GroupPowerHaveAlreadyChange
} }
// 变更 // 变更
err = groupPower_m.UpdateFamilyAdmin(model, userId, optGroupPUser.GroupPowerId, targetRole) err = groupPower_m.UpdateFamilyAdmin(model, optGroupPUser.UserId, optGroupPUser.GroupPowerId, targetRole)
if optGroupPUser == nil { if optGroupPUser == nil {
return myContext, myerr.WrapErr(err) return myContext, myerr.WrapErr(err)
} }
......
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