fix delete forbiden
This commit is contained in:
289
server/OldPeopleHome/.idea/workspace.xml
generated
289
server/OldPeopleHome/.idea/workspace.xml
generated
@@ -6,7 +6,11 @@
|
||||
</artifacts-to-build>
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="6bd3ae69-d707-4556-9602-b04e8d55fbdd" name="Default Changelist" comment="" />
|
||||
<list default="true" id="6bd3ae69-d707-4556-9602-b04e8d55fbdd" name="Default Changelist" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/webapp/WEB-INF/web.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/WEB-INF/web.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/test/java/com/oldpeoplehome/service/ParentServiceTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/com/oldpeoplehome/service/ParentServiceTest.java" afterDir="false" />
|
||||
</list>
|
||||
<ignored path="$PROJECT_DIR$/target/" />
|
||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
@@ -28,8 +32,22 @@
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/webapp/WEB-INF/web.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1485">
|
||||
<caret line="45" column="29" selection-start-line="45" selection-start-column="29" selection-end-line="45" selection-end-column="29" />
|
||||
<state relative-caret-position="1372">
|
||||
<caret line="52" column="21" selection-start-line="52" selection-start-column="21" selection-end-line="52" selection-end-column="21" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/webapp/index.jsp">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/web/ParentController.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="213">
|
||||
<caret line="77" column="39" lean-forward="true" selection-start-line="77" selection-start-column="39" selection-end-line="77" selection-end-column="39" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@@ -37,7 +55,7 @@
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/utils/SimpleCORSFilter.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1155">
|
||||
<state relative-caret-position="481">
|
||||
<caret line="35" column="28" selection-start-line="35" selection-start-column="28" selection-end-line="35" selection-end-column="28" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
@@ -46,61 +64,43 @@
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/pom.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="321">
|
||||
<caret line="164" selection-start-line="164" selection-end-line="164" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/resources/spring/spring-web.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-14">
|
||||
<caret line="30" column="48" lean-forward="true" selection-start-line="30" selection-start-column="48" selection-end-line="30" selection-end-column="48" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/resources/mybatis-config.xml">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/pom.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="279">
|
||||
<caret line="164" selection-start-line="164" selection-end-line="164" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/resources/spring/spring-web.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="246">
|
||||
<caret line="32" selection-start-line="32" selection-end-line="32" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/entity/RoomState.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1518">
|
||||
<caret line="62" column="29" selection-start-line="62" selection-start-column="29" selection-end-line="62" selection-end-column="29" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/entity/Parent.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="4290">
|
||||
<caret line="194" column="21" selection-start-line="194" selection-start-column="16" selection-end-line="194" selection-end-column="21" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/test/java/com/oldpeoplehome/dao/ParentDaoTest.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1056">
|
||||
<caret line="53" column="37" selection-start-line="53" selection-start-column="37" selection-end-line="53" selection-end-column="37" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/test/java/com/oldpeoplehome/service/ParentServiceTest.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="594">
|
||||
<caret line="23" column="37" selection-start-line="23" selection-start-column="37" selection-end-line="23" selection-end-column="37" />
|
||||
<state relative-caret-position="319">
|
||||
<caret line="36" column="25" lean-forward="true" selection-start-line="36" selection-start-column="25" selection-end-line="36" selection-end-column="25" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/service/ParentService.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="383">
|
||||
<caret line="19" column="9" selection-start-line="19" selection-start-column="9" selection-end-line="19" selection-end-column="9" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@@ -187,14 +187,14 @@
|
||||
<option value="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/utils/MethodUtil.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/web/ParentController.java" />
|
||||
<option value="$PROJECT_DIR$/src/test/java/com/oldpeoplehome/dao/ParentDaoTest.java" />
|
||||
<option value="$PROJECT_DIR$/src/test/java/com/oldpeoplehome/service/ParentServiceTest.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/entity/Parent.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/entity/Room.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/entity/Child.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/webapp/WEB-INF/web.xml" />
|
||||
<option value="$PROJECT_DIR$/src/main/resources/spring/spring-web.xml" />
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/utils/SimpleCORSFilter.java" />
|
||||
<option value="$PROJECT_DIR$/src/test/java/com/oldpeoplehome/service/ParentServiceTest.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/webapp/WEB-INF/web.xml" />
|
||||
<option value="$PROJECT_DIR$/src/main/resources/jdbc.properties" />
|
||||
</list>
|
||||
</option>
|
||||
@@ -213,11 +213,11 @@
|
||||
</MavenImportingSettings>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectFrameBounds" extendedState="6">
|
||||
<option name="x" value="1911" />
|
||||
<option name="y" value="-9" />
|
||||
<option name="width" value="1938" />
|
||||
<option name="height" value="1048" />
|
||||
<component name="ProjectFrameBounds" extendedState="7">
|
||||
<option name="x" value="-10" />
|
||||
<option name="y" value="-10" />
|
||||
<option name="width" value="1939" />
|
||||
<option name="height" value="1049" />
|
||||
</component>
|
||||
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
||||
<component name="ProjectView">
|
||||
@@ -258,6 +258,15 @@
|
||||
<item name="java" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="oldpeoplehome" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="OldPeopleHome" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="OldPeopleHome" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="main" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="java" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="oldpeoplehome" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="utils" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="OldPeopleHome" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="OldPeopleHome" type="462c0819:PsiDirectoryNode" />
|
||||
@@ -265,6 +274,14 @@
|
||||
<item name="main" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="resources" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="OldPeopleHome" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="OldPeopleHome" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="main" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="resources" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="spring" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="OldPeopleHome" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="OldPeopleHome" type="462c0819:PsiDirectoryNode" />
|
||||
@@ -287,18 +304,29 @@
|
||||
<item name="webapp" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="WEB-INF" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="OldPeopleHome" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="OldPeopleHome" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="test" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="OldPeopleHome" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="OldPeopleHome" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="target" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
</expand>
|
||||
<select />
|
||||
</subPane>
|
||||
</pane>
|
||||
<pane id="Scope" />
|
||||
<pane id="PackagesPane" />
|
||||
<pane id="Scope" />
|
||||
</panes>
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||
<property name="aspect.path.notification.shown" value="true" />
|
||||
<property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1568018392902" />
|
||||
<property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1568104358041" />
|
||||
<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" />
|
||||
@@ -327,22 +355,6 @@
|
||||
</option>
|
||||
</component>
|
||||
<component name="RunManager" selected="Tomcat Server.chuizichui">
|
||||
<configuration name="AdminServiceTest.testLogin" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
|
||||
<module name="OldPeopleHome" />
|
||||
<extension name="coverage">
|
||||
<pattern>
|
||||
<option name="PATTERN" value="com.oldpeoplehome.service.*" />
|
||||
<option name="ENABLED" value="true" />
|
||||
</pattern>
|
||||
</extension>
|
||||
<option name="PACKAGE_NAME" value="com.oldpeoplehome.service" />
|
||||
<option name="MAIN_CLASS_NAME" value="com.oldpeoplehome.service.AdminServiceTest" />
|
||||
<option name="METHOD_NAME" value="testLogin" />
|
||||
<option name="TEST_OBJECT" value="method" />
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="ChildParentServiceTest.test" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
|
||||
<module name="OldPeopleHome" />
|
||||
<extension name="coverage">
|
||||
@@ -391,6 +403,22 @@
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="ParentServiceTest.delete" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
|
||||
<module name="OldPeopleHome" />
|
||||
<extension name="coverage">
|
||||
<pattern>
|
||||
<option name="PATTERN" value="com.oldpeoplehome.service.*" />
|
||||
<option name="ENABLED" value="true" />
|
||||
</pattern>
|
||||
</extension>
|
||||
<option name="PACKAGE_NAME" value="com.oldpeoplehome.service" />
|
||||
<option name="MAIN_CLASS_NAME" value="com.oldpeoplehome.service.ParentServiceTest" />
|
||||
<option name="METHOD_NAME" value="delete" />
|
||||
<option name="TEST_OBJECT" value="method" />
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="RoomServiceTest.test" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
|
||||
<module name="OldPeopleHome" />
|
||||
<extension name="coverage">
|
||||
@@ -482,19 +510,19 @@
|
||||
</configuration>
|
||||
<list>
|
||||
<item itemvalue="JUnit.HeartRateServiceTest.test" />
|
||||
<item itemvalue="JUnit.AdminServiceTest.testLogin" />
|
||||
<item itemvalue="JUnit.ChildParentServiceTest.test" />
|
||||
<item itemvalue="JUnit.LocationServiceTest.test" />
|
||||
<item itemvalue="JUnit.RoomServiceTest.test" />
|
||||
<item itemvalue="Tomcat Server.chuizichui" />
|
||||
<item itemvalue="JUnit.ParentServiceTest.delete" />
|
||||
</list>
|
||||
<recent_temporary>
|
||||
<list>
|
||||
<item itemvalue="JUnit.ParentServiceTest.delete" />
|
||||
<item itemvalue="JUnit.RoomServiceTest.test" />
|
||||
<item itemvalue="JUnit.LocationServiceTest.test" />
|
||||
<item itemvalue="JUnit.ChildParentServiceTest.test" />
|
||||
<item itemvalue="JUnit.HeartRateServiceTest.test" />
|
||||
<item itemvalue="JUnit.AdminServiceTest.testLogin" />
|
||||
</list>
|
||||
</recent_temporary>
|
||||
</component>
|
||||
@@ -538,14 +566,12 @@
|
||||
<workItem from="1567824861214" duration="7220000" />
|
||||
<workItem from="1567907291757" duration="5874000" />
|
||||
<workItem from="1567991841988" duration="1149000" />
|
||||
<workItem from="1568017526948" duration="1025000" />
|
||||
<workItem from="1568017526948" duration="1787000" />
|
||||
<workItem from="1568101339445" duration="2643000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TestHistory">
|
||||
<history-entry file="LocationServiceTest_test - 2019.09.06 at 13h 41m 32s.xml">
|
||||
<configuration name="LocationServiceTest.test" configurationId="JUnit" />
|
||||
</history-entry>
|
||||
<history-entry file="LocationServiceTest_test - 2019.09.06 at 13h 45m 31s.xml">
|
||||
<configuration name="LocationServiceTest.test" configurationId="JUnit" />
|
||||
</history-entry>
|
||||
@@ -573,9 +599,12 @@
|
||||
<history-entry file="RoomServiceTest_test - 2019.09.07 at 11h 12m 55s.xml">
|
||||
<configuration name="RoomServiceTest.test" configurationId="JUnit" />
|
||||
</history-entry>
|
||||
<history-entry file="ParentServiceTest_delete - 2019.09.10 at 15h 51m 27s.xml">
|
||||
<configuration name="ParentServiceTest.delete" configurationId="JUnit" />
|
||||
</history-entry>
|
||||
</component>
|
||||
<component name="TimeTrackingManager">
|
||||
<option name="totallyTimeSpent" value="161421000" />
|
||||
<option name="totallyTimeSpent" value="164826000" />
|
||||
</component>
|
||||
<component name="TodoView">
|
||||
<todo-panel id="selected-file">
|
||||
@@ -587,10 +616,10 @@
|
||||
</todo-panel>
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="1913" y="-7" width="1550" height="838" extended-state="6" />
|
||||
<frame x="-7" y="-7" width="1550" height="838" extended-state="7" />
|
||||
<editor active="true" />
|
||||
<layout>
|
||||
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.24597855" />
|
||||
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.24932976" />
|
||||
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
|
||||
<window_info id="Designer" order="2" />
|
||||
<window_info id="Image Layers" order="3" />
|
||||
@@ -664,13 +693,6 @@
|
||||
<option name="version" value="1" />
|
||||
</component>
|
||||
<component name="editorHistoryManager">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/resources/mapper/AdminDao.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="363">
|
||||
<caret line="11" column="42" selection-start-line="11" selection-start-column="42" selection-end-line="11" selection-end-column="42" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/resources/mapper/ChildDao.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="858">
|
||||
@@ -814,13 +836,6 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/web/RoomStateController.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="129">
|
||||
<caret line="20" column="13" selection-start-line="20" selection-start-column="13" selection-end-line="20" selection-end-column="13" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/web/MotionController.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1551">
|
||||
@@ -875,13 +890,6 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/service/ParentService.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="429">
|
||||
<caret line="15" column="11" selection-start-line="15" selection-start-column="11" selection-end-line="15" selection-end-column="33" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/service/RoomService.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="359">
|
||||
@@ -968,13 +976,6 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/web/ParentController.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1287">
|
||||
<caret line="58" column="75" selection-start-line="58" selection-start-column="75" selection-end-line="58" selection-end-column="75" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/entity/Room.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="2244">
|
||||
@@ -1016,47 +1017,44 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/entity/Parent.java">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/web/RoomStateController.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="4290">
|
||||
<caret line="194" column="21" selection-start-line="194" selection-start-column="16" selection-end-line="194" selection-end-column="21" />
|
||||
<state relative-caret-position="129">
|
||||
<caret line="20" column="13" selection-start-line="20" selection-start-column="13" selection-end-line="20" selection-end-column="13" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/test/java/com/oldpeoplehome/dao/ParentDaoTest.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1056">
|
||||
<state relative-caret-position="1038">
|
||||
<caret line="53" column="37" selection-start-line="53" selection-start-column="37" selection-end-line="53" selection-end-column="37" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/test/java/com/oldpeoplehome/service/ParentServiceTest.java">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/entity/Parent.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="594">
|
||||
<caret line="23" column="37" selection-start-line="23" selection-start-column="37" selection-end-line="23" selection-end-column="37" />
|
||||
<state relative-caret-position="590">
|
||||
<caret line="194" column="21" selection-start-line="194" selection-start-column="16" selection-end-line="194" selection-end-column="21" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/pom.xml">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/service/ParentService.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="279">
|
||||
<caret line="164" selection-start-line="164" selection-end-line="164" />
|
||||
<state relative-caret-position="383">
|
||||
<caret line="19" column="9" selection-start-line="19" selection-start-column="9" selection-end-line="19" selection-end-column="9" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/webapp/WEB-INF/web.xml">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/web/ParentController.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1485">
|
||||
<caret line="45" column="29" selection-start-line="45" selection-start-column="29" selection-end-line="45" selection-end-column="29" />
|
||||
<state relative-caret-position="213">
|
||||
<caret line="77" column="39" lean-forward="true" selection-start-line="77" selection-start-column="39" selection-end-line="77" selection-end-column="39" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/resources/mybatis-config.xml">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/utils/SimpleCORSFilter.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1155">
|
||||
<state relative-caret-position="481">
|
||||
<caret line="35" column="28" selection-start-line="35" selection-start-column="28" selection-end-line="35" selection-end-column="28" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
@@ -1064,10 +1062,37 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/resources/mybatis-config.xml">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/webapp/index.jsp">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/resources/spring/spring-web.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="246">
|
||||
<caret line="32" selection-start-line="32" selection-end-line="32" />
|
||||
<state relative-caret-position="-14">
|
||||
<caret line="30" column="48" lean-forward="true" selection-start-line="30" selection-start-column="48" selection-end-line="30" selection-end-column="48" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/pom.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="321">
|
||||
<caret line="164" selection-start-line="164" selection-end-line="164" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/webapp/WEB-INF/web.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1372">
|
||||
<caret line="52" column="21" selection-start-line="52" selection-start-column="21" selection-end-line="52" selection-end-column="21" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/test/java/com/oldpeoplehome/service/ParentServiceTest.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="319">
|
||||
<caret line="36" column="25" lean-forward="true" selection-start-line="36" selection-start-column="25" selection-end-line="36" selection-end-column="25" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
<param-value>true</param-value>
|
||||
</init-param>
|
||||
</filter>
|
||||
|
||||
<filter-mapping>
|
||||
<filter-name>SpringEncodingFilter</filter-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
|
||||
@@ -32,4 +32,9 @@ public class ParentServiceTest extends BaseTest {
|
||||
System.out.println(parentService.findByLongId("a"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void delete(){
|
||||
parentService.delete(Long.valueOf(22));
|
||||
System.out.println(parentService.findAll());
|
||||
}
|
||||
}
|
||||
|
||||
BIN
server/OldPeopleHome/target/OldPeopleHome.war
Normal file
BIN
server/OldPeopleHome/target/OldPeopleHome.war
Normal file
Binary file not shown.
@@ -0,0 +1,5 @@
|
||||
Manifest-Version: 1.0
|
||||
Built-By: Jiangyuwei
|
||||
Created-By: IntelliJ IDEA
|
||||
Build-Jdk: 1.8.0_161
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,4 @@
|
||||
jdbc.driver=com.mysql.jdbc.Driver
|
||||
jdbc.url=jdbc:mysql://localhost:3306/ssmtest?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
|
||||
jdbc.username=root
|
||||
jdbc.password=root
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration debug="true">
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<!-- encoders are by default assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
|
||||
<encoder>
|
||||
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<root level="debug">
|
||||
<appender-ref ref="STDOUT" />
|
||||
</root>
|
||||
</configuration>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.oldpeoplehome.dao.AdminDao">
|
||||
<resultMap id="BaseResultMap" type="com.oldpeoplehome.entity.Admin">
|
||||
<result column="account" property="adminAccount" jdbcType="VARCHAR"/>
|
||||
<result column="password" property="adminPassword" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="findByAccount" resultMap="BaseResultMap" parameterType="String">
|
||||
select * from admin where account=#{account}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.oldpeoplehome.dao.ChildDao">
|
||||
<resultMap id="BaseResultMap" type="com.oldpeoplehome.entity.Child">
|
||||
<id column="id" property="childId" jdbcType="BIGINT"/>
|
||||
<result column="longid" property="childLongId" jdbcType="CHAR"/>
|
||||
<result column="name" property="childName" jdbcType="VARCHAR"/>
|
||||
<result column="sex" property="childSex" jdbcType="VARCHAR"/>
|
||||
<result column="account" property="childAccount" jdbcType="VARCHAR"/>
|
||||
<result column="password" property="childPassword" jdbcType="VARCHAR"/>
|
||||
<result column="phone" property="childPhone" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="findById" resultMap="BaseResultMap" parameterType="long">
|
||||
select * from child where id = #{childId}
|
||||
</select>
|
||||
<select id="findByLongId" resultMap="BaseResultMap" parameterType="String">
|
||||
select * from child where longid = #{childLongId}
|
||||
</select>
|
||||
<select id="findByName" resultMap="BaseResultMap" parameterType="String">
|
||||
select * from child where name = #{childName}
|
||||
</select>
|
||||
<select id="findByAccount" parameterType="String" resultMap="BaseResultMap">
|
||||
select * from child where account = #{childAccount}
|
||||
</select>
|
||||
<select id="findAll" resultMap="BaseResultMap">
|
||||
select * from child
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insert" useGeneratedKeys="true" keyColumn="id" keyProperty="childId" parameterType="Child">
|
||||
insert into child(longid,name,sex,account,password,phone)
|
||||
values (#{childLongId},#{childName},#{childSex},#{childAccount},#{childPassword},#{childPhone})
|
||||
</insert>
|
||||
|
||||
<delete id="delete" parameterType="long">
|
||||
delete from child where id = #{childId}
|
||||
</delete>
|
||||
|
||||
<update id="update" parameterType="Child">
|
||||
update child
|
||||
set longid = #{childLongId},
|
||||
name = #{childName},
|
||||
sex = #{childSex},
|
||||
account = #{childAccount},
|
||||
password = #{childPassword},
|
||||
phone = #{childPhone}
|
||||
where id =#{childId}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.oldpeoplehome.dao.ChildParentDao">
|
||||
<resultMap id="ParentResultMap" type="com.oldpeoplehome.entity.Parent">
|
||||
<id column="id" property="parentId" jdbcType="BIGINT"/>
|
||||
<result column="longid" property="parentLongId" jdbcType="CHAR"/>
|
||||
<result column="name" property="parentName" jdbcType="VARCHAR"/>
|
||||
<result column="sex" property="parentSex" jdbcType="VARCHAR"/>
|
||||
<result column="account" property="parentAccount" jdbcType="VARCHAR"/>
|
||||
<result column="password" property="parentPassword" jdbcType="VARCHAR"/>
|
||||
<result column="height" property="parentHeight" jdbcType="DOUBLE"/>
|
||||
<result column="weight" property="parentWeight" jdbcType="DOUBLE"/>
|
||||
<result column="birth" property="parentBirth" jdbcType="DATE"/>
|
||||
<result column="phone" property="parentPhone" jdbcType="CHAR"/>
|
||||
<association property="child" javaType="Child">
|
||||
<id column="cid" property="childId" jdbcType="BIGINT"/>
|
||||
<result column="clongid" property="childLongId" jdbcType="CHAR"/>
|
||||
<result column="cname" property="childName" jdbcType="VARCHAR"/>
|
||||
<result column="csex" property="childSex" jdbcType="VARCHAR"/>
|
||||
<result column="caccount" property="childAccount" jdbcType="VARCHAR"/>
|
||||
<result column="cpassword" property="childPassword" jdbcType="VARCHAR"/>
|
||||
<result column="cphone" property="childPhone" jdbcType="VARCHAR"/>
|
||||
</association>
|
||||
</resultMap>
|
||||
<resultMap id="ChildResultMap" type="com.oldpeoplehome.entity.Child">
|
||||
<id column="id" property="childId" jdbcType="BIGINT"/>
|
||||
<result column="longid" property="childLongId" jdbcType="CHAR"/>
|
||||
<result column="name" property="childName" jdbcType="VARCHAR"/>
|
||||
<result column="sex" property="childSex" jdbcType="VARCHAR"/>
|
||||
<result column="account" property="childAccount" jdbcType="VARCHAR"/>
|
||||
<result column="password" property="childPassword" jdbcType="VARCHAR"/>
|
||||
<result column="phone" property="childPhone" jdbcType="VARCHAR"/>
|
||||
<association property="parent" javaType="Parent">
|
||||
<id column="pid" property="parentId" jdbcType="BIGINT"/>
|
||||
<result column="plongid" property="parentLongId" jdbcType="CHAR"/>
|
||||
<result column="pname" property="parentName" jdbcType="VARCHAR"/>
|
||||
<result column="psex" property="parentSex" jdbcType="VARCHAR"/>
|
||||
<result column="paccount" property="parentAccount" jdbcType="VARCHAR"/>
|
||||
<result column="ppassword" property="parentPassword" jdbcType="VARCHAR"/>
|
||||
<result column="pheight" property="parentHeight" jdbcType="DOUBLE"/>
|
||||
<result column="pweight" property="parentWeight" jdbcType="DOUBLE"/>
|
||||
<result column="pbirth" property="parentBirth" jdbcType="DATE"/>
|
||||
<result column="pphone" property="parentPhone" jdbcType="CHAR"/>
|
||||
</association>
|
||||
</resultMap>
|
||||
<select id="findByChild" resultMap="ParentResultMap" parameterType="long">
|
||||
select c.*, p.* from cp c left join parent p on c.pid = p.id where c.cid = #{childId}
|
||||
</select>
|
||||
<select id="findByParent" resultMap="ChildResultMap" parameterType="long">
|
||||
select c.*, p.* from cp c left join child p on c.pid = p.id where c.pid = #{parentId}
|
||||
</select>
|
||||
<insert id="insert" parameterType="ChildParent">
|
||||
insert into cp(pid, cid, relation)
|
||||
values (#{parentId}, #{childId}, #{relation})
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.oldpeoplehome.dao.HeartRateDao">
|
||||
<resultMap id="BaseResultMap" type="com.oldpeoplehome.entity.HeartRate">
|
||||
<id column="pid" property="parentId" jdbcType="BIGINT"/>
|
||||
<result column="time" property="time" jdbcType="TIMESTAMP"/>
|
||||
<result column="rate" property="rate" jdbcType="DOUBLE"/>
|
||||
<result column="rate1" property="rate1" jdbcType="DOUBLE"/>
|
||||
<result column="rate2" property="rate2" jdbcType="DOUBLE"/>
|
||||
<result column="oxy" property="oxy" jdbcType="DOUBLE"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="findByParent" resultMap="BaseResultMap" parameterType="com.oldpeoplehome.dto.HeartRateFilter">
|
||||
select *
|
||||
from heartrate where pid = #{parentId}
|
||||
</select>
|
||||
<select id="findByTime" resultMap="BaseResultMap" parameterType="com.oldpeoplehome.dto.HeartRateFilter">
|
||||
select *
|
||||
from heartrate where pid = #{parentId} and DATE_FORMAT(date,'%Y-%m-%d %T') between #{startDate} and #{endDate}
|
||||
</select>
|
||||
<select id="findByParentAndTime" resultMap="BaseResultMap" parameterType="com.oldpeoplehome.dto.HeartRateFilter">
|
||||
select h.*, p.* from heartrate h left join parent p on h.pid = p.id where h.pid = #{parentId} and h.date = #{startDate}
|
||||
</select>
|
||||
<insert id="insert" parameterType="HeartRate">
|
||||
insert into heartrate(pid, time,rate, rate1,rate2,oxy)
|
||||
values (#{parentId}, #{time},#{rate}, #{rate1}, #{rate2}, #{oxy})
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.oldpeoplehome.dao.LocationDao">
|
||||
<resultMap id="BaseResultMap" type="com.oldpeoplehome.entity.Location">
|
||||
<id column="pid" property="parentId" jdbcType="BIGINT"/>
|
||||
<result column="longitude" property="longitude" jdbcType="BIGINT"/>
|
||||
<result column="latitude" property="latitude" jdbcType="BIGINT"/>
|
||||
<result column="time" property="time" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="findByParent" resultMap="BaseResultMap" parameterType="com.oldpeoplehome.dto.LocationFilter">
|
||||
select *
|
||||
from location where pid = #{parentId}
|
||||
</select>
|
||||
<select id="findByTime" resultMap="BaseResultMap" parameterType="com.oldpeoplehome.dto.LocationFilter">
|
||||
select *
|
||||
from location where pid = #{parentId} and DATE_FORMAT(time,'%Y-%m-%d %T') between #{startTime} and #{endTime}
|
||||
</select>
|
||||
<select id="findByParentAndTime" resultMap="BaseResultMap" parameterType="com.oldpeoplehome.dto.LocationFilter">
|
||||
select l.*, p.* from location l left join parent p on l.pid = p.id where l.pid = #{parentId} and l.date = #{startTime}
|
||||
</select>
|
||||
<insert id="insert" parameterType="Location">
|
||||
insert into location(pid, longitude,latitude, time)
|
||||
values (#{parentId}, #{longitude},#{latitude}, #{time})
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.oldpeoplehome.dao.MotionDao">
|
||||
<resultMap id="BaseResultMap" type="com.oldpeoplehome.entity.Motion">
|
||||
<id column="pid" property="motionParentId" jdbcType="BIGINT"/>
|
||||
<result column="date" property="motionDate" jdbcType="DATE"/>
|
||||
<result column="count" property="motionCount" jdbcType="BIGINT"/>
|
||||
<result column="distance" property="motionDistance" jdbcType="DOUBLE"/>
|
||||
<result column="energy" property="motionEnergy" jdbcType="DOUBLE"/>
|
||||
<result column="time" property="motionTime" jdbcType="TIME"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="findByParentId" resultMap="BaseResultMap" parameterType="com.oldpeoplehome.dto.MotionFilter">
|
||||
select m.*
|
||||
from motion m where pid = #{motionParentId}
|
||||
</select>
|
||||
<select id="findByDate" resultMap="BaseResultMap" parameterType="com.oldpeoplehome.dto.MotionFilter">
|
||||
select *
|
||||
from motion where pid = #{motionParentId} and DATE_FORMAT(date,'%Y-%m-%d') between #{startDate} and #{endDate}
|
||||
</select>
|
||||
<select id="findByParentIdAndDate" resultMap="BaseResultMap" parameterType="com.oldpeoplehome.dto.MotionFilter">
|
||||
select m.*, p.* from motion m left join parent p on m.pid = p.id where m.pid = #{motionParentId} and m.date = #{startDate}
|
||||
</select>
|
||||
<insert id="insert" parameterType="Motion">
|
||||
insert into motion(pid, date, count, distance, energy, time)
|
||||
values (#{motionParentId}, #{motionDate}, #{motionCount}, #{motionDistance}, #{motionEnergy}, #{motionTime})
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.oldpeoplehome.dao.ParentDao">
|
||||
<resultMap id="BaseResultMap" type="com.oldpeoplehome.entity.Parent">
|
||||
<id column="id" property="parentId" jdbcType="BIGINT"/>
|
||||
<result column="longid" property="parentLongId" jdbcType="CHAR"/>
|
||||
<result column="name" property="parentName" jdbcType="VARCHAR"/>
|
||||
<result column="sex" property="parentSex" jdbcType="VARCHAR"/>
|
||||
<result column="account" property="parentAccount" jdbcType="VARCHAR"/>
|
||||
<result column="password" property="parentPassword" jdbcType="VARCHAR"/>
|
||||
<result column="height" property="parentHeight" jdbcType="DOUBLE"/>
|
||||
<result column="weight" property="parentWeight" jdbcType="DOUBLE"/>
|
||||
<result column="birth" property="parentBirth" jdbcType="DATE"/>
|
||||
<result column="phone" property="parentPhone" jdbcType="CHAR"/>
|
||||
<association property="parentRoom" javaType="Room">
|
||||
<id column="rid" property="roomId" jdbcType="INTEGER"/>
|
||||
<result column="rlocation" property="roomLocation" jdbcType="VARCHAR"/>
|
||||
<result column="rname" property="roomName" jdbcType="VARCHAR"/>
|
||||
</association>
|
||||
</resultMap>
|
||||
|
||||
<select id="findByID" parameterType="long" resultMap="BaseResultMap">
|
||||
select p.*,r.id rid,r.name rname, r.location rlocation from parent p left join room r on p.id=r.id where p.id=#{parentId}
|
||||
</select>
|
||||
<select id="findByLongId" parameterType="String" resultMap="BaseResultMap">
|
||||
select p.*,r.id rid,r.name rname, r.location rlocation from parent p left join room r on p.id=r.id where p.longid=#{parentLongId}
|
||||
</select>
|
||||
<select id="findByRoomId" parameterType="int" resultMap="BaseResultMap">
|
||||
select p.*,r.id rid,r.name rname, r.location rlocation from room r left join parent p on p.id=r.id where r.id=#{r.roomId}
|
||||
</select>
|
||||
<select id="findByName" parameterType="String" resultMap="BaseResultMap">
|
||||
select p.*,r.id rid,r.name rname, r.location rlocation from parent p left join room r on p.id=r.id where p.name=#{p.parentName}
|
||||
</select>
|
||||
<select id="findByAccount" parameterType="String" resultMap="BaseResultMap">
|
||||
select p.*,r.id rid,r.name rname, r.location rlocation from parent p left join room r on p.id=r.id where p.account=#{p.parentAccount}
|
||||
</select>
|
||||
|
||||
<select id="findAll" resultMap="BaseResultMap">
|
||||
select p.*,r.id rid,r.name rname, r.location rlocation from parent p left join room r on p.id=r.id
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="Parent" useGeneratedKeys="true" keyColumn="id">
|
||||
insert into parent(longid,name,sex,account,password,height,weight,birth,phone)
|
||||
values (#{parentLongId}, #{parentName}, #{parentSex}, #{parentAccount}, #{parentPassword}, #{parentHeight}, #{parentWeight}, #{parentBirth}, #{parentPhone})
|
||||
</insert>
|
||||
|
||||
<update id="update" keyColumn="id">
|
||||
update parent
|
||||
set longid=#{parentLongId}, name=#{parentName}, sex=#{parentSex}, account=#{parentAccount}, password=#{parentPassword}, height=#{parentHeight}, weight=#{parentWeight}, birth=#{parentBirth}, phone=#{parentPhone}
|
||||
where id=#{parentId}
|
||||
</update>
|
||||
|
||||
<delete id="delete" parameterType="long">
|
||||
delete from parent where id=#{parentId}
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.oldpeoplehome.dao.RoomDao">
|
||||
<resultMap id="BaseResultMap" type="com.oldpeoplehome.entity.Room">
|
||||
<id column="id" property="roomId" jdbcType="INTEGER"/>
|
||||
<result column="location" property="roomLocation" jdbcType="VARCHAR"/>
|
||||
<result column="name" property="roomName" jdbcType="VARCHAR"/>
|
||||
<result column="pid" property="parentId" jdbcType="BIGINT"/>
|
||||
<result column="temp" property="temp" jdbcType="FLOAT"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="findById" resultMap="BaseResultMap" parameterType="int">
|
||||
select * from room where id = #{roomId}
|
||||
</select>
|
||||
|
||||
<select id="findAll" resultMap="BaseResultMap">
|
||||
select * from room
|
||||
</select>
|
||||
|
||||
<select id="findEmptyRoom" resultMap="BaseResultMap">
|
||||
select * from room where pid is null
|
||||
</select>
|
||||
|
||||
<insert id="insertRoom" useGeneratedKeys="true" keyColumn="id" keyProperty="roomId" parameterType="Room">
|
||||
insert into room(location, name) values (#{roomLocation}, #{roomName})
|
||||
</insert>
|
||||
|
||||
<delete id="deleteRoom" parameterType="int">
|
||||
delete from room where id = #{roomId}
|
||||
</delete>
|
||||
|
||||
<update id="updateRoom" parameterType="Room">
|
||||
update room
|
||||
set location = #{roomLocation},
|
||||
name = #{roomName},
|
||||
pid = #{parentId},
|
||||
temp = #{temp}
|
||||
where id =#{roomId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.oldpeoplehome.dao.RoomStateDao">
|
||||
<resultMap id="BaseResultMap" type="com.oldpeoplehome.entity.RoomState">
|
||||
<id column="rid" property="roomId" jdbcType="BIGINT"/>
|
||||
<result column="time" property="time" jdbcType="TIMESTAMP"/>
|
||||
<result column="temperature" property="temperature" jdbcType="DOUBLE"/>
|
||||
<result column="humidity" property="humidity" jdbcType="DOUBLE"/>
|
||||
<result column="isin" property="isin" jdbcType="INTEGER"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="findByRoom" resultMap="BaseResultMap" parameterType="com.oldpeoplehome.dto.RoomStateFilter">
|
||||
select *
|
||||
from rstate where rid = #{roomId}
|
||||
</select>
|
||||
<select id="findByTime" resultMap="BaseResultMap" parameterType="com.oldpeoplehome.dto.RoomStateFilter">
|
||||
select *
|
||||
from rstate where rid = #{roomId} and DATE_FORMAT(time,'%Y-%m-%d %H:%i:%s')between #{startDate} and #{endDate}
|
||||
</select>
|
||||
<select id="findByRoomAndTime" resultMap="BaseResultMap" parameterType="com.oldpeoplehome.dto.RoomStateFilter">
|
||||
select r.*, room.* from rstate r left join room on r.rid = room.id where r.rid = #{roomId} and r.time = #{startDate}
|
||||
</select>
|
||||
<insert id="insert" parameterType="RoomState">
|
||||
insert into rstate(rid, time, temperature, humidity, isin)
|
||||
values (#{roomId}, #{time}, #{temperature}, #{humidity}, #{isin})
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.oldpeoplehome.dao.SleepDao">
|
||||
<resultMap id="BaseResultMap" type="com.oldpeoplehome.entity.Sleep">
|
||||
<id column="pid" property="parentId" jdbcType="BIGINT"/>
|
||||
<result column="date" property="date" jdbcType="DATE"/>
|
||||
<result column="deep" property="lightTime" jdbcType="TIME"/>
|
||||
<result column="light" property="deepTime" jdbcType="TIME"/>
|
||||
<result column="awake" property="awakeTime" jdbcType="TIME"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="findByParentId" resultMap="BaseResultMap" parameterType="com.oldpeoplehome.dto.SleepFilter">
|
||||
select *
|
||||
from sleep where pid = #{parentId}
|
||||
</select>
|
||||
<select id="findByDate" resultMap="BaseResultMap" parameterType="com.oldpeoplehome.dto.SleepFilter">
|
||||
select *
|
||||
from sleep where pid = #{parentId} and DATE_FORMAT(date,'%Y-%m-%d') between #{startDate} and #{endDate}
|
||||
</select>
|
||||
<select id="findByParentIdAndDate" resultMap="BaseResultMap" parameterType="com.oldpeoplehome.dto.SleepFilter">
|
||||
select s.*, p.* from sleep s left join parent p on s.pid = p.id where s.pid = #{parentId} and s.date = #{startDate}
|
||||
</select>
|
||||
<insert id="insert" parameterType="Sleep">
|
||||
insert into sleep(pid, date, deep, light, awake)
|
||||
values (#{parentId}, #{date}, #{lightTime}, #{deepTime}, #{awakeTime})
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE configuration
|
||||
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-config.dtd">
|
||||
<configuration>
|
||||
<!-- 配置全局属性 -->
|
||||
<settings>
|
||||
<!-- 使用jdbc的getGeneratedKeys获取数据库自增主键值 -->
|
||||
<setting name="useGeneratedKeys" value="true" />
|
||||
|
||||
<!-- 使用列别名替换列名 默认:true -->
|
||||
<setting name="useColumnLabel" value="true" />
|
||||
|
||||
<!-- 开启驼峰命名转换:Table{create_time} -> Entity{createTime} -->
|
||||
<setting name="mapUnderscoreToCamelCase" value="true" />
|
||||
</settings>
|
||||
</configuration>
|
||||
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context.xsd">
|
||||
<!--配置数据库相关参数 -->
|
||||
<context:property-placeholder location="classpath:jdbc.properties"/>
|
||||
<!-- 2.数据库连接池 -->
|
||||
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
|
||||
<!-- 配置连接池属性 -->
|
||||
<property name="driverClass" value="${jdbc.driver}"/>
|
||||
<property name="jdbcUrl" value="${jdbc.url}"/>
|
||||
<property name="user" value="${jdbc.username}"/>
|
||||
<property name="password" value="${jdbc.password}"/>
|
||||
|
||||
<!-- c3p0连接池的私有属性 -->
|
||||
<property name="maxPoolSize" value="30"/>
|
||||
<property name="minPoolSize" value="10"/>
|
||||
<!-- 关闭连接后不自动commit -->
|
||||
<property name="autoCommitOnClose" value="false"/>
|
||||
<!-- 获取连接超时时间 -->
|
||||
<property name="checkoutTimeout" value="10000"/>
|
||||
<!-- 当获取连接失败重试次数 -->
|
||||
<property name="acquireRetryAttempts" value="2"/>
|
||||
</bean>
|
||||
|
||||
<!-- 3.配置SqlSessionFactory对象 -->
|
||||
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
|
||||
<!-- 注入数据库连接池 -->
|
||||
<property name="dataSource" ref="dataSource"/>
|
||||
<!-- 配置MyBaties全局配置文件:mybatis-config.xml -->
|
||||
<property name="configLocation" value="classpath:mybatis-config.xml"/>
|
||||
<!-- 扫描entity包 使用别名 -->
|
||||
<property name="typeAliasesPackage" value="com.oldpeoplehome.entity"/>
|
||||
<!-- 扫描sql配置文件:mapper需要的xml文件 -->
|
||||
<property name="mapperLocations" value="classpath:mapper/*.xml"/>
|
||||
</bean>
|
||||
|
||||
<!-- 4.配置扫描Dao接口包,动态实现Dao接口,注入到spring容器中 -->
|
||||
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
|
||||
<!-- 注入sqlSessionFactory -->
|
||||
<property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
|
||||
<!-- 给出需要扫描Dao接口包 -->
|
||||
<property name="basePackage" value="com.oldpeoplehome.dao"/>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:tx="http://www.springframework.org/schema/tx"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context.xsd
|
||||
http://www.springframework.org/schema/tx
|
||||
http://www.springframework.org/schema/tx/spring-tx.xsd">
|
||||
|
||||
<!-- 扫描service包下所有使用注解的类型 -->
|
||||
<context:component-scan base-package="com.oldpeoplehome.service" />
|
||||
|
||||
<!-- 配置事务管理器 -->
|
||||
<bean id="transactionManager"
|
||||
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
|
||||
<!-- 注入数据库连接池 -->
|
||||
<property name="dataSource" ref="dataSource" />
|
||||
</bean>
|
||||
|
||||
<!-- 配置基于注解的声明式事务 -->
|
||||
<tx:annotation-driven transaction-manager="transactionManager" />
|
||||
|
||||
</beans>
|
||||
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/mvc
|
||||
http://www.springframework.org/schema/mvc/spring-mvc.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context.xsd">
|
||||
|
||||
<!-- 配置SpringMVC -->
|
||||
<!-- 1.开启SpringMVC注解模式 -->
|
||||
<!-- 简化配置:
|
||||
(1)自动注册DefaultAnootationHandlerMapping,AnotationMethodHandlerAdapter
|
||||
(2)提供一些列:数据绑定,数字和日期的format @NumberFormat, @DateTimeFormat, xml,json默认读写支持
|
||||
-->
|
||||
<mvc:annotation-driven />
|
||||
<!-- 2.静态资源默认servlet配置
|
||||
(1)加入对静态资源的处理:js,gif,png
|
||||
(2)允许使用"/"做整体映射
|
||||
-->
|
||||
<mvc:default-servlet-handler/>
|
||||
|
||||
<!-- 接口跨域配置 -->
|
||||
<mvc:cors>
|
||||
<mvc:mapping path="/**"
|
||||
allowed-origins="*"
|
||||
allowed-methods="POST, GET, OPTIONS, DELETE, PUT"
|
||||
allowed-headers="Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With"
|
||||
allow-credentials="true" />
|
||||
</mvc:cors>
|
||||
|
||||
<!-- 3.配置jsp 显示ViewResolver -->
|
||||
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
|
||||
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView" />
|
||||
<property name="prefix" value="/WEB-INF/jsp/" />
|
||||
<property name="suffix" value=".jsp" />
|
||||
</bean>
|
||||
|
||||
<!-- 4.扫描web相关的bean -->
|
||||
<context:component-scan base-package="com.oldpeoplehome.web" />
|
||||
<context:component-scan base-package="com.oldpeoplehome">
|
||||
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
|
||||
</context:component-scan>
|
||||
|
||||
|
||||
</beans>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user