wangshan 2 달 전
부모
커밋
aeec72e6d3
2개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 1
      entity/workDesktop.go
  2. 1 1
      service/workDesktop.go

+ 5 - 1
entity/workDesktop.go

@@ -580,7 +580,6 @@ func (m *WorkDesktopMenu) CommonlyFormat(childMenus map[int][]*JYMenu) ([]*pb.Th
 		if len(childMenus[mv.Id]) == 0 && (mv.CapitalCode != "" || mv.PermissionCode != "" || mv.CheckEnt > 0) {
 			_, _, _, _, _, _, _, feasibility = m.CheckCapitalResources(mv, pBool.HasBool, m.VerifyPermissions(mv.PermissionCode, "").HasBool, "")
 		}
-		saveIds = append(saveIds, encrypt.SE.EncodeString(strconv.Itoa(mv.Id)))
 		subLevel[mv.Id] = true
 		oneLevel := &pb.ThreeLevelMenu{
 			Name:     mv.Name,
@@ -639,6 +638,11 @@ func (m *WorkDesktopMenu) CommonlyFormat(childMenus map[int][]*JYMenu) ([]*pb.Th
 				}
 			}
 		}
+		if !oneLevel.Usable && mv.CheckCode == 1 {
+			delBool = true
+			continue
+		}
+		saveIds = append(saveIds, encrypt.SE.EncodeString(strconv.Itoa(mv.Id)))
 		//跨平台,非本平台功能,给用户提示信息
 		if oneLevel.Url == "-1" {
 			oneLevel.TipInfo = &pb.TipInfo{

+ 1 - 1
service/workDesktop.go

@@ -176,7 +176,7 @@ func RenewWorkDesktopMenuModeOrCommonly(in *WorkDesktopComprehensiveReq) (r *Wor
 			if entity.ConfigJson.WorkTableInside != entity.ConfigJson.WorkTableOut && !in.IntranetBool {
 				menuSql = fmt.Sprintf(`SELECT * from %s WHERE (id IN (%s)  OR (parentid IN (%s)  AND status = 0)) %s  ORDER BY FIELD(id , %s);`, entity.ConfigJson.WorkTableOut, strings.Join(pIds, ","), strings.Join(pIds, ","), moreSql, strings.Join(pIds, ","))
 			}
-			menuData := entity.BaseMysql.SelectBySql(menuSql, in.EntId)
+			menuData := entity.BaseMysql.SelectBySql(menuSql)
 			if menuData != nil && len(*menuData) > 0 {
 				var (
 					entId, _        = strconv.ParseInt(in.EntId, 10, 64)