From af8592b4fd14ba944f8e05accbc43b8a000b3640 Mon Sep 17 00:00:00 2001
From: 沈斌 <bluelazysb@hotmail.com>
Date: Tue, 24 Oct 2017 14:07:06 +0800
Subject: [PATCH] BUG-058
---
.idea/workspace.xml | 228 ++++++++++++++++++++++++++++++++++++---------
src/main/java/com/moral/monitor/controller/ApiController.java | 29 +----
2 files changed, 189 insertions(+), 68 deletions(-)
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 04e5879..a03798b 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -21,12 +21,44 @@
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
- <file leaf-file-name="ApiController.java" pinned="false" current-in-tab="true">
+ <file leaf-file-name="ApiController.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/com/moral/monitor/controller/ApiController.java">
<provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="320">
- <caret line="250" column="61" lean-forward="false" selection-start-line="250" selection-start-column="61" selection-end-line="250" selection-end-column="61" />
+ <state relative-caret-position="229">
+ <caret line="71" column="47" lean-forward="false" selection-start-line="71" selection-start-column="23" selection-end-line="71" selection-end-column="47" />
<folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="ApiService.java" pinned="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/src/main/java/com/moral/monitor/service/ApiService.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="201">
+ <caret line="26" column="39" lean-forward="false" selection-start-line="26" selection-start-column="15" selection-end-line="26" selection-end-column="39" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="ApiDao.xml" pinned="false" current-in-tab="true">
+ <entry file="file://$PROJECT_DIR$/src/main/resources/mapper/ApiDao.xml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="135">
+ <caret line="9" column="0" lean-forward="true" selection-start-line="9" selection-start-column="0" selection-end-line="9" selection-end-column="0" />
+ <folding>
+ <marker date="1507622125000" expanded="true" signature="339:380" ph="select * fro... equipment" />
+ <marker date="1507622125000" expanded="true" signature="449:562" ph="UPDATE equip... " />
+ <marker date="1507622125000" expanded="true" signature="627:769" ph="INSERT INTO equipment... " />
+ <marker date="1507622125000" expanded="true" signature="908:969" ph="SELECT * fro... user" />
+ <marker date="1507622125000" expanded="true" signature="1107:1162" ph="SELECT * fro... user" />
+ <marker date="1507622125000" expanded="true" signature="1224:1271" ph="UPDATE `user... " />
+ <marker date="1507622125000" expanded="true" signature="1430:1473" ph="select * fro... user" />
+ <marker date="1507622125000" expanded="true" signature="1550:1596" ph="UPDATE `user... " />
+ <marker date="1507622125000" expanded="true" signature="1745:1807" ph="select * fro... equipment" />
+ <marker date="1507622125000" expanded="true" signature="2793:2831" ph="select * fro... equipment" />
+ <marker date="1507622125000" expanded="true" signature="2958:2991" ph="select * fro... user" />
+ </folding>
</state>
</provider>
</entry>
@@ -44,6 +76,9 @@
<findStrings>
<find>javax.servlet</find>
<find>monitor</find>
+ <find>selectFromequipmentByinstaller</find>
+ <find>insertIntoequipment</find>
+ <find>updateFromequipmentBymac</find>
</findStrings>
</component>
<component name="Git.Settings">
@@ -103,7 +138,6 @@
</navigator>
<panes>
<pane id="Scratches" />
- <pane id="PackagesPane" />
<pane id="ProjectPane">
<subPane>
<expand>
@@ -146,12 +180,28 @@
<item name="monitor" type="462c0819:PsiDirectoryNode" />
<item name="controller" type="462c0819:PsiDirectoryNode" />
</path>
+ <path>
+ <item name="task" type="b2602c69:ProjectViewProjectNode" />
+ <item name="task" type="462c0819:PsiDirectoryNode" />
+ <item name="src" type="462c0819:PsiDirectoryNode" />
+ <item name="main" type="462c0819:PsiDirectoryNode" />
+ <item name="resources" type="462c0819:PsiDirectoryNode" />
+ </path>
+ <path>
+ <item name="task" type="b2602c69:ProjectViewProjectNode" />
+ <item name="task" type="462c0819:PsiDirectoryNode" />
+ <item name="src" type="462c0819:PsiDirectoryNode" />
+ <item name="main" type="462c0819:PsiDirectoryNode" />
+ <item name="resources" type="462c0819:PsiDirectoryNode" />
+ <item name="mapper" type="462c0819:PsiDirectoryNode" />
+ </path>
</expand>
<select />
</subPane>
</pane>
- <pane id="Scope" />
<pane id="AndroidView" />
+ <pane id="PackagesPane" />
+ <pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
@@ -373,7 +423,9 @@
<workItem from="1508491332601" duration="106000" />
<workItem from="1508811045436" duration="651000" />
<workItem from="1508811839440" duration="1908000" />
- <workItem from="1508814020720" duration="1636000" />
+ <workItem from="1508814020720" duration="1887000" />
+ <workItem from="1508824129641" duration="250000" />
+ <workItem from="1508824729673" duration="470000" />
</task>
<task id="LOCAL-00001" summary="updates">
<created>1508484578874</created>
@@ -438,21 +490,65 @@
<option name="project" value="LOCAL" />
<updated>1508815333934</updated>
</task>
- <option name="localTasksCounter" value="10" />
+ <task id="LOCAL-00010" summary="updates">
+ <created>1508816385719</created>
+ <option name="number" value="00010" />
+ <option name="presentableId" value="LOCAL-00010" />
+ <option name="project" value="LOCAL" />
+ <updated>1508816385719</updated>
+ </task>
+ <option name="localTasksCounter" value="11" />
<servers />
</component>
<component name="TimeTrackingManager">
- <option name="totallyTimeSpent" value="9863000" />
+ <option name="totallyTimeSpent" value="10834000" />
</component>
<component name="ToolWindowManager">
- <frame x="-6" y="23" width="1404" height="877" extended-state="6" />
+ <frame x="0" y="23" width="1404" height="877" extended-state="6" />
<layout>
<window_info id="Palette" 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="3" side_tool="false" content_ui="tabs" />
+ <window_info id="TODO" 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="9" side_tool="false" content_ui="tabs" />
+ <window_info id="Palette	" 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="8" side_tool="false" content_ui="tabs" />
+ <window_info id="Image Layers" 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="7" side_tool="false" content_ui="tabs" />
+ <window_info id="Java Enterprise" 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="13" side_tool="false" content_ui="tabs" />
+ <window_info id="Capture Analysis" 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="6" side_tool="false" content_ui="tabs" />
+ <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.32992327" sideWeight="0.50293684" 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.32992327" 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.6662404" sideWeight="0.49706313" 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="false" show_stripe_button="true" weight="0.32992327" sideWeight="0.48237884" order="10" 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.18795888" 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.25" 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.4" 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="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" />
+ <window_info id="Hierarchy" 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="2" side_tool="false" content_ui="combo" />
+ <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32992327" sideWeight="0.49706313" order="1" side_tool="false" content_ui="tabs" />
+ <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
+ <window_info id="Find" 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="5" side_tool="false" content_ui="tabs" />
+ </layout>
+ <layout-to-restore>
+ <window_info id="Palette" 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="3" 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" />
<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.32992327" sideWeight="0.50293684" 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.32992327" 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="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="Hierarchy" 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="2" side_tool="false" content_ui="combo" />
<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.25" 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" />
@@ -464,21 +560,17 @@
<window_info id="Image Layers" 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="7" side_tool="false" content_ui="tabs" />
<window_info id="Java Enterprise" 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="13" side_tool="false" content_ui="tabs" />
<window_info id="Capture Analysis" 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="6" side_tool="false" content_ui="tabs" />
+ <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="7" 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.6662404" sideWeight="0.49706313" 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="false" show_stripe_button="true" weight="0.32992327" sideWeight="0.48237884" order="10" 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="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.18795888" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.18795888" 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="Find" 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="5" 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="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="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" />
- <window_info id="Hierarchy" 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="2" side_tool="false" content_ui="combo" />
- <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
- <window_info id="Find" 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="5" side_tool="false" content_ui="tabs" />
- </layout>
+ </layout-to-restore>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
@@ -523,11 +615,38 @@
<watches-manager />
</component>
<component name="editorHistoryManager">
+ <entry file="file://$PROJECT_DIR$/src/main/java/com/moral/monitor/entity/Equipment.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="330">
+ <caret line="22" column="28" lean-forward="false" selection-start-line="22" selection-start-column="19" selection-end-line="22" selection-end-column="28" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/src/main/resources/mapper/ApiDao.xml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="645">
+ <caret line="43" column="51" lean-forward="false" selection-start-line="43" selection-start-column="42" selection-end-line="43" selection-end-column="51" />
+ <folding>
+ <marker date="1507622125000" expanded="true" signature="339:380" ph="select * fro... equipment" />
+ <marker date="1507622125000" expanded="true" signature="449:562" ph="UPDATE equip... " />
+ <marker date="1507622125000" expanded="true" signature="627:769" ph="INSERT INTO equipment... " />
+ <marker date="1507622125000" expanded="true" signature="908:969" ph="SELECT * fro... user" />
+ <marker date="1507622125000" expanded="true" signature="1107:1162" ph="SELECT * fro... user" />
+ <marker date="1507622125000" expanded="true" signature="1224:1271" ph="UPDATE `user... " />
+ <marker date="1507622125000" expanded="true" signature="1430:1473" ph="select * fro... user" />
+ <marker date="1507622125000" expanded="true" signature="1550:1596" ph="UPDATE `user... " />
+ <marker date="1507622125000" expanded="true" signature="1745:1807" ph="select * fro... equipment" />
+ <marker date="1507622125000" expanded="true" signature="2793:2831" ph="select * fro... equipment" />
+ <marker date="1507622125000" expanded="true" signature="2958:2991" ph="select * fro... user" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/moral/monitor/listener/message/Captcha.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="150">
<caret line="17" column="45" lean-forward="false" selection-start-line="17" selection-start-column="39" selection-end-line="17" selection-end-column="45" />
- <folding />
</state>
</provider>
</entry>
@@ -615,13 +734,6 @@
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/main/java/com/moral/monitor/dao/ApiDao.java">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="120">
- <caret line="14" column="17" lean-forward="false" selection-start-line="14" selection-start-column="17" selection-end-line="14" selection-end-column="17" />
- </state>
- </provider>
- </entry>
<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="104">
@@ -632,13 +744,6 @@
<entry file="file://$PROJECT_DIR$/src/main/webapp/bootbox/bootbox.min.js">
<provider selected="true" editor-type-id="text-editor">
<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" />
- </state>
- </provider>
- </entry>
- <entry file="file://$PROJECT_DIR$/src/main/resources/mapper/ApiDao.xml">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="-1052">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
@@ -829,20 +934,10 @@
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/main/java/com/moral/monitor/service/ApiService.java">
- <provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="495">
- <caret line="43" column="31" lean-forward="false" selection-start-line="43" selection-start-column="31" selection-end-line="43" selection-end-column="31" />
- </state>
- </provider>
- </entry>
<entry file="file://$PROJECT_DIR$/src/test/java/Test.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="150">
<caret line="10" column="0" lean-forward="false" selection-start-line="10" selection-start-column="0" selection-end-line="10" selection-end-column="0" />
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
</state>
</provider>
</entry>
@@ -850,7 +945,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="345">
<caret line="30" column="44" lean-forward="false" selection-start-line="30" selection-start-column="44" selection-end-line="30" selection-end-column="44" />
- <folding />
</state>
</provider>
</entry>
@@ -870,14 +964,58 @@
</state>
</provider>
</entry>
+ <entry file="file://$PROJECT_DIR$/src/main/java/com/moral/monitor/entity/Equipment.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="15">
+ <caret line="22" column="28" lean-forward="false" selection-start-line="22" selection-start-column="19" selection-end-line="22" selection-end-column="28" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/src/main/java/com/moral/monitor/dao/ApiDao.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="240">
+ <caret line="22" column="21" lean-forward="false" selection-start-line="22" selection-start-column="21" selection-end-line="22" selection-end-column="21" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/src/main/java/com/moral/monitor/service/ApiService.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="201">
+ <caret line="26" column="39" lean-forward="false" selection-start-line="26" selection-start-column="15" selection-end-line="26" selection-end-column="39" />
+ <folding />
+ </state>
+ </provider>
+ </entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/moral/monitor/controller/ApiController.java">
<provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="320">
- <caret line="250" column="61" lean-forward="false" selection-start-line="250" selection-start-column="61" selection-end-line="250" selection-end-column="61" />
+ <state relative-caret-position="229">
+ <caret line="71" column="47" lean-forward="false" selection-start-line="71" selection-start-column="23" selection-end-line="71" selection-end-column="47" />
<folding />
</state>
</provider>
</entry>
+ <entry file="file://$PROJECT_DIR$/src/main/resources/mapper/ApiDao.xml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="135">
+ <caret line="9" column="0" lean-forward="true" selection-start-line="9" selection-start-column="0" selection-end-line="9" selection-end-column="0" />
+ <folding>
+ <marker date="1507622125000" expanded="true" signature="339:380" ph="select * fro... equipment" />
+ <marker date="1507622125000" expanded="true" signature="449:562" ph="UPDATE equip... " />
+ <marker date="1507622125000" expanded="true" signature="627:769" ph="INSERT INTO equipment... " />
+ <marker date="1507622125000" expanded="true" signature="908:969" ph="SELECT * fro... user" />
+ <marker date="1507622125000" expanded="true" signature="1107:1162" ph="SELECT * fro... user" />
+ <marker date="1507622125000" expanded="true" signature="1224:1271" ph="UPDATE `user... " />
+ <marker date="1507622125000" expanded="true" signature="1430:1473" ph="select * fro... user" />
+ <marker date="1507622125000" expanded="true" signature="1550:1596" ph="UPDATE `user... " />
+ <marker date="1507622125000" expanded="true" signature="1745:1807" ph="select * fro... equipment" />
+ <marker date="1507622125000" expanded="true" signature="2793:2831" ph="select * fro... equipment" />
+ <marker date="1507622125000" expanded="true" signature="2958:2991" ph="select * fro... user" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
</component>
<component name="masterDetails">
<states>
diff --git a/src/main/java/com/moral/monitor/controller/ApiController.java b/src/main/java/com/moral/monitor/controller/ApiController.java
index 33ea1b9..ef4e3ad 100644
--- a/src/main/java/com/moral/monitor/controller/ApiController.java
+++ b/src/main/java/com/moral/monitor/controller/ApiController.java
@@ -45,13 +45,11 @@
@RequestParam(value ="mac") String mac ){
try {
- System.out.println("");
- System.out.println("");
- System.out.println("");
request.setCharacterEncoding("UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
+
//������������������������������
ApiData apiData = new ApiData();
if(StringUtils.isBlank(mac)){
@@ -61,37 +59,22 @@
return apiData;
}
-
+ if (StringUtils.isBlank(longitude)){ longitude="0"; }
+ if (StringUtils.isBlank(latitude)) { latitude="0"; }
Equipment equipment = apiService.selectFromequipmentBymac(mac);
- if (equipment==null){
- if (StringUtils.isBlank(longitude)){ longitude="0"; }
- if (StringUtils.isBlank(latitude)) { latitude="0"; }
- //������
+ if (equipment==null){ //������
apiService.insertIntoequipment(device_name,address,longitude,latitude,uid,mac);
apiData.setData("");
apiData.setMessage("������������������");
apiData.setErrno(0);
- return apiData;
-
- }
-
-
-
- //������
- if (!StringUtils.isBlank(mac)) {
-
- if (StringUtils.isBlank(longitude)){ longitude="0"; }
- if (StringUtils.isBlank(latitude)) { latitude="0"; }
-
+ } else { //������
apiService.updateFromequipmentBymac(device_name, address, longitude, latitude, uid, mac);
apiData.setData("");
apiData.setMessage("������������������");
apiData.setErrno(0);
- return apiData;
}
-
- return null;
+ return apiData;
}
--
Gitblit v1.8.0