Parcourir la source

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

Roc il y a 1 an
Parent
commit
24c069b24d

+ 3 - 3
controllers/data_manage/edb_info_refresh.go

@@ -248,10 +248,10 @@ func buildTree(items []*edb_refresh.BaseClassifyItems, parentId int) []*edb_refr
 // @Description 获取待配置的指标列表接口
 // @Param   Source   query   int  true       "来源:1:同花顺,2:wind,3:彭博"
 // @Param   SubSource   query   int  true       "来源:0:经济数据库,1:日期序列"
-// @Param   ClassifyId   query   string  false             "分类ID"
+// @Param   ClassifyId   query   string  false             "分类ID,支持多选,用英文,隔开"
 // @Param   TerminalCode   query   string  false       "终端编码"
-// @Param   SysUserId   query   string  false       "创建人"
-// @Param   Frequency   query   string  false       "频度"
+// @Param   SysUserId   query   string  false       "创建人,支持多选,用英文,隔开"
+// @Param   Frequency   query   string  false       "频度,支持多选,用英文,隔开"
 // @Param   Keyword   query   string  false       "关键词"
 // @Param   SortParam   query   string  false       "排序字段参数,用来排序的字段, 枚举值:'data_time':日期"
 // @Param   SortType   query   string  true       "如何排序,是正序还是倒序,枚举值:`asc 正序`,`desc 倒叙`"

+ 6 - 6
models/data_manage/edb_refresh/request/edb_info_refresh.go

@@ -24,10 +24,10 @@ type RefreshConfigReq struct {
 type SaveEdbRefreshConfigReq struct {
 	Source          int                `description:"来源"`
 	SubSource       int                `description:"子来源"`
-	ClassifyId      string             `description:"分类id"`
+	ClassifyId      string             `description:"分类id,支持多选,用英文,隔开"`
 	TerminalCode    string             `description:"终端编码"`
-	SysUserId       string             `description:"操作人id"`
-	Frequency       string             `description:"频度"`
+	SysUserId       string             `description:"操作人id,支持多选,用英文,隔开"`
+	Frequency       string             `description:"频度,支持多选,用英文,隔开"`
 	Keyword         string             `description:"关键字"`
 	Status          string             `description:"状态,枚举值:启用、暂停"`
 	IsSelectAll     bool               `description:"是否选择所有指标"`
@@ -40,10 +40,10 @@ type SaveEdbRefreshConfigReq struct {
 type SaveEdbRefreshStatusReq struct {
 	Source          int    `description:"来源"`
 	SubSource       int    `description:"子来源"`
-	ClassifyId      string `description:"分类id"`
+	ClassifyId      string `description:"分类id,支持多选,用英文,隔开"`
 	TerminalCode    string `description:"终端编码"`
-	SysUserId       string `description:"操作人id"`
-	Frequency       string `description:"频度"`
+	SysUserId       string `description:"操作人id,支持多选,用英文,隔开"`
+	Frequency       string `description:"频度,支持多选,用英文,隔开"`
 	Keyword         string `description:"关键字"`
 	Status          string `description:"状态,枚举值:启用、暂停"`
 	IsSelectAll     bool   `description:"是否选择所有指标"`

+ 9 - 0
services/data/edb_info_refresh.go

@@ -452,6 +452,9 @@ func GetList(source, subSource int, classifyId, terminalCode, sysUserId, frequen
 				pars = utils.GetLikeKeywordPars(pars, keyword, 2)
 
 				for _, v := range keywordSlice {
+					if v == ` ` || v == `` {
+						continue
+					}
 					tmpConditionSlice = append(tmpConditionSlice, ` index_name like ? or index_code like ? `)
 					pars = utils.GetLikeKeywordPars(pars, v, 2)
 				}
@@ -495,6 +498,9 @@ func GetList(source, subSource int, classifyId, terminalCode, sysUserId, frequen
 				pars = utils.GetLikeKeywordPars(pars, keyword, 2)
 
 				for _, v := range keywordSlice {
+					if v == ` ` || v == `` {
+						continue
+					}
 					tmpConditionSlice = append(tmpConditionSlice, ` index_name like ? or index_code like ? `)
 					pars = utils.GetLikeKeywordPars(pars, v, 2)
 				}
@@ -553,6 +559,9 @@ func GetList(source, subSource int, classifyId, terminalCode, sysUserId, frequen
 				pars = utils.GetLikeKeywordPars(pars, keyword, 2)
 
 				for _, v := range keywordSlice {
+					if v == ` ` || v == `` {
+						continue
+					}
 					tmpConditionSlice = append(tmpConditionSlice, ` edb_name like ? or edb_code like ? `)
 					pars = utils.GetLikeKeywordPars(pars, v, 2)
 				}