From 5c3e2337894ec186776683a2fd74988492fe49a3 Mon Sep 17 00:00:00 2001 From: 沈斌 <bluelazysb@hotmail.com> Date: Tue, 07 Nov 2017 08:48:11 +0800 Subject: [PATCH] insert hostory data to mongo --- .idea/workspace.xml | 76 +++++++++++++++++++++---------------- src/main/java/com/moral/monitor/listener/TaskListener.java | 2 + 2 files changed, 45 insertions(+), 33 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 3b43021..9aaf5e0 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -6,9 +6,9 @@ </artifacts-to-build> </component> <component name="ChangeListManager"> - <list default="true" id="59bc3ffe-0657-438a-9fae-fbbdeee84a24" name="Default" comment="������MQ������������"> + <list default="true" id="59bc3ffe-0657-438a-9fae-fbbdeee84a24" name="Default" comment="test ack flag"> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/resources/spring/rabbitmq.xml" afterPath="$PROJECT_DIR$/src/main/resources/spring/rabbitmq.xml" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/com/moral/monitor/listener/TaskListener.java" afterPath="$PROJECT_DIR$/src/main/java/com/moral/monitor/listener/TaskListener.java" /> </list> <ignored path="$PROJECT_DIR$/out/" /> <ignored path="$PROJECT_DIR$/target/" /> @@ -21,11 +21,11 @@ </component> <component name="FileEditorManager"> <leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> - <file leaf-file-name="TaskListener.java" pinned="false" current-in-tab="false"> + <file leaf-file-name="TaskListener.java" pinned="false" current-in-tab="true"> <entry file="file://$PROJECT_DIR$/src/main/java/com/moral/monitor/listener/TaskListener.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="990"> - <caret line="66" column="24" lean-forward="false" selection-start-line="66" selection-start-column="24" selection-end-line="66" selection-end-column="24" /> + <state relative-caret-position="344"> + <caret line="136" column="22" lean-forward="false" selection-start-line="136" selection-start-column="16" selection-end-line="136" selection-end-column="22" /> <folding> <element signature="imports" expanded="true" /> </folding> @@ -33,11 +33,11 @@ </provider> </entry> </file> - <file leaf-file-name="rabbitmq.xml" pinned="false" current-in-tab="true"> + <file leaf-file-name="rabbitmq.xml" pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/src/main/resources/spring/rabbitmq.xml"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="495"> - <caret line="33" column="93" lean-forward="false" selection-start-line="33" selection-start-column="93" selection-end-line="33" selection-end-column="93" /> + <state relative-caret-position="240"> + <caret line="16" column="0" lean-forward="false" selection-start-line="16" selection-start-column="0" selection-end-line="16" selection-end-column="0" /> <folding /> </state> </provider> @@ -130,8 +130,8 @@ <option value="$PROJECT_DIR$/src/main/webapp/WEB-INF/web.xml" /> <option value="$PROJECT_DIR$/src/main/resources/mybatis/mybatis.xml" /> <option value="$PROJECT_DIR$/src/main/resources/system/alarmLevels.json" /> - <option value="$PROJECT_DIR$/src/main/java/com/moral/monitor/listener/TaskListener.java" /> <option value="$PROJECT_DIR$/src/main/resources/spring/rabbitmq.xml" /> + <option value="$PROJECT_DIR$/src/main/java/com/moral/monitor/listener/TaskListener.java" /> </list> </option> </component> @@ -169,7 +169,6 @@ <foldersAlwaysOnTop value="true" /> </navigator> <panes> - <pane id="Scope" /> <pane id="ProjectPane"> <subPane> <expand> @@ -181,9 +180,10 @@ <select /> </subPane> </pane> + <pane id="AndroidView" /> + <pane id="Scope" /> <pane id="PackagesPane" /> <pane id="Scratches" /> - <pane id="AndroidView" /> </panes> </component> <component name="PropertiesComponent"> @@ -464,7 +464,8 @@ <workItem from="1509938642246" duration="726000" /> <workItem from="1509946269191" duration="522000" /> <workItem from="1509957226710" duration="251000" /> - <workItem from="1509957794827" duration="14000" /> + <workItem from="1509957794827" duration="173000" /> + <workItem from="1510014788172" duration="851000" /> </task> <task id="LOCAL-00001" summary="updates"> <created>1508484578874</created> @@ -781,11 +782,18 @@ <option name="project" value="LOCAL" /> <updated>1509957305739</updated> </task> - <option name="localTasksCounter" value="46" /> + <task id="LOCAL-00046" summary="test ack flag"> + <created>1509957820879</created> + <option name="number" value="00046" /> + <option name="presentableId" value="LOCAL-00046" /> + <option name="project" value="LOCAL" /> + <updated>1509957820879</updated> + </task> + <option name="localTasksCounter" value="47" /> <servers /> </component> <component name="TimeTrackingManager"> - <option name="totallyTimeSpent" value="112633000" /> + <option name="totallyTimeSpent" value="113643000" /> </component> <component name="ToolWindowManager"> <frame x="0" y="23" width="1404" height="877" extended-state="0" /> @@ -799,21 +807,21 @@ <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.54092073" sideWeight="0.520558" order="8" side_tool="true" content_ui="tabs" /> <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32893288" sideWeight="0.49706313" order="0" side_tool="false" content_ui="tabs" /> <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> - <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.54092073" sideWeight="0.479442" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.40537083" sideWeight="0.48091042" order="10" side_tool="false" content_ui="tabs" /> + <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.54092073" sideWeight="0.479442" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Spring" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" /> <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="12" side_tool="false" content_ui="tabs" /> <window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> - <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.2444934" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> + <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24816446" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> <window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="true" content_ui="tabs" /> <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.0" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> <window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> - <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.39897698" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="true" content_ui="tabs" /> + <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.39897698" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> @@ -883,7 +891,8 @@ <MESSAGE value="������log" /> <MESSAGE value="������������" /> <MESSAGE value="������MQ������������" /> - <option name="LAST_COMMIT_MESSAGE" value="������MQ������������" /> + <MESSAGE value="test ack flag" /> + <option name="LAST_COMMIT_MESSAGE" value="test ack flag" /> </component> <component name="XDebuggerManager"> <breakpoint-manager> @@ -892,13 +901,6 @@ <watches-manager /> </component> <component name="editorHistoryManager"> - <entry file="file://$PROJECT_DIR$/src/main/java/com/moral/monitor/listener/quartz/EquipmentCheck.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="135"> - <caret line="34" column="25" lean-forward="true" selection-start-line="34" selection-start-column="4" selection-end-line="34" selection-end-column="25" /> - </state> - </provider> - </entry> <entry file="file://$PROJECT_DIR$/src/main/resources/mapper/TaskDao.xml"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="59"> @@ -1171,24 +1173,32 @@ </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/main/java/com/moral/monitor/listener/TaskListener.java"> + <entry file="file://$PROJECT_DIR$/.idea/workspace.xml"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="990"> - <caret line="66" column="24" lean-forward="false" selection-start-line="66" selection-start-column="24" selection-end-line="66" selection-end-column="24" /> - <folding> - <element signature="imports" expanded="true" /> - </folding> + <state relative-caret-position="0"> + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> + <folding /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/src/main/resources/spring/rabbitmq.xml"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="495"> - <caret line="33" column="93" lean-forward="false" selection-start-line="33" selection-start-column="93" selection-end-line="33" selection-end-column="93" /> + <state relative-caret-position="240"> + <caret line="16" column="0" lean-forward="false" selection-start-line="16" selection-start-column="0" selection-end-line="16" selection-end-column="0" /> <folding /> </state> </provider> </entry> + <entry file="file://$PROJECT_DIR$/src/main/java/com/moral/monitor/listener/TaskListener.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="344"> + <caret line="136" column="22" lean-forward="false" selection-start-line="136" selection-start-column="16" selection-end-line="136" selection-end-column="22" /> + <folding> + <element signature="imports" expanded="true" /> + </folding> + </state> + </provider> + </entry> </component> <component name="masterDetails"> <states> diff --git a/src/main/java/com/moral/monitor/listener/TaskListener.java b/src/main/java/com/moral/monitor/listener/TaskListener.java index 1c47a31..37d1d02 100644 --- a/src/main/java/com/moral/monitor/listener/TaskListener.java +++ b/src/main/java/com/moral/monitor/listener/TaskListener.java @@ -124,6 +124,8 @@ } } jobDao.batchInsertHistory(histories); + + mongoTemplate.insert(JSON.toJSONString(histories), "data"); } private Map<String, Float> getAdjustData(String mac) { -- Gitblit v1.8.0