|
|
|
@ -282,8 +282,18 @@ func CopyRolePowerAry(oldRoleId int64, newRoleInfoEntry modelssystempermission.S |
|
|
|
return |
|
|
|
} |
|
|
|
var saveNewRole []modelssystempermission.AuthPower |
|
|
|
for i, v := range authPowerList { |
|
|
|
uuid := publicmethod.GetUUid(int64(i)) |
|
|
|
var oldUuid []int64 |
|
|
|
var uuid int64 |
|
|
|
for _, v := range authPowerList { |
|
|
|
// uuid := publicmethod.GetUUid(int64(i))
|
|
|
|
for { |
|
|
|
uuid = publicmethod.GetUUid(1) |
|
|
|
if !publicmethod.IsInTrue[int64](uuid, oldUuid) { |
|
|
|
oldUuid = append(oldUuid, uuid) |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
var newRoleInfo modelssystempermission.AuthPower |
|
|
|
newRoleInfo.Id = uuid //
|
|
|
|
newRoleInfo.OrgPowerType = v.OrgPowerType //赋权类型(org:组织;job:岗位;role:角色;person:个人)\`
|
|
|
|
@ -346,10 +356,20 @@ func CopyGroupPower(oldRoleId int64, newRoleInfo modelssystempermission.SystemRo |
|
|
|
if err != nil { |
|
|
|
return |
|
|
|
} |
|
|
|
var oldUuid []int64 |
|
|
|
var uuid int64 |
|
|
|
var saveNewRoleGroup []modelssystempermission.AuthGroupPower |
|
|
|
for i, v := range oldRoleGroupAry { |
|
|
|
for _, v := range oldRoleGroupAry { |
|
|
|
|
|
|
|
for { |
|
|
|
uuid = publicmethod.GetUUid(1) |
|
|
|
if !publicmethod.IsInTrue[int64](uuid, oldUuid) { |
|
|
|
oldUuid = append(oldUuid, uuid) |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|
var newCont modelssystempermission.AuthGroupPower |
|
|
|
newCont.Id = publicmethod.GetUUid(int64(i)) //
|
|
|
|
newCont.Id = uuid //
|
|
|
|
newCont.AppType = v.AppType //系统类型(system:系统平台;app:自定义表单与应用)"
|
|
|
|
newCont.OrgPowerType = v.OrgPowerType //赋权类型(org:组织;job:岗位;role:角色;person:个人)"
|
|
|
|
newCont.OrgOrUserKey = newRoleInfo.Id //行政组织或角色、人员识别符
|
|
|
|
|