From cef5aa6da71a9364e78038504994bc2b61b11711 Mon Sep 17 00:00:00 2001 From: wangshuai Date: Tue, 22 Sep 2020 16:08:14 +0800 Subject: [PATCH 1/3] 'commit' --- dsSupport/docs/docs.go | 32 +++++++++++++++++++++++++++++++- dsSupport/docs/swagger.json | 32 +++++++++++++++++++++++++++++++- dsSupport/docs/swagger.yaml | 15 +++++++++++++++ dsSupport/main.go | 14 ++++++++++++++ 4 files changed, 91 insertions(+), 2 deletions(-) diff --git a/dsSupport/docs/docs.go b/dsSupport/docs/docs.go index 7aa66445..3d232511 100644 --- a/dsSupport/docs/docs.go +++ b/dsSupport/docs/docs.go @@ -2775,7 +2775,37 @@ var doc = `{ } } } - } + }, + "tags": [ + { + "description": "数据订阅", + "name": "dataaccess" + }, + { + "description": "数据异常", + "name": "dataerror" + }, + { + "description": "数据源", + "name": "datasource" + }, + { + "description": "数据统计", + "name": "datastatistic" + }, + { + "description": "字典", + "name": "jyt2012" + }, + { + "description": "元数据", + "name": "metadata" + }, + { + "description": "机构目录", + "name": "orgtree" + } + ] }` type swaggerInfo struct { diff --git a/dsSupport/docs/swagger.json b/dsSupport/docs/swagger.json index 94c24ee3..a4893c12 100644 --- a/dsSupport/docs/swagger.json +++ b/dsSupport/docs/swagger.json @@ -2759,5 +2759,35 @@ } } } - } + }, + "tags": [ + { + "description": "数据订阅", + "name": "dataaccess" + }, + { + "description": "数据异常", + "name": "dataerror" + }, + { + "description": "数据源", + "name": "datasource" + }, + { + "description": "数据统计", + "name": "datastatistic" + }, + { + "description": "字典", + "name": "jyt2012" + }, + { + "description": "元数据", + "name": "metadata" + }, + { + "description": "机构目录", + "name": "orgtree" + } + ] } \ No newline at end of file diff --git a/dsSupport/docs/swagger.yaml b/dsSupport/docs/swagger.yaml index e09e85ed..8ceee9fb 100644 --- a/dsSupport/docs/swagger.yaml +++ b/dsSupport/docs/swagger.yaml @@ -2068,3 +2068,18 @@ paths: tags: - orgtree swagger: "2.0" +tags: +- description: 数据订阅 + name: dataaccess +- description: 数据异常 + name: dataerror +- description: 数据源 + name: datasource +- description: 数据统计 + name: datastatistic +- description: 字典 + name: jyt2012 +- description: 元数据 + name: metadata +- description: 机构目录 + name: orgtree diff --git a/dsSupport/main.go b/dsSupport/main.go index 2b406e71..5303bd8e 100644 --- a/dsSupport/main.go +++ b/dsSupport/main.go @@ -27,6 +27,20 @@ import ( // @contact.email support@swagger.io // @license.name Apache 2.0 // @license.url http://www.apache.org/licenses/LICENSE-2.0.html +// @tag.name dataaccess +// @tag.description 数据订阅 +// @tag.name dataerror +// @tag.description 数据异常 +// @tag.name datasource +// @tag.description 数据源 +// @tag.name datastatistic +// @tag.description 数据统计 +// @tag.name jyt2012 +// @tag.description 字典 +// @tag.name metadata +// @tag.description 元数据 +// @tag.name orgtree +// @tag.description 机构目录 // @host 127.0.0.1:8005 func main() { // 发布模式 From b9d794b347b3390b2f0144cefd2cfaf9b8bdae15 Mon Sep 17 00:00:00 2001 From: wangshuai Date: Tue, 22 Sep 2020 16:09:48 +0800 Subject: [PATCH 2/3] 'commit' --- dsSupport/Shell/start.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/dsSupport/Shell/start.sh b/dsSupport/Shell/start.sh index 65ee546b..eefa53e7 100644 --- a/dsSupport/Shell/start.sh +++ b/dsSupport/Shell/start.sh @@ -7,3 +7,4 @@ sleep 3 chmod +x dsSupport # 运行为后台进程 nohup /usr/local/dsMin/dsSupport/dsSupport >> /usr/local/dsMin/dsSupport/dsSupport.log 2>&1 & + From 84f878a5cd5f2d70a28553e4177605e3433ce53a Mon Sep 17 00:00:00 2001 From: wangshuai Date: Wed, 23 Sep 2020 14:19:01 +0800 Subject: [PATCH 3/3] 'commit' --- dsDataex/MyService/DataEX/DataexService/DataexService.go | 7 +++---- .../MyModel/MetaData/MetadataService/MetadataService.go | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/dsDataex/MyService/DataEX/DataexService/DataexService.go b/dsDataex/MyService/DataEX/DataexService/DataexService.go index 1826bcc9..44b1249a 100644 --- a/dsDataex/MyService/DataEX/DataexService/DataexService.go +++ b/dsDataex/MyService/DataEX/DataexService/DataexService.go @@ -9,7 +9,6 @@ import ( "dsDataex/Utils/CommonUtil" "dsDataex/Utils/ES7Util" "dsDataex/Utils/KafkaUtil" - "dsDataex/Utils/ValidationUtil" "encoding/json" "fmt" "strconv" @@ -387,11 +386,11 @@ func DataexSetBatch(systemID string, datas []MySwagger.Data,datasource *models.T //校验ESDataContent //add by wangshuai 2020-09-16 - _, _, successDatas, failureIDs := ValidationUtil.ValidESDataContent(esData.DatasourceId, datas) + //_, _, successDatas, failureIDs := ValidationUtil.ValidESDataContent(esData.DatasourceId, datas) //将校验通过数据赋值给datas - datas = successDatas + //datas = successDatas //将校验失败数据赋值给failIDs - dataContentFailIDs = failureIDs + //dataContentFailIDs = failureIDs //四、循环添加索引文档 for no:=0;no< len(datas) && no<1000 ;no++{ diff --git a/dsSupport/MyModel/MetaData/MetadataService/MetadataService.go b/dsSupport/MyModel/MetaData/MetadataService/MetadataService.go index 86981f11..74bca4a4 100644 --- a/dsSupport/MyModel/MetaData/MetadataService/MetadataService.go +++ b/dsSupport/MyModel/MetaData/MetadataService/MetadataService.go @@ -166,8 +166,8 @@ func RemoveMetadata(id string) (bool, string, error) { func CreateMetadataES(indexName string) (bool, string, error) { res, _, datasourceId, _ := DatasourceDAO.GetDatasourceIdByCode(indexName) if res == true { - if MetadataDAO.IsMetadataExistsByDatasourceCode(datasourceId.(string)) == true { - MetadataDAO.DeleteMetadataByDatasourceCode(datasourceId.(string)) + if MetadataDAO.IsMetadataExistsByDatasourceCode(indexName) == true { + MetadataDAO.DeleteMetadataByDatasourceCode(indexName) } fmt.Println("datasourceId: ", datasourceId) result := ES7Util.IndexDataContentMapping(indexName)