From ee5a601c935e5b6130211d14666bcf7a4567ac2d Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Tue, 12 Sep 2023 10:51:15 +0800 Subject: [PATCH] 1 --- app/admin/hdl/hdl_role.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/admin/hdl/hdl_role.go b/app/admin/hdl/hdl_role.go index 4bed084..14d9c93 100644 --- a/app/admin/hdl/hdl_role.go +++ b/app/admin/hdl/hdl_role.go @@ -313,10 +313,12 @@ func AdminList(c *gin.Context) { } var enterpriseList []map[string]interface{} for _, v1 := range adminEnterpriseList { - enterpriseList = append(enterpriseList, map[string]interface{}{ - "name": v1.Enterprise.Name, - "id": v1.Enterprise.Id, - }) + if v1.Enterprise.Id != 0 { + enterpriseList = append(enterpriseList, map[string]interface{}{ + "name": v1.Enterprise.Name, + "id": v1.Enterprise.Id, + }) + } } result = append(result, md.AdminListResp{