From 22ddb0631572b367aabd7cdd0604f8b98ea998fb Mon Sep 17 00:00:00 2001
From: sunty <1172534965@qq.com>
Date: 星期二, 08 十月 2019 11:55:04 +0800
Subject: [PATCH] fix EsApi
---
/dev/null | 174 -------------------------------------------
EsClient.go | 13 ++-
2 files changed, 8 insertions(+), 179 deletions(-)
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
deleted file mode 100644
index e5fc6b3..0000000
--- a/.idea/workspace.xml
+++ /dev/null
@@ -1,174 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="ChangeListManager">
- <list default="true" id="1fb5f475-f58f-4cd4-ab82-c1d23d0fd3da" name="Default Changelist" comment="fix url" />
- <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
- <option name="SHOW_DIALOG" value="false" />
- <option name="HIGHLIGHT_CONFLICTS" value="true" />
- <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
- <option name="LAST_RESOLUTION" value="IGNORE" />
- </component>
- <component name="FileEditorManager">
- <leaf>
- <file pinned="false" current-in-tab="true">
- <entry file="file://$PROJECT_DIR$/EsApi.go">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="-459">
- <caret line="290" selection-start-line="290" selection-end-line="290" />
- </state>
- </provider>
- </entry>
- </file>
- </leaf>
- </component>
- <component name="GOROOT" path="D:\Go" />
- <component name="Git.Settings">
- <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
- </component>
- <component name="IdeDocumentHistory">
- <option name="CHANGED_PATHS">
- <list>
- <option value="$PROJECT_DIR$/EsApi.go" />
- </list>
- </option>
- </component>
- <component name="ProjectFrameBounds" extendedState="6">
- <option name="x" value="1912" />
- <option name="y" value="-8" />
- <option name="width" value="1936" />
- <option name="height" value="1056" />
- </component>
- <component name="ProjectView">
- <navigator proportions="" version="1">
- <foldersAlwaysOnTop value="true" />
- </navigator>
- <panes>
- <pane id="ProjectPane">
- <subPane>
- <expand>
- <path>
- <item name="esutil" type="b2602c69:ProjectViewProjectNode" />
- <item name="esutil" type="462c0819:PsiDirectoryNode" />
- </path>
- </expand>
- <select />
- </subPane>
- </pane>
- <pane id="Scope" />
- <pane id="PackagesPane" />
- </panes>
- </component>
- <component name="PropertiesComponent">
- <property name="GO_FMT" value="true" />
- <property name="WebServerToolWindowFactoryState" value="false" />
- <property name="aspect.path.notification.shown" value="true" />
- <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1569659117288" />
- <property name="go.gopath.indexing.explicitly.defined" value="true" />
- <property name="go.sdk.automatically.set" value="true" />
- <property name="last_opened_file_path" value="$PROJECT_DIR$" />
- <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
- <property name="nodejs_npm_path_reset_for_default_project" value="true" />
- </component>
- <component name="RunDashboard">
- <option name="ruleStates">
- <list>
- <RuleState>
- <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
- </RuleState>
- <RuleState>
- <option name="name" value="StatusDashboardGroupingRule" />
- </RuleState>
- </list>
- </option>
- </component>
- <component name="SvnConfiguration">
- <configuration />
- </component>
- <component name="TaskManager">
- <task active="true" id="Default" summary="Default task">
- <changelist id="1fb5f475-f58f-4cd4-ab82-c1d23d0fd3da" name="Default Changelist" comment="" />
- <created>1569658990638</created>
- <option name="number" value="Default" />
- <option name="presentableId" value="Default" />
- <updated>1569658990638</updated>
- <workItem from="1569658991953" duration="138000" />
- </task>
- <task id="LOCAL-00001" summary="fix url">
- <created>1569659102248</created>
- <option name="number" value="00001" />
- <option name="presentableId" value="LOCAL-00001" />
- <option name="project" value="LOCAL" />
- <updated>1569659102248</updated>
- </task>
- <option name="localTasksCounter" value="2" />
- <servers />
- </component>
- <component name="TimeTrackingManager">
- <option name="totallyTimeSpent" value="138000" />
- </component>
- <component name="ToolWindowManager">
- <frame x="1912" y="-8" width="1936" height="1056" extended-state="6" />
- <layout>
- <window_info id="Image Layers" />
- <window_info id="Designer" />
- <window_info id="UI Designer" />
- <window_info id="Capture Tool" />
- <window_info id="Favorites" side_tool="true" />
- <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.25" />
- <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
- <window_info anchor="bottom" id="Docker" show_stripe_button="false" />
- <window_info anchor="bottom" id="Database Changes" />
- <window_info anchor="bottom" id="Version Control" />
- <window_info anchor="bottom" id="Terminal" />
- <window_info anchor="bottom" id="Event Log" side_tool="true" />
- <window_info anchor="bottom" id="Message" order="0" />
- <window_info anchor="bottom" id="Find" order="1" />
- <window_info anchor="bottom" id="Run" order="2" weight="0.329718" />
- <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
- <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
- <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
- <window_info anchor="bottom" id="TODO" order="6" />
- <window_info anchor="right" id="Palette" />
- <window_info anchor="right" id="Theme Preview" />
- <window_info anchor="right" id="Maven" />
- <window_info anchor="right" id="Capture Analysis" />
- <window_info anchor="right" id="Palette	" />
- <window_info anchor="right" id="Database" />
- <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
- <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
- <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
- </layout>
- </component>
- <component name="TypeScriptGeneratedFilesManager">
- <option name="version" value="1" />
- </component>
- <component name="VcsManagerConfiguration">
- <MESSAGE value="fix url" />
- <option name="LAST_COMMIT_MESSAGE" value="fix url" />
- </component>
- <component name="editorHistoryManager">
- <entry file="file://$PROJECT_DIR$/EsApi.go">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="-459">
- <caret line="290" selection-start-line="290" selection-end-line="290" />
- </state>
- </provider>
- </entry>
- </component>
- <component name="masterDetails">
- <states>
- <state key="ProjectJDKs.UI">
- <settings>
- <last-edited>1.8</last-edited>
- <splitter-proportions>
- <option name="proportions">
- <list>
- <option value="0.2" />
- </list>
- </option>
- </splitter-proportions>
- </settings>
- </state>
- </states>
- </component>
-</project>
\ No newline at end of file
diff --git a/EsClient.go b/EsClient.go
index 9a69741..8b2afb9 100644
--- a/EsClient.go
+++ b/EsClient.go
@@ -58,9 +58,8 @@
//瑙f瀽鎶撴媿搴撲汉鍛樼粨鏋�
func Videopersonsbyid(sources []map[string]interface{}) (tmpinfos []protomsg.Videopersons) {
var ok bool
-
- var tmpinfo protomsg.Videopersons
for _, source := range sources{
+ var tmpinfo protomsg.Videopersons
tmpinfo.Id, ok = source["id"].(string)
if !ok {
continue
@@ -157,7 +156,8 @@
fmt.Println(source["alarmRules"])
for _,v := range source["alarmRules"].([]interface{}) {
m := v.(map[string]interface{})
- ar := protomsg.AlarmRules{}
+ var ar protomsg.AlarmRules
+ //ar := protomsg.AlarmRules{}
ar.GroupId,ok = m["groupId"].(string)
Isnil("groupId",ok)
ar.AlarmLevel,ok = m["alarmLevel"].(string)
@@ -166,16 +166,18 @@
Isnil("ruleText",ok)
ar.DefenceState,ok = m["defenceState"].(bool)
Isnil("DefenceState",ok)
- tmpinfo.AlarmRules = append( tmpinfo.AlarmRules, &ar)
+ tmpinfo.AlarmRules = append(tmpinfo.AlarmRules, &ar)
}
}
+
if source["baseInfo"] != nil {
fmt.Println(source["baseInfo"])
for _,v := range source["baseInfo"].([]interface{}) {
m := v.(map[string]interface{})
fmt.Println("m:",m)
- bi := protomsg.BaseInfo{}
+ var bi protomsg.BaseInfo
+ //bi := protomsg.BaseInfo{}
bi.TableId,ok = m["tableId"].(string)
Isnil("tableId",ok)
bi.TableName,ok = m["tableName"].(string)
@@ -222,6 +224,7 @@
return tmpinfos
}
+
//瑙f瀽搴曞簱浜哄憳缁撴瀯
func Dbpersonbyid(sources []map[string]interface{}) (tmpinfos []protomsg.Dbperson) {
var ok bool
--
Gitblit v1.8.0