ソースを参照

Merge remote-tracking branch 'origin/eta/2.3' into debug

Roc 3 ヶ月 前
コミット
585af7d986

+ 1 - 6
controllers/data_manage/correlation/correlation_chart_classify.go

@@ -23,7 +23,6 @@ type CorrelationChartClassifyController struct {
 // ChartClassifyList
 // @Title 相关性图表分类列表
 // @Description 相关性图表分类列表接口
-// @Param   IsShowMe   query   bool  false       "是否只看我的,true、false"
 // @Param   ParentId   query   bool  false       "父级ID"
 // @Param   Source   query   int  false       "图表类型,3:相关性,4:滚动相关性"
 // @Success 200 {object} data_manage.ChartClassifyListResp
@@ -54,7 +53,6 @@ func (this *CorrelationChartClassifyController) ChartClassifyList() {
 	//	}
 	//}
 
-	isShowMe, _ := this.GetBool("IsShowMe")
 	parentId, _ := this.GetInt("ParentId")
 	source, _ := this.GetInt("Source", utils.CHART_SOURCE_CORRELATION)
 
@@ -105,10 +103,7 @@ func (this *CorrelationChartClassifyController) ChartClassifyList() {
 			return
 		}
 
-		var adminId int
-		if isShowMe {
-			adminId = this.SysUser.AdminId
-		}
+		adminId := this.SysUser.AdminId
 
 		charts, e := data_manage.GetChartInfoBySourceAndParentId(source, parentId, adminId)
 		if e != nil {

+ 0 - 7
controllers/data_manage/cross_variety/classify.go

@@ -19,7 +19,6 @@ type ClassifyController struct {
 // List
 // @Title 跨品种分析分类列表
 // @Description 跨品种分析分类列表接口
-// @Param   IsShowMe   query   bool  true       "是否只看我的,true、false"
 // @Param   Source   query   int  true       "图表类型,3:跨品种分析,4:滚动跨品种分析"
 // @Success 200 {object} data_manage.ChartClassifyListResp
 // @router /classify/list [get]
@@ -46,8 +45,6 @@ func (c *ClassifyController) List() {
 		}
 	}
 
-	isShowMe, _ := c.GetBool("IsShowMe")
-
 	source, _ := c.GetInt("Source")
 	if source <= 0 {
 		source = utils.CHART_SOURCE_CROSS_HEDGING
@@ -69,10 +66,6 @@ func (c *ClassifyController) List() {
 
 	chartInfoMap := make(map[int][]*data_manage.ChartClassifyItems)
 	for _, v := range allChartInfo {
-		if !isShowMe {
-			chartInfoMap[v.ChartClassifyId] = append(chartInfoMap[v.ChartClassifyId], v)
-			continue
-		}
 		if v.SysUserId != c.SysUser.AdminId {
 			continue
 		}

+ 0 - 22
controllers/data_manage/future_good/future_good_chart_classify.go

@@ -8,7 +8,6 @@ import (
 	"eta_gn/eta_api/models/system"
 	"eta_gn/eta_api/services/data"
 	"eta_gn/eta_api/utils"
-	"fmt"
 	"time"
 )
 
@@ -20,7 +19,6 @@ type FutureGoodChartClassifyController struct {
 // ChartClassifyList
 // @Title 商品价格图表分类列表
 // @Description 商品价格图表分类列表接口
-// @Param   IsShowMe   query   bool  true       "是否只看我的,true、false"
 // @Success 200 {object} data_manage.ChartClassifyListResp
 // @router /chart_classify/list [get]
 func (this *FutureGoodChartClassifyController) ChartClassifyList() {
@@ -46,26 +44,6 @@ func (this *FutureGoodChartClassifyController) ChartClassifyList() {
 		}
 	}
 
-	isShowMe, _ := this.GetBool("IsShowMe")
-	if isShowMe {
-		errMsg, err := getChartClassifyListForMe(*this.SysUser, resp)
-		if err != nil {
-			br.Msg = errMsg
-			br.ErrMsg = err.Error()
-			return
-		}
-		// 移除没有权限的图表
-		allNodes := data.HandleNoPermissionChart(resp.AllNodes, noPermissionChartIdMap, this.SysUser.AdminId)
-		resp.AllNodes = allNodes
-
-		br.Ret = 200
-		br.Success = true
-		br.Msg = "获取成功"
-		br.Data = resp
-		fmt.Println("source my classify")
-		return
-	}
-
 	rootList, err := data_manage.GetChartClassifyByParentId(0, utils.CHART_SOURCE_FUTURE_GOOD, this.SysUser.AdminId)
 	if err != nil && !utils.IsErrNoRow(err) {
 		br.Msg = "获取失败"

+ 0 - 20
controllers/data_manage/line_equation/line_chart_classify.go

@@ -19,7 +19,6 @@ type LineEquationChartClassifyController struct {
 // ChartClassifyList
 // @Title 拟合方程图表分类列表
 // @Description 拟合方程图表分类列表接口
-// @Param   IsShowMe   query   bool  true       "是否只看我的,true、false"
 // @Param   Source   query   int  true       "图表类型,3:拟合方程,4:滚动拟合方程"
 // @Success 200 {object} data_manage.ChartClassifyListResp
 // @router /chart_classify/list [get]
@@ -46,21 +45,6 @@ func (this *LineEquationChartClassifyController) ChartClassifyList() {
 		}
 	}
 
-	isShowMe, _ := this.GetBool("IsShowMe")
-	if isShowMe {
-		errMsg, err := getChartClassifyListForMe(*this.SysUser, resp)
-		if err != nil {
-			br.Msg = errMsg
-			br.ErrMsg = err.Error()
-			return
-		}
-		br.Ret = 200
-		br.Success = true
-		br.Msg = "获取成功"
-		br.Data = resp
-		return
-	}
-
 	source := utils.CHART_SOURCE_LINE_EQUATION
 
 	rootList, err := data_manage.GetChartClassifyByParentId(0, source, this.SysUser.AdminId)
@@ -79,10 +63,6 @@ func (this *LineEquationChartClassifyController) ChartClassifyList() {
 
 	chartInfoMap := make(map[int][]*data_manage.ChartClassifyItems)
 	for _, v := range allChartInfo {
-		if !isShowMe {
-			chartInfoMap[v.ChartClassifyId] = append(chartInfoMap[v.ChartClassifyId], v)
-			continue
-		}
 		if v.SysUserId != this.SysUser.AdminId {
 			continue
 		}

+ 0 - 20
controllers/data_manage/line_feature/classify.go

@@ -19,7 +19,6 @@ type LineFeaturesChartClassifyController struct {
 // ChartClassifyList
 // @Title 统计特征图表分类列表
 // @Description 统计特征图表分类列表接口
-// @Param   IsShowMe   query   bool  true       "是否只看我的,true、false"
 // @Param   Source   query   int  true       "图表类型,3:统计特征,4:滚动统计特征"
 // @Success 200 {object} data_manage.ChartClassifyListResp
 // @router /chart_classify/list [get]
@@ -46,21 +45,6 @@ func (this *LineFeaturesChartClassifyController) ChartClassifyList() {
 		}
 	}
 
-	isShowMe, _ := this.GetBool("IsShowMe")
-	if isShowMe {
-		errMsg, err := getChartClassifyListForMe(*this.SysUser, resp)
-		if err != nil {
-			br.Msg = errMsg
-			br.ErrMsg = err.Error()
-			return
-		}
-		br.Ret = 200
-		br.Success = true
-		br.Msg = "获取成功"
-		br.Data = resp
-		return
-	}
-
 	source := utils.CHART_SOURCE_LINE_FEATURE_STANDARD_DEVIATION
 
 	rootList, err := data_manage.GetChartClassifyByParentId(0, source, this.SysUser.AdminId)
@@ -79,10 +63,6 @@ func (this *LineFeaturesChartClassifyController) ChartClassifyList() {
 
 	chartInfoMap := make(map[int][]*data_manage.ChartClassifyItems)
 	for _, v := range allChartInfo {
-		if !isShowMe {
-			chartInfoMap[v.ChartClassifyId] = append(chartInfoMap[v.ChartClassifyId], v)
-			continue
-		}
 		if v.SysUserId != this.SysUser.AdminId {
 			continue
 		}

+ 2 - 7
controllers/data_manage/my_chart.go

@@ -27,7 +27,6 @@ type MyChartController struct {
 // @Param   CurrentIndex   query   int  true       "当前页页码,从1开始"
 // @Param   ChartClassifyId   query   int  true       "分类id"
 // @Param   KeyWord   query   string  true       "搜索关键词"
-// @Param   IsShowMe   query   bool  true       "是否只看我的,true、false"
 // @Success 200 {object} data_manage.ChartListResp
 // @router /chart/list [get]
 func (this *MyChartController) ChartList() {
@@ -83,12 +82,8 @@ func (this *MyChartController) ChartList() {
 		condition += ` AND  ( chart_name LIKE '%` + keyWord + `%' OR chart_name_en LIKE '%` + keyWord + `%' )`
 	}
 
-	//只看我的
-	isShowMe, _ := this.GetBool("IsShowMe")
-	if isShowMe {
-		condition += ` AND sys_user_id = ? `
-		pars = append(pars, sysUser.AdminId)
-	}
+	condition += ` AND sys_user_id = ? `
+	pars = append(pars, sysUser.AdminId)
 
 	// 获取当前账号的不可见指标
 	noPermissionChartIdList := make([]int, 0)

+ 1 - 6
controllers/data_manage/range_analysis/chart_classify.go

@@ -22,7 +22,6 @@ type RangeChartClassifyController struct {
 // ChartClassifyList
 // @Title 区间分析图表分类列表
 // @Description 区间分析图表分类列表接口
-// @Param   IsShowMe   query   bool  false       "是否只看我的,true、false"
 // @Param   ParentId   query   bool  false       "父级ID"
 // @Param   Source   query   int  false       "图表类型,3:相关性,4:滚动相关性"
 // @Success 200 {object} data_manage.ChartClassifyListResp
@@ -53,7 +52,6 @@ func (this *RangeChartClassifyController) ChartClassifyList() {
 	//	}
 	//}
 
-	isShowMe, _ := this.GetBool("IsShowMe")
 	parentId, _ := this.GetInt("ParentId")
 	source, _ := this.GetInt("Source", utils.CHART_SOURCE_RANGE_ANALYSIS)
 
@@ -104,10 +102,7 @@ func (this *RangeChartClassifyController) ChartClassifyList() {
 			return
 		}
 
-		var adminId int
-		if isShowMe {
-			adminId = this.SysUser.AdminId
-		}
+		adminId := this.SysUser.AdminId
 
 		charts, e := data_manage.GetChartInfoBySourceAndParentId(source, parentId, adminId)
 		if e != nil {