This commit is contained in:
jiangyuwei666
2019-09-11 20:08:02 +08:00
parent c3a3347396
commit 7bfac17d0f
208 changed files with 194 additions and 1230 deletions

View File

@@ -8,10 +8,20 @@
<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/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/resources/jdbc.properties" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/jdbc.properties" 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/resources/mapper/ParentDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mapper/ParentDao.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/mapper/RoomDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mapper/RoomDao.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" />
<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/jdbc.properties" beforeDir="false" afterPath="$PROJECT_DIR$/target/OldPeopleHome/WEB-INF/classes/jdbc.properties" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/OldPeopleHome/WEB-INF/classes/mapper/ChildParentDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/target/OldPeopleHome/WEB-INF/classes/mapper/ChildParentDao.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/OldPeopleHome/WEB-INF/classes/mapper/ParentDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/target/OldPeopleHome/WEB-INF/classes/mapper/ParentDao.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/jdbc.properties" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/jdbc.properties" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/mapper/ChildParentDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/mapper/ChildParentDao.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/mapper/ParentDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/mapper/ParentDao.xml" afterDir="false" />
</list>
<ignored path="$PROJECT_DIR$/target/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@@ -24,9 +34,18 @@
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<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="132">
<caret line="4" selection-start-line="4" selection-end-line="4" />
</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="99">
<caret line="3" column="18" selection-start-line="3" selection-start-column="18" selection-end-line="3" selection-end-column="18" />
<caret line="6" column="13" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
</state>
</provider>
</entry>
@@ -34,26 +53,52 @@
<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 relative-caret-position="223">
<caret line="35" column="18" lean-forward="true" selection-start-line="35" selection-start-column="18" selection-end-line="35" selection-end-column="18" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/web/ChildParentController.java">
<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="194">
<caret line="38" column="52" selection-start-line="38" selection-start-column="52" selection-end-line="38" selection-end-column="52" />
<state relative-caret-position="-132">
<caret line="116" column="4" selection-start-line="116" selection-start-column="4" selection-end-line="116" selection-end-column="4" />
<folding>
<element signature="e#2681#2682#0" expanded="true" />
<element signature="e#2710#2711#0" expanded="true" />
<element signature="e#2754#2755#0" expanded="true" />
<element signature="e#2790#2791#0" expanded="true" />
<element signature="e#2828#2829#0" expanded="true" />
<element signature="e#2864#2865#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/resources/mapper/RoomDao.xml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1306">
<caret line="40" column="27" selection-start-line="40" selection-start-column="27" selection-end-line="40" selection-end-column="27" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/web/RoomController.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="217">
<caret line="71" column="33" selection-start-line="71" selection-start-column="33" selection-end-line="71" selection-end-column="33" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<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 relative-caret-position="-1419">
<caret line="8" column="57" selection-start-line="8" selection-start-column="57" selection-end-line="8" selection-end-column="57" />
</state>
</provider>
</entry>
@@ -61,57 +106,26 @@
<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="-75">
<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="-1961">
<caret line="20" column="24" selection-start-line="20" selection-start-column="24" selection-end-line="20" selection-end-column="24" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/test/java/com/oldpeoplehome/service/ChildParentServiceTest.java">
<entry file="file://$PROJECT_DIR$/src/main/resources/mapper/ParentDao.xml">
<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 relative-caret-position="330">
<caret line="28" column="51" selection-start-line="28" selection-start-column="51" selection-end-line="28" selection-end-column="51" />
</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="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">
<entry file="file://$PROJECT_DIR$/src/main/resources/logback.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="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>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
@@ -135,6 +149,7 @@
<find>longtitude</find>
<find>myset</find>
<find>mySet</find>
<find>parentRoomId</find>
</findStrings>
<replaceStrings>
<replace>utf8_general_ci</replace>
@@ -162,7 +177,6 @@
<option value="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/service/impl/AdminServiceImpl.java" />
<option value="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/web/AdminController.java" />
<option value="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/dao/ParentDao.java" />
<option value="$PROJECT_DIR$/src/main/resources/mapper/ParentDao.xml" />
<option value="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/service/ParentService.java" />
<option value="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/service/impl/ParentServiceImpl.java" />
<option value="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/service/ChildService.java" />
@@ -186,23 +200,24 @@
<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" />
<option value="$PROJECT_DIR$/src/main/resources/mapper/RoomDao.xml" />
<option value="$PROJECT_DIR$/src/test/java/com/oldpeoplehome/service/RoomServiceTest.java" />
<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/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" />
<option value="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/entity/Parent.java" />
<option value="$PROJECT_DIR$/src/main/resources/mapper/ParentDao.xml" />
<option value="$PROJECT_DIR$/src/main/resources/jdbc.properties" />
<option value="$PROJECT_DIR$/src/main/sql/add_table.sql" />
<option value="$PROJECT_DIR$/src/main/java/com/oldpeoplehome/entity/Room.java" />
<option value="$PROJECT_DIR$/src/main/resources/mapper/RoomDao.xml" />
</list>
</option>
</component>
@@ -341,11 +356,6 @@
<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" />
<item name="target" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
@@ -357,7 +367,7 @@
<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="1568179954303" />
<property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1568202512041" />
<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" />
@@ -599,7 +609,7 @@
<workItem from="1567991841988" duration="1149000" />
<workItem from="1568017526948" duration="1787000" />
<workItem from="1568101339445" duration="2643000" />
<workItem from="1568170909395" duration="2350000" />
<workItem from="1568170909395" duration="7305000" />
</task>
<servers />
</component>
@@ -636,7 +646,7 @@
</history-entry>
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="167176000" />
<option name="totallyTimeSpent" value="172131000" />
</component>
<component name="TodoView">
<todo-panel id="selected-file">
@@ -649,7 +659,6 @@
</component>
<component name="ToolWindowManager">
<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.25268096" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
@@ -912,13 +921,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/resources/mapper/RoomDao.xml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="312">
<caret line="39" column="26" selection-start-line="39" selection-start-column="26" selection-end-line="39" selection-end-column="26" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/test/java/com/oldpeoplehome/service/RoomServiceTest.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="326">
@@ -929,9 +931,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/resources/logback.xml">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/entity/Motion.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="218">
@@ -953,20 +952,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/web/RoomController.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1914">
<caret line="71" column="33" selection-start-line="71" selection-start-column="33" selection-end-line="71" selection-end-column="33" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/resources/mapper/ParentDao.xml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1122">
<caret line="34" column="13" selection-start-line="34" selection-start-column="13" selection-end-line="34" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/utils/MethodUtil.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="141">
@@ -977,13 +962,6 @@
</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">
<caret line="95" column="45" selection-start-line="95" selection-start-column="45" selection-end-line="95" selection-end-column="45" />
</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="2343">
@@ -991,13 +969,6 @@
</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="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>
@@ -1101,20 +1072,6 @@
</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">
@@ -1122,17 +1079,77 @@
</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/entity/ChildParent.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 relative-caret-position="99">
<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/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 relative-caret-position="-1419">
<caret line="8" column="57" selection-start-line="8" selection-start-column="57" selection-end-line="8" selection-end-column="57" />
</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="-1961">
<caret line="20" column="24" selection-start-line="20" selection-start-column="24" selection-end-line="20" selection-end-column="24" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/resources/mapper/ParentDao.xml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="330">
<caret line="28" column="51" selection-start-line="28" selection-start-column="51" selection-end-line="28" selection-end-column="51" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/resources/logback.xml">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/src/main/resources/jdbc.properties">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="132">
<caret line="4" selection-start-line="4" selection-end-line="4" />
</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="223">
<caret line="35" column="18" lean-forward="true" selection-start-line="35" selection-start-column="18" selection-end-line="35" selection-end-column="18" />
</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="-132">
<caret line="116" column="4" selection-start-line="116" selection-start-column="4" selection-end-line="116" selection-end-column="4" />
<folding>
<element signature="e#2681#2682#0" expanded="true" />
<element signature="e#2710#2711#0" expanded="true" />
<element signature="e#2754#2755#0" expanded="true" />
<element signature="e#2790#2791#0" expanded="true" />
<element signature="e#2828#2829#0" expanded="true" />
<element signature="e#2864#2865#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/resources/mapper/RoomDao.xml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1306">
<caret line="40" column="27" selection-start-line="40" selection-start-column="27" selection-end-line="40" selection-end-column="27" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/oldpeoplehome/web/RoomController.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="217">
<caret line="71" column="33" selection-start-line="71" selection-start-column="33" selection-end-line="71" selection-end-column="33" />
</state>
</provider>
</entry>

View File

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

View File

@@ -12,6 +12,7 @@ public class Room {
private long parentId;
private Parent parent;
private float temp;
private String mixMac;
public Room() {
}
@@ -42,6 +43,16 @@ public class Room {
this.temp = temp;
}
public Room(int roomId, String roomLocation, String roomName, long parentId, Parent parent, float temp, String mixMac) {
this.roomId = roomId;
this.roomLocation = roomLocation;
this.roomName = roomName;
this.parentId = parentId;
this.parent = parent;
this.temp = temp;
this.mixMac = mixMac;
}
public int getRoomId() {
return roomId;
}
@@ -96,6 +107,17 @@ public class Room {
this.parentId = Long.valueOf(parentId);
}
public String getMixMac() {
return mixMac;
}
public void setMixMac(String mixMac) {
this.mixMac = mixMac;
}
public void mySetMixMac(String mixMac) {
this.mixMac = mixMac;
}
@Override
public String toString() {
return "Room{" +
@@ -105,6 +127,7 @@ public class Room {
", parentId=" + parentId +
", parent=" + parent +
", temp=" + temp +
", mixMac='" + mixMac + '\'' +
'}';
}
}

View File

@@ -15,6 +15,15 @@
<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"/>
@@ -24,12 +33,24 @@
<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 p.* from cp c left join parent p on c.pid = p.id where c.cid = #{childId}
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 p.*from cp c left join child p on c.pid = p.id where c.pid = #{parentId}
select c.*, p.* from cp c left join child p on c.cid = p.id where c.pid = #{parentId}
</select>
<insert id="insert" parameterType="ChildParent">
insert into cp(pid, cid, relation)

View File

@@ -14,6 +14,7 @@
<result column="weight" property="parentWeight" jdbcType="DOUBLE"/>
<result column="birth" property="parentBirth" jdbcType="DATE"/>
<result column="phone" property="parentPhone" jdbcType="CHAR"/>
<result column="room" property="parentRoomId" jdbcType="INTEGER"/>
<association property="parentRoom" javaType="Room">
<id column="rid" property="roomId" jdbcType="INTEGER"/>
<result column="rlocation" property="roomLocation" jdbcType="VARCHAR"/>
@@ -22,23 +23,23 @@
</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 p.*,r.id rid,r.name rname,r.id room, r.location rlocation from parent p left join room r on p.id=r.pid 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 p.*,r.id rid,r.name rname,r.id room, r.location rlocation from parent p left join room r on p.id=r.pid 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 p.*,r.id rid,r.name rname,r.id room, r.location rlocation from room r left join parent p on p.id=r.pid 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 p.*,r.id rid,r.name rname,r.id room, r.location rlocation from parent p left join room r on p.id=r.pid 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 p.*,r.id rid,r.name rname,r.id room, r.location rlocation from parent p left join room r on p.id=r.pid 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 p.*,r.id rid,r.name rname,r.id room, r.location rlocation from parent p left join room r on p.id=r.pid
</select>
<insert id="insert" parameterType="Parent" useGeneratedKeys="true" keyColumn="id">

View File

@@ -10,6 +10,7 @@
<result column="name" property="roomName" jdbcType="VARCHAR"/>
<result column="pid" property="parentId" jdbcType="BIGINT"/>
<result column="temp" property="temp" jdbcType="FLOAT"/>
<result column="mixMac" property="mixMac" jdbcType="VARCHAR"/>
</resultMap>
<select id="findById" resultMap="BaseResultMap" parameterType="int">
@@ -37,7 +38,8 @@
set location = #{roomLocation},
name = #{roomName},
pid = #{parentId},
temp = #{temp}
temp = #{temp},
mixMac = #{mixMac}
where id =#{roomId}
</update>

View File

@@ -33,6 +33,8 @@ CREATE TABLE `room` (
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci ROW_FORMAT=DYNAMIC;
ALTER TABLE `room`
ADD COLUMN `temp` float NULL COMMENT '房间温度阈值' AFTER `pid`;
ALTER TABLE `room`
ADD COLUMN `mixMac` varchar(255) NULL COMMENT '传感器mac地址集中' AFTER `temp`;
CREATE TABLE `child` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`longid` char(18) NOT NULL COMMENT '身份证',

View File

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

View File

@@ -1,4 +0,0 @@
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

@@ -1,13 +0,0 @@
<?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

@@ -1,16 +0,0 @@
<?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

@@ -1,53 +0,0 @@
<?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

@@ -1,38 +0,0 @@
<?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

@@ -1,31 +0,0 @@
<?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

@@ -1,29 +0,0 @@
<?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

@@ -1,31 +0,0 @@
<?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

@@ -1,58 +0,0 @@
<?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

@@ -1,44 +0,0 @@
<?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

@@ -1,30 +0,0 @@
<?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

@@ -1,30 +0,0 @@
<?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

@@ -1,17 +0,0 @@
<?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

@@ -1,51 +0,0 @@
<?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

@@ -1,26 +0,0 @@
<?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

@@ -1,48 +0,0 @@
<?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