|
|
@@ -105,12 +105,12 @@ func RoleList(c *gin.Context) { |
|
|
|
for _, v := range *roleList { |
|
|
|
var temp md.RoleListResp |
|
|
|
temp.Data = v |
|
|
|
adminRole, err1 := adminRoleDb.GetAdminRoleByRole(v.Id) |
|
|
|
adminRoles, err1 := adminRoleDb.FindAdminRoleByRoleId(v.Id) |
|
|
|
if err1 != nil { |
|
|
|
e.OutErr(c, e.ERR_DB_ORM, err1.Error()) |
|
|
|
return |
|
|
|
} |
|
|
|
if adminRole != nil { |
|
|
|
for _, adminRole := range *adminRoles { |
|
|
|
admin, err2 := adminDb.GetAdmin(adminRole.AdmId) |
|
|
|
if err2 != nil { |
|
|
|
e.OutErr(c, e.ERR_DB_ORM, err2.Error()) |
|
|
@@ -121,8 +121,8 @@ func RoleList(c *gin.Context) { |
|
|
|
}{ |
|
|
|
Name: admin.Username, |
|
|
|
}) |
|
|
|
result = append(result, &temp) |
|
|
|
} |
|
|
|
result = append(result, &temp) |
|
|
|
} |
|
|
|
e.OutSuc(c, map[string]interface{}{ |
|
|
|
"list": result, |
|
|
|