This commit is contained in:
ScorpioMiku
2019-09-11 18:44:24 +08:00
344 changed files with 33573 additions and 1970 deletions

View File

@@ -8,25 +8,10 @@
<component name="ChangeListManager">
<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/java/com/oldpeoplehome/entity/Child.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/entity/Child.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/entity/Parent.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/entity/Parent.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/entity/Room.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/entity/Room.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/utils/MethodUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/utils/MethodUtil.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/web/ParentController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/web/ParentController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/jdbc.properties" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/jdbc.properties" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/test/java/com/oldpeoplehome/dao/ParentDaoTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/com/oldpeoplehome/dao/ParentDaoTest.java" 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" />
<change beforePath="$PROJECT_DIR$/target/OldPeopleHome.war" beforeDir="false" afterPath="$PROJECT_DIR$/target/OldPeopleHome.war" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/OldPeopleHome/WEB-INF/classes/com/oldpeoplehome/entity/Parent.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/OldPeopleHome/WEB-INF/classes/com/oldpeoplehome/entity/Parent.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/OldPeopleHome/WEB-INF/classes/com/oldpeoplehome/entity/Room.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/OldPeopleHome/WEB-INF/classes/com/oldpeoplehome/entity/Room.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/OldPeopleHome/WEB-INF/classes/com/oldpeoplehome/utils/MethodUtil.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/OldPeopleHome/WEB-INF/classes/com/oldpeoplehome/utils/MethodUtil.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/OldPeopleHome/WEB-INF/classes/com/oldpeoplehome/web/ParentController.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/OldPeopleHome/WEB-INF/classes/com/oldpeoplehome/web/ParentController.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/oldpeoplehome/entity/Parent.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/oldpeoplehome/entity/Parent.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/oldpeoplehome/entity/Room.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/oldpeoplehome/entity/Room.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/oldpeoplehome/utils/MethodUtil.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/oldpeoplehome/utils/MethodUtil.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/oldpeoplehome/web/ParentController.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/oldpeoplehome/web/ParentController.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/test-classes/com/oldpeoplehome/dao/ParentDaoTest.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/test-classes/com/oldpeoplehome/dao/ParentDaoTest.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/test-classes/com/oldpeoplehome/service/ParentServiceTest.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/test-classes/com/oldpeoplehome/service/ParentServiceTest.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/mapper/ChildParentDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mapper/ChildParentDao.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/sql/add_table.sql" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/sql/add_table.sql" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/test/java/com/oldpeoplehome/service/ChildParentServiceTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/com/oldpeoplehome/service/ChildParentServiceTest.java" afterDir="false" />
</list>
<ignored path="$PROJECT_DIR$/target/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@@ -40,83 +25,35 @@
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/resources/jdbc.properties">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="33">
<caret line="1" column="44" selection-start-line="1" selection-start-column="44" selection-end-line="1" selection-end-column="44" />
<state relative-caret-position="99">
<caret line="3" column="18" selection-start-line="3" selection-start-column="18" selection-end-line="3" selection-end-column="18" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/sql/add_table.sql">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="355">
<caret line="54" selection-start-line="54" selection-end-line="57" selection-end-column="104" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/web/ChildParentController.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="194">
<caret line="38" column="52" selection-start-line="38" selection-start-column="52" selection-end-line="38" selection-end-column="52" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/web/ParentController.java">
<entry file="file://$PROJECT_DIR$/src/main/resources/mapper/ChildParentDao.xml">
<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>
</file>
<file pinned="false" current-in-tab="false">
<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="1694">
<caret line="95" column="45" selection-start-line="95" selection-start-column="45" selection-end-line="95" selection-end-column="45" />
<folding>
<element signature="e#2016#2017#0" expanded="true" />
<element signature="e#2055#2056#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/entity/Child.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="110">
<caret line="109" column="21" selection-start-line="109" selection-start-column="16" selection-end-line="109" selection-end-column="21" />
<folding>
<element signature="e#1562#1563#0" expanded="true" />
<element signature="e#1608#1609#0" expanded="true" />
<element signature="e#1819#1820#0" expanded="true" />
<element signature="e#1861#1862#0" expanded="true" />
<element signature="e#2064#2065#0" expanded="true" />
<element signature="e#2104#2105#0" expanded="true" />
<element signature="e#2339#2340#0" expanded="true" />
<element signature="e#2387#2388#0" expanded="true" />
<element signature="e#2630#2631#0" expanded="true" />
<element signature="e#2680#2681#0" expanded="true" />
<element signature="e#2899#2900#0" expanded="true" />
<element signature="e#2943#2944#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/entity/ChildParent.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-231">
<caret line="6" column="13" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/entity/HeartRate.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-993">
<caret line="13" column="21" selection-start-line="13" selection-start-column="12" selection-end-line="13" selection-end-column="21" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</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="453">
<caret line="62" column="29" selection-start-line="62" selection-start-column="29" selection-end-line="62" selection-end-column="29" />
<state relative-caret-position="759">
<caret line="31" column="14" lean-forward="true" selection-start-line="31" selection-start-column="14" selection-end-line="31" selection-end-column="14" />
</state>
</provider>
</entry>
@@ -124,68 +61,53 @@
<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="110">
<state relative-caret-position="-75">
<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/service/ChildParentServiceTest.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="121">
<caret line="24" column="63" selection-start-line="24" selection-start-column="63" selection-end-line="24" selection-end-column="63" />
<folding>
<element signature="e#2605#2606#0" expanded="true" />
<element signature="e#2645#2646#0" expanded="true" />
<element signature="e#2604#2605#0" expanded="true" />
<element signature="e#2639#2640#0" expanded="true" />
<element signature="e#2783#2784#0" expanded="true" />
<element signature="e#2831#2832#0" expanded="true" />
<element signature="e#2881#2882#0" expanded="true" />
<element signature="e#2929#2930#0" expanded="true" />
<element signature="e#3058#3059#0" expanded="true" />
<element signature="e#3102#3103#0" expanded="true" />
<element signature="e#3148#3149#0" expanded="true" />
<element signature="e#3192#3193#0" expanded="true" />
<element signature="e#3317#3318#0" expanded="true" />
<element signature="e#3359#3360#0" expanded="true" />
<element signature="e#3403#3404#0" expanded="true" />
<element signature="e#3445#3446#0" expanded="true" />
<element signature="e#3586#3587#0" expanded="true" />
<element signature="e#3636#3637#0" expanded="true" />
<element signature="e#3688#3689#0" expanded="true" />
<element signature="e#3738#3739#0" expanded="true" />
<element signature="e#3883#3884#0" expanded="true" />
<element signature="e#3935#3936#0" expanded="true" />
<element signature="e#3989#3990#0" expanded="true" />
<element signature="e#4041#4042#0" expanded="true" />
<element signature="e#4178#4179#0" expanded="true" />
<element signature="e#4226#4227#0" expanded="true" />
<element signature="e#4276#4277#0" expanded="true" />
<element signature="e#4324#4325#0" expanded="true" />
<element signature="e#4461#4462#0" expanded="true" />
<element signature="e#4509#4510#0" expanded="true" />
<element signature="e#4559#4560#0" expanded="true" />
<element signature="e#4607#4608#0" expanded="true" />
<element signature="e#4621#4622#0" expanded="true" />
<element signature="e#4667#4668#0" expanded="true" />
<element signature="e#5123#5124#0" expanded="true" />
<element signature="e#5169#5170#0" expanded="true" />
<element signature="e#5403#5404#0" expanded="true" />
<element signature="e#5451#5452#0" expanded="true" />
<element signature="e#5164#5165#0" expanded="true" />
<element signature="e#5197#5198#0" expanded="true" />
<element signature="e#575#576#0" expanded="true" />
<element signature="e#641#642#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/test/java/com/oldpeoplehome/dao/ParentDaoTest.java">
<entry file="file://$PROJECT_DIR$/src/main/resources/spring/spring-web.xml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-24">
<caret line="53" column="37" selection-start-line="53" selection-start-column="37" selection-end-line="53" selection-end-column="37" />
<state relative-caret-position="990">
<caret line="30" column="48" 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$/src/test/java/com/oldpeoplehome/service/ParentServiceTest.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-16">
<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="1023">
<caret line="36" column="25" 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="561">
<caret line="19" column="9" selection-start-line="19" selection-start-column="9" selection-end-line="19" selection-end-column="9" />
</state>
</provider>
</entry>
@@ -211,8 +133,8 @@
<find>energy</find>
<find>rat2e</find>
<find>longtitude</find>
<find>mySet</find>
<find>myset</find>
<find>mySet</find>
</findStrings>
<replaceStrings>
<replace>utf8_general_ci</replace>
@@ -230,11 +152,6 @@
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/entity/RoomState.java" />
<option value="$PROJECT_DIR$/src/main/resources/mapper/RoomStateDao.xml" />
<option value="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/entity/Motion.java" />
<option value="$PROJECT_DIR$/src/test/java/com/oldpeoplehome/dao/MotionDaoTest.java" />
<option value="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/web/MotionController.java" />
<option value="$PROJECT_DIR$/src/main/resources/mapper/MotionDao.xml" />
<option value="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/entity/Admin.java" />
<option value="$PROJECT_DIR$/src/main/resources/mapper/AdminDao.fxml" />
@@ -253,7 +170,6 @@
<option value="$PROJECT_DIR$/src/main/resources/mapper/ChildDao.xml" />
<option value="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/dao/ChildDao.java" />
<option value="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/web/ChildController.java" />
<option value="$PROJECT_DIR$/src/test/java/com/oldpeoplehome/service/ChildParentServiceTest.java" />
<option value="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/web/ChildParentController.java" />
<option value="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/entity/HeartRate.java" />
<option value="$PROJECT_DIR$/src/main/resources/mapper/HeartRateDao.xml" />
@@ -267,7 +183,6 @@
<option value="$PROJECT_DIR$/src/main/resources/mapper/LocationDao.xml" />
<option value="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/web/LocationController.java" />
<option value="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/entity/Location.java" />
<option value="$PROJECT_DIR$/src/main/sql/add_table.sql" />
<option value="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/service/impl/RoomServiceImpl.java" />
<option value="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/service/RoomService.java" />
<option value="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/dao/RoomDao.java" />
@@ -276,11 +191,18 @@
<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/resources/jdbc.properties" />
<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/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/sql/add_table.sql" />
<option value="$PROJECT_DIR$/src/test/java/com/oldpeoplehome/service/ChildParentServiceTest.java" />
<option value="$PROJECT_DIR$/src/main/resources/jdbc.properties" />
<option value="$PROJECT_DIR$/src/main/resources/mapper/ChildParentDao.xml" />
</list>
</option>
</component>
@@ -299,10 +221,10 @@
</option>
</component>
<component name="ProjectFrameBounds" extendedState="6">
<option name="x" value="1910" />
<option name="y" value="-10" />
<option name="width" value="1939" />
<option name="height" value="1049" />
<option name="x" value="1911" />
<option name="y" value="-9" />
<option name="width" value="1938" />
<option name="height" value="1048" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectView">
@@ -310,7 +232,6 @@
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<expand>
@@ -353,24 +274,6 @@
<item name="oldpeoplehome" type="462c0819:PsiDirectoryNode" />
<item name="entity" 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" />
<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="web" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="OldPeopleHome" type="b2602c69:ProjectViewProjectNode" />
<item name="OldPeopleHome" type="462c0819:PsiDirectoryNode" />
@@ -400,12 +303,44 @@
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="webapp" 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="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="src" type="462c0819:PsiDirectoryNode" />
<item name="test" type="462c0819:PsiDirectoryNode" />
<item name="java" 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" />
<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="test" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" />
<item name="oldpeoplehome" type="462c0819:PsiDirectoryNode" />
<item name="service" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="OldPeopleHome" type="b2602c69:ProjectViewProjectNode" />
<item name="OldPeopleHome" type="462c0819:PsiDirectoryNode" />
@@ -415,13 +350,14 @@
<select />
</subPane>
</pane>
<pane id="Scope" />
<pane id="PackagesPane" />
</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="1567861651518" />
<property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1568179954303" />
<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" />
@@ -450,7 +386,7 @@
</option>
</component>
<component name="RunManager" selected="Tomcat Server.chuizichui">
<configuration name="AdminServiceTest.testLogin" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
<configuration name="ChildParentServiceTest.add" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
<module name="OldPeopleHome" />
<extension name="coverage">
<pattern>
@@ -459,8 +395,8 @@
</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="MAIN_CLASS_NAME" value="com.oldpeoplehome.service.ChildParentServiceTest" />
<option name="METHOD_NAME" value="add" />
<option name="TEST_OBJECT" value="method" />
<method v="2">
<option name="Make" enabled="true" />
@@ -482,22 +418,6 @@
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="HeartRateServiceTest.test" 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.HeartRateServiceTest" />
<option name="METHOD_NAME" value="test" />
<option name="TEST_OBJECT" value="method" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="LocationServiceTest.test" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
<module name="OldPeopleHome" />
<extension name="coverage">
@@ -514,6 +434,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">
@@ -604,20 +540,20 @@
</method>
</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="JUnit.ParentServiceTest.delete" />
<item itemvalue="Tomcat Server.chuizichui" />
<item itemvalue="JUnit.ChildParentServiceTest.add" />
</list>
<recent_temporary>
<list>
<item itemvalue="JUnit.ChildParentServiceTest.add" />
<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>
@@ -659,20 +595,15 @@
<workItem from="1567739536607" duration="4839000" />
<workItem from="1567777529260" duration="871000" />
<workItem from="1567824861214" duration="7220000" />
<workItem from="1567907291757" duration="4108000" />
<workItem from="1567907291757" duration="5874000" />
<workItem from="1567991841988" duration="1149000" />
<workItem from="1568017526948" duration="1787000" />
<workItem from="1568101339445" duration="2643000" />
<workItem from="1568170909395" duration="2350000" />
</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>
<history-entry file="LocationServiceTest_test - 2019.09.06 at 13h 46m 32s.xml">
<configuration name="LocationServiceTest.test" configurationId="JUnit" />
</history-entry>
<history-entry file="LocationServiceTest_test - 2019.09.06 at 13h 47m 23s.xml">
<configuration name="LocationServiceTest.test" configurationId="JUnit" />
</history-entry>
@@ -694,9 +625,18 @@
<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>
<history-entry file="ChildParentServiceTest_add - 2019.09.11 at 13h 17m 30s.xml">
<configuration name="ChildParentServiceTest.add" configurationId="JUnit" />
</history-entry>
<history-entry file="ChildParentServiceTest_add - 2019.09.11 at 13h 18m 10s.xml">
<configuration name="ChildParentServiceTest.add" configurationId="JUnit" />
</history-entry>
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="157481000" />
<option name="totallyTimeSpent" value="167176000" />
</component>
<component name="TodoView">
<todo-panel id="selected-file">
@@ -711,7 +651,7 @@
<frame x="1913" y="-7" width="1550" height="838" extended-state="6" />
<editor active="true" />
<layout>
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.23927614" />
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.25268096" />
<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" />
@@ -785,84 +725,6 @@
<option name="version" value="1" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/service/impl/HeartRateServiceTest.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1056">
<caret line="37" column="37" selection-start-line="37" selection-start-column="37" selection-end-line="37" selection-end-column="37" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/web/ChildController.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2046">
<caret line="79" column="5" selection-start-line="79" selection-start-column="5" selection-end-line="79" selection-end-column="5" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/web/ChildParentController.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1386">
<caret line="52" column="40" selection-start-line="52" selection-start-column="40" selection-end-line="52" selection-end-column="40" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/service/ChildParentService.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="429">
<caret line="17" selection-start-line="17" selection-end-line="17" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/test/java/com/oldpeoplehome/service/ChildParentServiceTest.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="594">
<caret line="21" selection-start-line="21" selection-end-line="21" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/resources/mapper/ChildParentDao.xml">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<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">
<caret line="26" column="58" selection-start-line="26" selection-start-column="58" selection-end-line="26" selection-end-column="58" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/dao/AdminDao.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="330">
<caret line="10" column="38" selection-start-line="10" selection-start-column="38" selection-end-line="10" selection-end-column="38" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/dao/ChildDao.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="429">
<caret line="15" column="19" selection-start-line="15" selection-start-column="19" selection-end-line="15" selection-end-column="19" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/dao/HeartRateDao.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="251">
@@ -982,13 +844,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">
@@ -1043,13 +898,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">
@@ -1081,13 +929,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/sql/add_table.sql">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="355">
<caret line="33" selection-start-line="33" selection-end-line="34" selection-end-column="58" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/resources/logback.xml">
<provider selected="true" editor-type-id="text-editor" />
</entry>
@@ -1136,118 +977,33 @@
</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="-24">
<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">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-16">
<caret line="23" column="37" selection-start-line="23" selection-start-column="37" selection-end-line="23" selection-end-column="37" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/resources/jdbc.properties">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="33">
<caret line="1" column="44" selection-start-line="1" selection-start-column="44" selection-end-line="1" selection-end-column="44" />
</state>
</provider>
</entry>
<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="110">
<caret line="194" column="21" selection-start-line="194" selection-start-column="16" selection-end-line="194" selection-end-column="21" />
<folding>
<element signature="e#2605#2606#0" expanded="true" />
<element signature="e#2645#2646#0" expanded="true" />
<element signature="e#2604#2605#0" expanded="true" />
<element signature="e#2639#2640#0" expanded="true" />
<element signature="e#2783#2784#0" expanded="true" />
<element signature="e#2831#2832#0" expanded="true" />
<element signature="e#2881#2882#0" expanded="true" />
<element signature="e#2929#2930#0" expanded="true" />
<element signature="e#3058#3059#0" expanded="true" />
<element signature="e#3102#3103#0" expanded="true" />
<element signature="e#3148#3149#0" expanded="true" />
<element signature="e#3192#3193#0" expanded="true" />
<element signature="e#3317#3318#0" expanded="true" />
<element signature="e#3359#3360#0" expanded="true" />
<element signature="e#3403#3404#0" expanded="true" />
<element signature="e#3445#3446#0" expanded="true" />
<element signature="e#3586#3587#0" expanded="true" />
<element signature="e#3636#3637#0" expanded="true" />
<element signature="e#3688#3689#0" expanded="true" />
<element signature="e#3738#3739#0" expanded="true" />
<element signature="e#3883#3884#0" expanded="true" />
<element signature="e#3935#3936#0" expanded="true" />
<element signature="e#3989#3990#0" expanded="true" />
<element signature="e#4041#4042#0" expanded="true" />
<element signature="e#4178#4179#0" expanded="true" />
<element signature="e#4226#4227#0" expanded="true" />
<element signature="e#4276#4277#0" expanded="true" />
<element signature="e#4324#4325#0" expanded="true" />
<element signature="e#4461#4462#0" expanded="true" />
<element signature="e#4509#4510#0" expanded="true" />
<element signature="e#4559#4560#0" expanded="true" />
<element signature="e#4607#4608#0" expanded="true" />
<element signature="e#4621#4622#0" expanded="true" />
<element signature="e#4667#4668#0" expanded="true" />
<element signature="e#5123#5124#0" expanded="true" />
<element signature="e#5169#5170#0" expanded="true" />
<element signature="e#5403#5404#0" expanded="true" />
<element signature="e#5451#5452#0" expanded="true" />
<element signature="e#5164#5165#0" expanded="true" />
<element signature="e#5197#5198#0" expanded="true" />
</folding>
</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="1694">
<state relative-caret-position="2244">
<caret line="95" column="45" selection-start-line="95" selection-start-column="45" selection-end-line="95" selection-end-column="45" />
<folding>
<element signature="e#2016#2017#0" expanded="true" />
<element signature="e#2055#2056#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/entity/Child.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="110">
<state relative-caret-position="2343">
<caret line="109" column="21" selection-start-line="109" selection-start-column="16" selection-end-line="109" selection-end-column="21" />
<folding>
<element signature="e#1562#1563#0" expanded="true" />
<element signature="e#1608#1609#0" expanded="true" />
<element signature="e#1819#1820#0" expanded="true" />
<element signature="e#1861#1862#0" expanded="true" />
<element signature="e#2064#2065#0" expanded="true" />
<element signature="e#2104#2105#0" expanded="true" />
<element signature="e#2339#2340#0" expanded="true" />
<element signature="e#2387#2388#0" expanded="true" />
<element signature="e#2630#2631#0" expanded="true" />
<element signature="e#2680#2681#0" expanded="true" />
<element signature="e#2899#2900#0" expanded="true" />
<element signature="e#2943#2944#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/entity/ChildParent.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-231">
<state relative-caret-position="198">
<caret line="6" column="13" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/resources/spring/spring-dao.xml">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/entity/HeartRate.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-993">
<state relative-caret-position="429">
<caret line="13" column="21" selection-start-line="13" selection-start-column="12" selection-end-line="13" selection-end-column="21" />
<folding>
<element signature="imports" expanded="true" />
@@ -1257,15 +1013,126 @@
</entry>
<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="453">
<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>
<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/test/java/com/oldpeoplehome/dao/ParentDaoTest.java">
<provider selected="true" editor-type-id="text-editor">
<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/main/webapp/WEB-INF/web.xml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1716">
<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/main/webapp/index.jsp">
<provider selected="true" editor-type-id="text-editor" />
</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 relative-caret-position="1914">
<caret line="77" column="39" 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/java/com/oldpeoplehome/utils/SimpleCORSFilter.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1056">
<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" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/pom.xml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="5412">
<caret line="164" selection-start-line="164" selection-end-line="164" />
</state>
</provider>
</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="990">
<caret line="30" column="48" selection-start-line="30" selection-start-column="48" selection-end-line="30" selection-end-column="48" />
</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/test/java/com/oldpeoplehome/service/ParentServiceTest.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1023">
<caret line="36" column="25" selection-start-line="36" selection-start-column="25" selection-end-line="36" selection-end-column="25" />
</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="561">
<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/test/java/com/oldpeoplehome/service/ChildParentServiceTest.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="121">
<caret line="24" column="63" selection-start-line="24" selection-start-column="63" selection-end-line="24" selection-end-column="63" />
<folding>
<element signature="e#575#576#0" expanded="true" />
<element signature="e#641#642#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/resources/jdbc.properties">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="99">
<caret line="3" column="18" selection-start-line="3" selection-start-column="18" selection-end-line="3" selection-end-column="18" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/sql/add_table.sql">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="355">
<caret line="54" selection-start-line="54" selection-end-line="57" selection-end-column="104" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/web/ChildParentController.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="194">
<caret line="38" column="52" selection-start-line="38" selection-start-column="52" selection-end-line="38" selection-end-column="52" />
</state>
</provider>
</entry>
<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="-75">
<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$/src/main/resources/mapper/ChildParentDao.xml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="759">
<caret line="31" column="14" lean-forward="true" selection-start-line="31" selection-start-column="14" selection-end-line="31" selection-end-column="14" />
</state>
</provider>
</entry>

View File

@@ -20,7 +20,6 @@ public class Parent {
private String parentPhone;
private int parentRoomId;
private Room parentRoom;
private Child child;
public Parent() {
}

View File

@@ -0,0 +1,40 @@
package com.oldpeoplehome.utils;
import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
* Created By Jiangyuwei on 2019/9/9 16:27
* Description:
*/
public class SimpleCORSFilter implements Filter {
public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws IOException, ServletException {
HttpServletResponse response = (HttpServletResponse) resp;
HttpServletRequest request=(HttpServletRequest)req;
// 处理简单请求
// 跨域请求默认不携带cookie,如果要携带cookie需要设置下边2个响应头
response.setHeader("Access-Control-Allow-Origin", request.getHeader("Origin"));// 必选,所有有效的跨域响应都必须包含这个请求头, 没有的话会导致跨域请求失败
response.setHeader("Access-Control-Allow-Credentials", "true");//可选此处设置为true,对应前端 xhr.withCredentials = true;
//处理非简单请求
// 非简单请求:浏览器会发送两个请求, 第一个请求(成为预检请求)会像服务器确定是否接受这个跨域请求, 第二个才是真正的发出请求. 浏览器自动的处理这两个请求, 同时预检请求也是可以被缓存的, 而不用每次请求都需要发送预检请求.
// 预检请求是在实际的请求发出前先向服务器确认是否能够处理这个请求. 服务器应该检查上边两个请求头的值, 来判断这个请求是否有效.
response.setHeader("Access-Control-Allow-Methods", "POST,GET,OPTIONS,DELETE");// 必选
response.setHeader("Access-Control-Allow-Headers",
"Origin,No-Cache,X-Requested-With,If-Modified-Since," +
"Pragma,Last-Modified,Cache-Control,Expires,Content-Type,X-E4M-With,userId,token");
response.setHeader("Access-Control-Max-Age", "0");// 可选,在每个请求前面都发送一个预检请求是很浪费资源的, 这个值允许你设置预检请求的缓存时间, 单位是秒.
response.setHeader("XDomainRequestAllowed","1");
chain.doFilter(req,resp);
}
public void init(FilterConfig filterConfig) {}
public void destroy() {}
}

View File

@@ -15,15 +15,6 @@
<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"/>
@@ -33,24 +24,12 @@
<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 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 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)

View File

@@ -22,6 +22,15 @@
-->
<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" />
@@ -34,4 +43,6 @@
<context:component-scan base-package="com.oldpeoplehome">
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
</context:component-scan>
</beans>

View File

@@ -52,6 +52,10 @@ CREATE TABLE `cp` (
KEY `index_pid` (`pid`) USING BTREE,
KEY `index_cid` (`cid`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci ;
ALTER TABLE `cp`
DROP PRIMARY KEY,
ADD CONSTRAINT `1pid` FOREIGN KEY (`pid`) REFERENCES `parent` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `2cid` FOREIGN KEY (`cid`) REFERENCES `child` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
CREATE TABLE `heartrate` (
`pid` bigint(20) DEFAULT NULL,
`time` datetime DEFAULT NULL,

View File

@@ -34,8 +34,22 @@
<param-value>true</param-value>
</init-param>
</filter>
<filter>
<filter-name>SimpleCORSFilter</filter-name>
<filter-class>com.oldpeoplehome.utils.SimpleCORSFilter</filter-class>
<init-param>
<param-name>IsCross</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>SpringEncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SimpleCORSFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>

View File

@@ -20,4 +20,9 @@ public class ChildParentServiceTest extends BaseTest {
childParentService.combine(childParent);
}
@Test
public void add(){
System.out.println(childParentService.findByParent(1));
}
}

View File

@@ -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());
}
}

Binary file not shown.

View File

@@ -0,0 +1,5 @@
Manifest-Version: 1.0
Built-By: Jiangyuwei
Created-By: IntelliJ IDEA
Build-Jdk: 1.8.0_161

View File

@@ -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

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -0,0 +1,38 @@
<?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"/>
</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"/>
</resultMap>
<select id="findByChild" resultMap="ParentResultMap" parameterType="long">
select 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 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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

Some files were not shown because too many files have changed in this diff Show More