Browse Source

删除增加条件筛选

kobe6258 1 week ago
parent
commit
1296b4abf9
4 changed files with 12 additions and 4 deletions
  1. 4 3
      controllers/eta_controller.go
  2. BIN
      eta_mini_crm_ht
  3. 4 0
      models/request/eta_hub.go
  4. 4 1
      services/eta_service.go

+ 4 - 3
controllers/eta_controller.go

@@ -72,8 +72,8 @@ func (this *ETAController) GetList() {
 	}
 	indexList, err := services.GetList(etaRequest.ToEtaRequest())
 	if err != nil {
-		br.Msg = "分类列表获取失败"
-		br.ErrMsg = "分类列表获取失败,系统错误,Err:" + err.Error()
+		br.Msg = "指标列表获取失败"
+		br.ErrMsg = "指标列表获取失败,系统错误,Err:" + err.Error()
 		return
 	}
 	var data = new(response.BaseFromBusinessIndexResponse)
@@ -126,6 +126,7 @@ func (this *ETAController) DeleteIndex() {
 		br.ErrMsg = "参数解析失败,Err:" + err.Error()
 		return
 	}
+
 	if req.DeleteAll {
 		req.DeleteList = []string{}
 		undeleteMap := make(map[string]int, len(req.UnDeleteList))
@@ -134,7 +135,7 @@ func (this *ETAController) DeleteIndex() {
 				undeleteMap[v] = 1
 			}
 		}
-		list, fetchErr := services.GetIndexList()
+		list, fetchErr := services.GetIndexList(req.SourceName, req.Frequency, req.KeyWord)
 		if fetchErr != nil {
 			br.Msg = "指标列表获取失败"
 			br.ErrMsg = "指标列表获取失败:" + fetchErr.Error()

BIN
eta_mini_crm_ht


+ 4 - 0
models/request/eta_hub.go

@@ -20,6 +20,10 @@ type IndexDataListReq struct {
 	IndexCode    string
 }
 type IndexesDeleteReq struct {
+	KeyWord      string
+	SourceName   string
+	Unit         string
+	Frequency    string
 	DeleteAll    bool
 	UnDeleteList []string
 	DeleteList   []string

+ 4 - 1
services/eta_service.go

@@ -163,10 +163,13 @@ func (ilr *IndexDataListRequest) ToString() string {
 		ilr.PageSize, ilr.CurrentIndex, ilr.IndexCode)
 }
 
-func GetIndexList() (list []string, err error) {
+func GetIndexList(SourceName, Frequency, KeyWord string) (list []string, err error) {
 	indexReq := IndexListRequest{
 		PageSize:     500,
 		CurrentIndex: 1,
+		SourceName:   SourceName,
+		Frequency:    Frequency,
+		KeyWord:      KeyWord,
 		SysSource:    "ht_mini_crm",
 	}
 	for {