瀏覽代碼

新增参数

WH01243 2 年之前
父節點
當前提交
07b2c5b645
共有 3 個文件被更改,包括 6 次插入18 次删除
  1. 1 1
      go.mod
  2. 2 2
      go.sum
  3. 3 15
      middleground/publicservice.go

+ 1 - 1
go.mod

@@ -16,7 +16,7 @@ require (
 	github.com/thinxer/go-word2vec v0.0.0-20150917053916-5c19ec7379ed
 	github.com/zeromicro/go-zero v1.5.3
 	go.mongodb.org/mongo-driver v1.11.6
-	jygit.jydev.jianyu360.cn/ApplicationCenter/publicService v0.0.0-20230629015708-ea8cd287165b
+	jygit.jydev.jianyu360.cn/ApplicationCenter/publicService v0.0.0-20230629083730-5cd980d79620
 )
 
 require (

+ 2 - 2
go.sum

@@ -1323,8 +1323,8 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
 honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
 honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
-jygit.jydev.jianyu360.cn/ApplicationCenter/publicService v0.0.0-20230629015708-ea8cd287165b h1:A46qe11IogYGrVbwOp+6T1bW4BFGa8wVQx+ODpAc7WQ=
-jygit.jydev.jianyu360.cn/ApplicationCenter/publicService v0.0.0-20230629015708-ea8cd287165b/go.mod h1:wBxeFODhYtGenkxXJGThN/VrFaxPvvHMxzpS09pxApM=
+jygit.jydev.jianyu360.cn/ApplicationCenter/publicService v0.0.0-20230629083730-5cd980d79620 h1:7Cz93KlLfGhIhycqZtfloQo1SJx8uQSgy+EPzoKojTs=
+jygit.jydev.jianyu360.cn/ApplicationCenter/publicService v0.0.0-20230629083730-5cd980d79620/go.mod h1:wBxeFODhYtGenkxXJGThN/VrFaxPvvHMxzpS09pxApM=
 k8s.io/api v0.22.9/go.mod h1:rcjO/FPOuvc3x7nQWx29UcDrFJMx82RxDob71ntNH4A=
 k8s.io/api v0.26.3 h1:emf74GIQMTik01Aum9dPP0gAypL8JTLl/lHa4V9RFSU=
 k8s.io/api v0.26.3/go.mod h1:PXsqwPMXBSBcL1lJ9CYDKy7kIReUydukS5JiRlxC3qE=

+ 3 - 15
middleground/publicservice.go

@@ -62,16 +62,6 @@ func (p *publicService) List(searchValue, dataType string, pageNum, pageSize int
 	}
 	result := map[string]interface{}{}
 	result["PageCount"] = resp.PageCount
-	wordMap := map[string]string{}
-	wordArr := []map[string]interface{}{}
-	for _, v := range resp.FieldIllustrate {
-		wordArr = append(wordArr, map[string]interface{}{
-			"code":     v.Code,
-			"Name":     v.Name,
-			"describe": v.Describe,
-		})
-		wordMap[v.Code] = v.Name
-	}
 	arr := []map[string]interface{}{}
 	for _, v := range resp.List {
 		arr = append(arr, map[string]interface{}{
@@ -81,12 +71,10 @@ func (p *publicService) List(searchValue, dataType string, pageNum, pageSize int
 			"clearStatus":    v.ClearStatus,
 			"clearStatusStr": common.If(v.ClearStatus == "0", "", "人工清洗"),
 			"dataType":       v.DataType,
-			"dataTypeStr":    wordMap[v.DataType],
 		})
 	}
 	result["list"] = arr
-	result["wordMap"] = wordMap
-	result["fieldIllustrate"] = wordArr
+	result["fieldIllustrate"] = resp.FieldIllustrate
 	result["hotKeys"] = resp.HotKeys
 	return result
 }
@@ -103,12 +91,12 @@ func (p *publicService) Detail(id string) map[string]interface{} {
 	}
 	result := map[string]interface{}{}
 	result["name"] = resp.Name
-	result["dataTypeStr"] = resp.FieldIllustrate.Name
-	result["dataType"] = resp.FieldIllustrate.Code
+	result["dataType"] = resp.FieldIllustrate.Name
 	result["describe"] = resp.FieldIllustrate.Describe
 	result["clearStatusStr"] = common.If(resp.ClearStatus == "0", "", "人工清洗")
 	result["clearStatus"] = resp.ClearStatus
 	result["dataExample"] = resp.DataExample
+	result["Introduce"] = resp.Introduce
 	result["format"] = resp.Format
 	return result
 }