Browse Source

Merge branch 'ETA_2.3.0' into debug

# Conflicts:
#	services/data/chart_classify.go
xiziwen 13 hours ago
parent
commit
ea14059d7f
2 changed files with 12 additions and 10 deletions
  1. 2 1
      services/data/chart_classify.go
  2. 10 9
      services/data/edb_classify.go

+ 2 - 1
services/data/chart_classify.go

@@ -995,8 +995,9 @@ func EditChartClassifyV2(chartClassifyId, parentId, source int, chartClassifyNam
 			err = e
 			return
 		}
-		if classifyInfo.Level != parentClassifyInfo.Level-1 {
+		if classifyInfo.Level != parentClassifyInfo.Level + 1 {
 			err = errors.New("父级分类层级异常")
+			return
 		}
 	}
 

+ 10 - 9
services/data/edb_classify.go

@@ -442,8 +442,9 @@ func EditEdbClassify(classifyId, parentId int, classifyName, lang string, sysUse
 			err = e
 			return
 		}
-		if item.Level != parentClassifyInfo.Level - 1 {
+		if item.Level != parentClassifyInfo.Level + 1 {
 			err = errors.New("父级分类层级异常")
+			return
 		}
 	}
 
@@ -458,10 +459,10 @@ func EditEdbClassify(classifyId, parentId int, classifyName, lang string, sysUse
 
 	switch lang {
 	case utils.EnLangVersion:
-		// 名字相同,那么就直接返回
-		if item.ClassifyNameEn == classifyName {
-			return
-		}
+		//// 名字相同,那么就直接返回
+		//if item.ClassifyNameEn == classifyName {
+		//	return
+		//}
 
 		// 判断名称是否已存在
 		count, tmpErr := data_manage.GetEdbClassifyEnCount(classifyName, item.ParentId, item.ClassifyType)
@@ -481,10 +482,10 @@ func EditEdbClassify(classifyId, parentId int, classifyName, lang string, sysUse
 		item.LastModifyUserRealName = sysUser.RealName
 		updateCols = append(updateCols, "ClassifyNameEn", "LastModifyUserId", "LastModifyUserRealName")
 	default:
-		// 名字相同,那么就直接返回
-		if item.ClassifyName == classifyName {
-			return
-		}
+		//// 名字相同,那么就直接返回
+		//if item.ClassifyName == classifyName {
+		//	return
+		//}
 
 		// 判断名称是否已存在
 		count, tmpErr := data_manage.GetEdbClassifyCount(classifyName, item.ParentId, item.ClassifyType)