From 53605f4fa76f6fce8fd72f55ab9000e1013fc3b4 Mon Sep 17 00:00:00 2001 From: wangshuai Date: Tue, 1 Sep 2020 16:56:22 +0800 Subject: [PATCH] 'commit' --- Logs/dsSupport.log | 12 ++++++++++++ .../DataAccess/DataaccessDAO/DataaccessDAO.go | 15 ++++++++++----- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/Logs/dsSupport.log b/Logs/dsSupport.log index 54bd6aad..be1106f6 100644 --- a/Logs/dsSupport.log +++ b/Logs/dsSupport.log @@ -124,3 +124,15 @@ [Error]2020/09/01 16:38:24 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value [Error]2020/09/01 16:38:24 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value [Error]2020/09/01 16:38:24 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:49:17 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:49:17 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:49:17 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:49:17 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:49:17 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:49:17 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:55:14 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:55:14 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:55:14 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:55:14 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:55:14 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value +[Error]2020/09/01 16:55:14 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value diff --git a/dsSupport/MyModel/DataAccess/DataaccessDAO/DataaccessDAO.go b/dsSupport/MyModel/DataAccess/DataaccessDAO/DataaccessDAO.go index cb390c9a..07527b5a 100644 --- a/dsSupport/MyModel/DataAccess/DataaccessDAO/DataaccessDAO.go +++ b/dsSupport/MyModel/DataAccess/DataaccessDAO/DataaccessDAO.go @@ -29,21 +29,26 @@ func GetDataaccessResults(query MySwagger.DataaccessQuery) (bool, string, int32, joinListJson1, _ := json.Marshal(joinList1) mergedList1 := CommonUtil.ListMerge(string(listJson), string(joinListJson1), "datasource_id", "id", "source_systemid", "system_id") - sql2 := "SELECT app_id FROM t_app_base WHERE 1 = 1" + sql2 := "SELECT id FROM t_dataex_datasource WHERE 1 = 1" joinList2, _, _ := CacheUtil.Page(sql2, 10000, 0) joinListJson2, _ := json.Marshal(joinList2) - mergedList2 := CommonUtil.ListMerge(mergedList1, string(joinListJson2), "source_systemid", "app_id", "source_systemname", "app_name") + mergedList2 := CommonUtil.ListMerge(mergedList1, string(joinListJson2), "datasource_id", "id", "datasource_name", "datasource_name") sql3 := "SELECT app_id FROM t_app_base WHERE 1 = 1" joinList3, _, _ := CacheUtil.Page(sql3, 10000, 0) joinListJson3, _ := json.Marshal(joinList3) - mergedList3 := CommonUtil.ListMerge(mergedList2, string(joinListJson3), "consume_systemid", "app_id", "consume_systemname", "app_name") + mergedList3 := CommonUtil.ListMerge(mergedList2, string(joinListJson3), "source_systemid", "app_id", "source_systemname", "app_name") - fmt.Println(mergedList3) + sql4 := "SELECT app_id FROM t_app_base WHERE 1 = 1" + joinList4, _, _ := CacheUtil.Page(sql4, 10000, 0) + joinListJson4, _ := json.Marshal(joinList4) + mergedList4 := CommonUtil.ListMerge(mergedList3, string(joinListJson4), "consume_systemid", "app_id", "consume_systemname", "app_name") + + fmt.Println(mergedList4) var datas []map[string]interface{} - json.Unmarshal([]byte(mergedList3), &datas) + json.Unmarshal([]byte(mergedList4), &datas) fmt.Println(datas)