瀏覽代碼

fix:个人名下,图表名称允许重复

Roc 1 周之前
父節點
當前提交
ef02993778

+ 1 - 1
controllers/data_manage/future_good/future_good_profit_chart_info.go

@@ -742,7 +742,7 @@ func copyProfitChartInfo(oldChartInfo *data_manage.ChartInfo, chartClassifyId in
 	condition += " AND chart_classify_id=? "
 	pars = append(pars, chartClassifyId)
 
-	condition += " AND chart_name=? AND source = ?  AND sys_suer_id = ? "
+	condition += " AND chart_name=? AND source = ?  AND sys_user_id = ? "
 	pars = append(pars, chartName, utils.CHART_SOURCE_FUTURE_GOOD_PROFIT, sysUser.AdminId)
 
 	count, err := data_manage.GetChartInfoCountByCondition(condition, pars)

+ 4 - 4
services/data/chart_info.go

@@ -2224,9 +2224,9 @@ func AddChartInfo(req data_manage.AddChartInfoReq, sysUserId int, sysUserRealNam
 
 		switch lang {
 		case utils.EnLangVersion:
-			condition += " AND chart_name_en = ? AND source = ? AND sys_suer_id = ? "
+			condition += " AND chart_name_en = ? AND source = ? AND sys_user_id = ? "
 		default:
-			condition += " AND chart_name = ? AND source = ? AND sys_suer_id = ? "
+			condition += " AND chart_name = ? AND source = ? AND sys_user_id = ? "
 		}
 		pars = append(pars, req.ChartName, utils.CHART_SOURCE_DEFAULT, sysUserId)
 
@@ -2661,9 +2661,9 @@ func EditChartInfo(req data_manage.EditChartInfoReq, sysUser *system.Admin, lang
 
 		switch lang {
 		case utils.EnLangVersion:
-			condition += " AND chart_name_en = ? AND source = ? AND sys_suer_id = ? "
+			condition += " AND chart_name_en = ? AND source = ? AND sys_user_id = ? "
 		default:
-			condition += " AND chart_name = ? AND source = ? AND sys_suer_id = ? "
+			condition += " AND chart_name = ? AND source = ? AND sys_user_id = ? "
 		}
 		pars = append(pars, req.ChartName, utils.CHART_SOURCE_DEFAULT, sysUser.AdminId)
 

+ 3 - 3
services/data/correlation/chart_info.go

@@ -782,9 +782,9 @@ func AddChartInfo(req data_manage.AddChartInfoReq, source int, sysUser *system.A
 
 		switch lang {
 		case utils.EnLangVersion:
-			condition += " AND chart_name_en = ? AND source = ? AND sys_suer_id = ? "
+			condition += " AND chart_name_en = ? AND source = ? AND sys_user_id = ? "
 		default:
-			condition += " AND chart_name=? AND source = ? AND sys_suer_id = ? "
+			condition += " AND chart_name=? AND source = ? AND sys_user_id = ? "
 		}
 		pars = append(pars, req.ChartName, source, sysUser.AdminId)
 		count, tmpErr := data_manage.GetChartInfoCountByCondition(condition, pars)
@@ -1034,7 +1034,7 @@ func EditChartInfo(req data_manage.EditChartInfoReq, sysUser *system.Admin, lang
 	{
 		var condition string
 		var pars []interface{}
-		condition += " AND chart_info_id <> ? AND sys_suer_id = ? "
+		condition += " AND chart_info_id <> ? AND sys_user_id = ? "
 		pars = append(pars, req.ChartInfoId, sysUser.AdminId)
 		switch lang {
 		case utils.EnLangVersion:

+ 3 - 3
services/data/line_equation/chart_info.go

@@ -411,9 +411,9 @@ func BatchAddChartInfo(batchAddChartReq []request.AddChart, lineChartInfoConfig
 			var pars []interface{}
 			switch lang {
 			case utils.EnLangVersion:
-				condition += " AND chart_name_en = ? AND source = ? AND sys_suer_id = ? "
+				condition += " AND chart_name_en = ? AND source = ? AND sys_user_id = ? "
 			default:
-				condition += " AND chart_name = ? AND source = ? AND sys_suer_id = ?  "
+				condition += " AND chart_name = ? AND source = ? AND sys_user_id = ?  "
 			}
 			pars = append(pars, v.ChartName, source, sysUser.AdminId)
 			count, tmpErr := data_manage.GetChartInfoCountByCondition(condition, pars)
@@ -631,7 +631,7 @@ func BatchSaveChartInfo(multipleGraphConfigId int, batchAddChartReq []request.Ad
 		// 判断图表是否存在
 		var condition string
 		var pars []interface{}
-		condition += " AND chart_name=? AND source = ?  AND sys_suer_id = ? "
+		condition += " AND chart_name=? AND source = ?  AND sys_user_id = ? "
 		pars = append(pars, v.ChartName, source, sysUser.AdminId)
 
 		// 已经创建了图表的类型

+ 3 - 3
services/data/line_feature/chart_info.go

@@ -460,9 +460,9 @@ func AddChartInfo(req data_manage.AddChartInfoReq, edbInfoMapping *data_manage.C
 
 		switch lang {
 		case utils.EnLangVersion:
-			condition += " AND chart_name_en = ? AND source = ? AND sys_suer_id = ? "
+			condition += " AND chart_name_en = ? AND source = ? AND sys_user_id = ? "
 		default:
-			condition += " AND chart_name = ? AND source = ? AND sys_suer_id = ? "
+			condition += " AND chart_name = ? AND source = ? AND sys_user_id = ? "
 		}
 		pars = append(pars, req.ChartName, source, sysUser.AdminId)
 		count, tmpErr := data_manage.GetChartInfoCountByCondition(condition, pars)
@@ -610,7 +610,7 @@ func EditChartInfo(req data_manage.EditChartInfoReq, edbInfoMapping *data_manage
 	{
 		var condition string
 		var pars []interface{}
-		condition += " AND chart_info_id <> ? AND source = ? AND sys_suer_id = ?  "
+		condition += " AND chart_info_id <> ? AND source = ? AND sys_user_id = ?  "
 		pars = append(pars, req.ChartInfoId, chartItem.Source, sysUser.AdminId)
 
 		switch lang {

+ 3 - 3
services/data/range_analysis/chart_info.go

@@ -1096,9 +1096,9 @@ func AddChartInfo(req data_manage.AddChartInfoReq, source int, sysUser *system.A
 
 		switch lang {
 		case utils.EnLangVersion:
-			condition += " AND chart_name_en = ? AND source = ? AND sys_suer_id = ? "
+			condition += " AND chart_name_en = ? AND source = ? AND sys_user_id = ? "
 		default:
-			condition += " AND chart_name=? AND source = ? AND sys_suer_id = ? "
+			condition += " AND chart_name=? AND source = ? AND sys_user_id = ? "
 		}
 		pars = append(pars, req.ChartName, source, sysUser.AdminId)
 		count, tmpErr := data_manage.GetChartInfoCountByCondition(condition, pars)
@@ -1355,7 +1355,7 @@ func EditChartInfo(req data_manage.EditChartInfoReq, sysUser *system.Admin, lang
 	{
 		var condition string
 		var pars []interface{}
-		condition += " AND chart_info_id <> ? AND sys_suer_id = ? "
+		condition += " AND chart_info_id <> ? AND sys_user_id = ? "
 		pars = append(pars, req.ChartInfoId, sysUser.AdminId)
 		switch lang {
 		case utils.EnLangVersion: