瀏覽代碼

基础资料代码

guq 6 年之前
父節點
當前提交
ce49c74695
共有 30 個文件被更改,包括 1886 次插入83 次删除
  1. 327 70
      .idea/workspace.xml
  2. 55 0
      applications/school/school-dto/src/main/java/com/usoftchina/smartschool/school/dto/DocBaseDTO.java
  3. 4 0
      applications/school/school-server/pom.xml
  4. 1 1
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/SchoolApplication.java
  5. 4 6
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/controller/ClassController.java
  6. 37 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/controller/GradeController.java
  7. 2 2
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/controller/SchoolController.java
  8. 52 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/controller/StudentController.java
  9. 15 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/controller/TeacherController.java
  10. 7 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/GradeService.java
  11. 1 1
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/SchoolService.java
  12. 16 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/StudentService.java
  13. 49 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/impl/GradeServiceImpl.java
  14. 3 3
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/impl/SchoolServiceImpl.java
  15. 120 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/impl/StudentServiceImpl.java
  16. 2 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/exception/BizExceptionCode.java
  17. 21 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/SysClazzMapper.java
  18. 21 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/SysGradeMapper.java
  19. 33 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/SysStudentMapper.java
  20. 29 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/StudentForm.java
  21. 79 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/SysClazz.java
  22. 91 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/SysGrade.java
  23. 161 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/SysParents.java
  24. 21 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/SysSchool.java
  25. 159 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/SysStudent.java
  26. 111 0
      applications/school/school-server/src/main/resources/mapper/SysClazzMapper.xml
  27. 109 0
      applications/school/school-server/src/main/resources/mapper/SysGradeMapper.xml
  28. 341 0
      applications/school/school-server/src/main/resources/mapper/SysStudentMapper.xml
  29. 5 0
      framework/core/src/main/java/com/usoftchina/smartschool/constant/CommonConstants.java
  30. 10 0
      framework/core/src/main/java/com/usoftchina/smartschool/context/BaseContextHolder.java

+ 327 - 70
.idea/workspace.xml

@@ -290,6 +290,7 @@
   </component>
   <component name="FileEditorManager">
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
+<<<<<<< Updated upstream
       <file leaf-file-name="BizExceptionCode.java" pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/exception/BizExceptionCode.java">
           <provider selected="true" editor-type-id="text-editor">
@@ -301,20 +302,184 @@
                 <marker date="1548207640216" expanded="false" signature="545:556" ph=" { " />
                 <marker date="1548207640216" expanded="false" signature="571:577" ph=" }" />
               </folding>
+=======
+      <file leaf-file-name="StudentController.java" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/controller/StudentController.java">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="278">
+              <caret line="45" column="53" lean-forward="false" selection-start-line="45" selection-start-column="53" selection-end-line="45" selection-end-column="53" />
+              <folding>
+                <element signature="imports" expanded="true" />
+              </folding>
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="DocBaseDTO.java" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/applications/school/school-dto/src/main/java/com/usoftchina/smartschool/school/dto/DocBaseDTO.java">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="0">
+              <caret line="12" column="0" lean-forward="false" selection-start-line="12" selection-start-column="0" selection-end-line="12" selection-end-column="0" />
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="StudentService.java" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/StudentService.java">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="133">
+              <caret line="12" column="21" lean-forward="false" selection-start-line="12" selection-start-column="21" selection-end-line="12" selection-end-column="21" />
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="SysParents.java" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/SysParents.java">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="684">
+              <caret line="36" column="26" lean-forward="false" selection-start-line="36" selection-start-column="26" selection-end-line="36" selection-end-column="26" />
+              <folding>
+                <element signature="e#641#642#0" expanded="true" />
+                <element signature="e#672#673#0" expanded="true" />
+                <element signature="e#718#719#0" expanded="true" />
+                <element signature="e#758#759#0" expanded="true" />
+                <element signature="e#792#793#0" expanded="true" />
+                <element signature="e#824#825#0" expanded="true" />
+                <element signature="e#872#873#0" expanded="true" />
+                <element signature="e#914#915#0" expanded="true" />
+                <element signature="e#946#947#0" expanded="true" />
+                <element signature="e#976#977#0" expanded="true" />
+                <element signature="e#1020#1021#0" expanded="true" />
+                <element signature="e#1058#1059#0" expanded="true" />
+                <element signature="e#1091#1092#0" expanded="true" />
+                <element signature="e#1120#1121#0" expanded="true" />
+                <element signature="e#1164#1165#0" expanded="true" />
+                <element signature="e#1231#1232#0" expanded="true" />
+                <element signature="e#1265#1266#0" expanded="true" />
+                <element signature="e#1297#1298#0" expanded="true" />
+                <element signature="e#1345#1346#0" expanded="true" />
+                <element signature="e#1387#1388#0" expanded="true" />
+                <element signature="e#1426#1427#0" expanded="true" />
+                <element signature="e#1461#1462#0" expanded="true" />
+                <element signature="e#1643#1644#0" expanded="true" />
+                <element signature="e#1682#1683#0" expanded="true" />
+                <element signature="e#1744#1745#0" expanded="true" />
+                <element signature="e#1800#1801#0" expanded="true" />
+                <element signature="e#1839#1840#0" expanded="true" />
+                <element signature="e#1873#1874#0" expanded="true" />
+                <element signature="e#1928#1929#0" expanded="true" />
+                <element signature="e#1974#1975#0" expanded="true" />
+                <element signature="e#2016#2017#0" expanded="true" />
+                <element signature="e#2053#2054#0" expanded="true" />
+                <element signature="e#2114#2115#0" expanded="true" />
+                <element signature="e#2166#2167#0" expanded="true" />
+                <element signature="e#2204#2205#0" expanded="true" />
+                <element signature="e#2238#2239#0" expanded="true" />
+                <element signature="e#2416#2417#0" expanded="true" />
+                <element signature="e#2454#2455#0" expanded="true" />
+                <element signature="e#2650#2651#0" expanded="true" />
+                <element signature="e#2686#2687#0" expanded="true" />
+                <element signature="e#2874#2875#0" expanded="true" />
+                <element signature="e#2912#2913#0" expanded="true" />
+                <element signature="e#3108#3109#0" expanded="true" />
+                <element signature="e#3144#3145#0" expanded="true" />
+              </folding>
             </state>
           </provider>
         </entry>
       </file>
+      <file leaf-file-name="SchoolController.java" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/controller/SchoolController.java">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="316">
+              <caret line="31" column="28" lean-forward="false" selection-start-line="31" selection-start-column="28" selection-end-line="31" selection-end-column="28" />
+              <folding />
+>>>>>>> Stashed changes
+            </state>
+          </provider>
+        </entry>
+      </file>
+<<<<<<< Updated upstream
       <file leaf-file-name="smartschool-platform.iml" pinned="false" current-in-tab="true">
         <entry file="file://$PROJECT_DIR$/smartschool-platform.iml">
           <provider selected="true" editor-type-id="text-editor">
             <state relative-caret-position="171">
               <caret line="9" column="56" lean-forward="true" selection-start-line="9" selection-start-column="56" selection-end-line="9" selection-end-column="56" />
               <folding />
+=======
+      <file leaf-file-name="StudentServiceImpl.java" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/impl/StudentServiceImpl.java">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="328">
+              <caret line="111" column="38" lean-forward="false" selection-start-line="111" selection-start-column="38" selection-end-line="111" selection-end-column="38" />
+              <folding>
+                <element signature="imports" expanded="true" />
+              </folding>
+>>>>>>> Stashed changes
+            </state>
+          </provider>
+        </entry>
+      </file>
+<<<<<<< Updated upstream
+=======
+      <file leaf-file-name="SysStudentMapper.java" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/SysStudentMapper.java">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="423">
+              <caret line="29" column="22" lean-forward="false" selection-start-line="29" selection-start-column="9" selection-end-line="29" selection-end-column="22" />
+              <folding>
+                <element signature="imports" expanded="true" />
+              </folding>
             </state>
           </provider>
         </entry>
       </file>
+      <file leaf-file-name="BizExceptionCode.java" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/exception/BizExceptionCode.java">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="209">
+              <caret line="11" column="37" lean-forward="false" selection-start-line="11" selection-start-column="37" selection-end-line="11" selection-end-column="37" />
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="SchoolServiceImpl.java" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/impl/SchoolServiceImpl.java">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="373">
+              <caret line="36" column="5" lean-forward="false" selection-start-line="36" selection-start-column="5" selection-end-line="36" selection-end-column="5" />
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="SysStudentMapper.xml" pinned="false" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/applications/school/school-server/src/main/resources/mapper/SysStudentMapper.xml">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="1544">
+              <caret line="326" column="2" lean-forward="false" selection-start-line="326" selection-start-column="2" selection-end-line="326" selection-end-column="2" />
+              <folding>
+                <marker date="1548207591859" expanded="true" signature="1793:1907" ph="select from sys_student" />
+                <marker date="1548207591859" expanded="true" signature="1991:2059" ph="delete from " />
+                <marker date="1548207591859" expanded="true" signature="2164:2922" ph="insert into sys_student... " />
+                <marker date="1548207591859" expanded="true" signature="5696:7230" ph="update sys_s... " />
+                <marker date="1548207591859" expanded="true" signature="7347:8126" ph="update sys_s... " />
+                <marker date="1548207591859" expanded="true" signature="8203:8228" ph="select * fro... sys_student" />
+                <marker date="1548207591859" expanded="true" signature="8203:8402" ph="select * fro... sys_student" />
+                <marker date="1548207591859" expanded="true" signature="9725:9842" ph="select * fro... sys_parents" />
+                <marker date="1548207591859" expanded="true" signature="9725:9845" ph="select sys_p... sys_parents" />
+                <marker date="1548207591859" expanded="true" signature="9725:9880" ph="select sys_p... sys_parents" />
+                <marker date="1548207591859" expanded="true" signature="12156:12226" ph="insert into sys_parents_stu... " />
+                <marker date="1548207591859" expanded="true" signature="12423:13713" ph="update saled... " />
+              </folding>
+            </state>
+          </provider>
+        </entry>
+      </file>
+>>>>>>> Stashed changes
     </leaf>
   </component>
   <component name="FileTemplateManagerImpl">
@@ -361,14 +526,11 @@
     </option>
   </component>
   <component name="HighlightingSettingsPerFile">
-    <setting file="file://$PROJECT_DIR$/applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/service/impl/SchoolServiceImpl.java" root0="FORCE_HIGHLIGHTING" />
+    <setting file="file://$PROJECT_DIR$/applications/school/school-server/src/main/resources/mapper/SysGradeMapper.xml" root0="SKIP_INSPECTION" />
   </component>
   <component name="IdeDocumentHistory">
     <option name="CHANGED_PATHS">
       <list>
-        <option value="$PROJECT_DIR$/applications/school/pom.xml" />
-        <option value="$PROJECT_DIR$/applications/school/school-server/pom.xml" />
-        <option value="$PROJECT_DIR$/base-servers/file/file-server/src/main/resources/mapper/FileInfoMapper.xml" />
         <option value="$PROJECT_DIR$/applications/wechat/wechat-server/pom.xml" />
         <option value="$PROJECT_DIR$/base-servers/eureka-server/src/main/resources/application.yml" />
         <option value="$PROJECT_DIR$/base-servers/file/file-server/src/main/resources/application.yml" />
@@ -417,6 +579,9 @@
         <option value="$PROJECT_DIR$/frontend/wechat-web/.gitignore" />
         <option value="$PROJECT_DIR$/applications/wechat/wechat.iml" />
         <option value="$PROJECT_DIR$/base-servers/gateway-server/gateway-server.iml" />
+        <option value="$PROJECT_DIR$/applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/impl/StudentServiceImpl.java" />
+        <option value="$PROJECT_DIR$/applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/SysStudentMapper.java" />
+        <option value="$PROJECT_DIR$/applications/school/school-server/src/main/resources/mapper/SysStudentMapper.xml" />
       </list>
     </option>
   </component>
@@ -453,6 +618,31 @@
     <option name="width" value="1348" />
     <option name="height" value="730" />
   </component>
+  <component name="ProjectInspectionProfilesVisibleTreeState">
+    <entry key="Project Default">
+      <profile-state>
+        <expanded-state>
+          <State>
+            <id />
+          </State>
+          <State>
+            <id>General</id>
+          </State>
+          <State>
+            <id>Plugin DevKit</id>
+          </State>
+          <State>
+            <id>RegExp</id>
+          </State>
+        </expanded-state>
+        <selected-state>
+          <State>
+            <id>Duplicates</id>
+          </State>
+        </selected-state>
+      </profile-state>
+    </entry>
+  </component>
   <component name="ProjectLevelVcsManager" settingsEditedManually="true">
     <ConfirmationsSetting value="2" id="Add" />
   </component>
@@ -597,6 +787,61 @@
               <item name="main" type="462c0819:PsiDirectoryNode" />
               <item name="java" type="462c0819:PsiDirectoryNode" />
               <item name="school" type="462c0819:PsiDirectoryNode" />
+<<<<<<< Updated upstream
+=======
+              <item name="basic" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="smartschool-platform" type="b2602c69:ProjectViewProjectNode" />
+              <item name="smartschool-platform" type="462c0819:PsiDirectoryNode" />
+              <item name="applications" type="462c0819:PsiDirectoryNode" />
+              <item name="school" type="462c0819:PsiDirectoryNode" />
+              <item name="school-server" type="462c0819:PsiDirectoryNode" />
+              <item name="src" type="462c0819:PsiDirectoryNode" />
+              <item name="main" type="462c0819:PsiDirectoryNode" />
+              <item name="java" type="462c0819:PsiDirectoryNode" />
+              <item name="school" type="462c0819:PsiDirectoryNode" />
+              <item name="basic" type="462c0819:PsiDirectoryNode" />
+              <item name="controller" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="smartschool-platform" type="b2602c69:ProjectViewProjectNode" />
+              <item name="smartschool-platform" type="462c0819:PsiDirectoryNode" />
+              <item name="applications" type="462c0819:PsiDirectoryNode" />
+              <item name="school" type="462c0819:PsiDirectoryNode" />
+              <item name="school-server" type="462c0819:PsiDirectoryNode" />
+              <item name="src" type="462c0819:PsiDirectoryNode" />
+              <item name="main" type="462c0819:PsiDirectoryNode" />
+              <item name="java" type="462c0819:PsiDirectoryNode" />
+              <item name="school" type="462c0819:PsiDirectoryNode" />
+              <item name="basic" type="462c0819:PsiDirectoryNode" />
+              <item name="service" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="smartschool-platform" type="b2602c69:ProjectViewProjectNode" />
+              <item name="smartschool-platform" type="462c0819:PsiDirectoryNode" />
+              <item name="applications" type="462c0819:PsiDirectoryNode" />
+              <item name="school" type="462c0819:PsiDirectoryNode" />
+              <item name="school-server" type="462c0819:PsiDirectoryNode" />
+              <item name="src" type="462c0819:PsiDirectoryNode" />
+              <item name="main" type="462c0819:PsiDirectoryNode" />
+              <item name="java" type="462c0819:PsiDirectoryNode" />
+              <item name="school" type="462c0819:PsiDirectoryNode" />
+              <item name="basic" type="462c0819:PsiDirectoryNode" />
+              <item name="service" type="462c0819:PsiDirectoryNode" />
+              <item name="impl" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="smartschool-platform" type="b2602c69:ProjectViewProjectNode" />
+              <item name="smartschool-platform" type="462c0819:PsiDirectoryNode" />
+              <item name="applications" type="462c0819:PsiDirectoryNode" />
+              <item name="school" type="462c0819:PsiDirectoryNode" />
+              <item name="school-server" type="462c0819:PsiDirectoryNode" />
+              <item name="src" type="462c0819:PsiDirectoryNode" />
+              <item name="main" type="462c0819:PsiDirectoryNode" />
+              <item name="java" type="462c0819:PsiDirectoryNode" />
+              <item name="school" type="462c0819:PsiDirectoryNode" />
+>>>>>>> Stashed changes
               <item name="exception" type="462c0819:PsiDirectoryNode" />
             </path>
             <path>
@@ -1065,7 +1310,7 @@
     <property name="project.structure.last.edited" value="Modules" />
     <property name="project.structure.proportion" value="0.15" />
     <property name="project.structure.side.proportion" value="0.2" />
-    <property name="settings.editor.selected.configurable" value="reference.settings.project.maven.ignored.files" />
+    <property name="settings.editor.selected.configurable" value="Errors" />
     <property name="nodejs_interpreter_path" value="C:/nodejs/node" />
     <property name="WebServerToolWindowFactoryState" value="false" />
     <property name="aspect.path.notification.shown" value="true" />
@@ -1349,7 +1594,11 @@
     <servers />
   </component>
   <component name="TimeTrackingManager">
+<<<<<<< Updated upstream
     <option name="totallyTimeSpent" value="32913000" />
+=======
+    <option name="totallyTimeSpent" value="33236000" />
+>>>>>>> Stashed changes
   </component>
   <component name="ToolWindowManager">
     <frame x="-8" y="-8" width="1382" height="744" extended-state="6" />
@@ -1366,9 +1615,15 @@
       <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.05107084" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
       <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.276771" sideWeight="0.81240547" order="11" side_tool="false" content_ui="tabs" />
       <window_info id="Spring" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.27512357" sideWeight="0.5" order="12" side_tool="false" content_ui="tabs" />
+<<<<<<< Updated upstream
       <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.43492585" sideWeight="0.5" order="13" side_tool="false" content_ui="tabs" />
       <window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
       <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.28290468" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
+=======
+      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4003295" sideWeight="0.5" order="13" side_tool="false" content_ui="tabs" />
+      <window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
+      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.1376702" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
+>>>>>>> Stashed changes
       <window_info id="Bean Validation" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32980332" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
       <window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="12" side_tool="true" content_ui="tabs" />
       <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32980332" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
@@ -1384,18 +1639,18 @@
       <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
       <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.57990116" sideWeight="0.18759455" order="14" side_tool="true" content_ui="tabs" />
       <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.30484116" sideWeight="0.49041095" order="4" side_tool="false" content_ui="tabs" />
-      <window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
+      <window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
       <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
-      <window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
+      <window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
       <window_info id="Inspection Results" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32454696" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
       <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32980332" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
-      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25340393" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
+      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25340393" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
       <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
-      <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
+      <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
       <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.5897858" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
       <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3294893" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
       <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.44481054" sideWeight="0.48789713" order="1" side_tool="false" content_ui="tabs" />
-      <window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
+      <window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" />
       <window_info id="Palette&#9;" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
       <window_info id="Java Enterprise" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="8" side_tool="true" content_ui="tabs" />
       <window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
@@ -1406,48 +1661,19 @@
       <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.276771" sideWeight="0.81240547" order="11" side_tool="false" content_ui="tabs" />
       <window_info id="Spring" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.47116968" sideWeight="0.5" order="12" side_tool="false" content_ui="tabs" />
       <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.38220757" sideWeight="0.5" order="13" side_tool="false" content_ui="tabs" />
+<<<<<<< Updated upstream
       <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.28971255" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
       <window_info id="Bean Validation" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32980332" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
       <window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="11" side_tool="true" content_ui="tabs" />
+=======
+      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.28971255" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
+      <window_info id="Bean Validation" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32980332" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
+      <window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="13" side_tool="true" content_ui="tabs" />
+>>>>>>> Stashed changes
       <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3294893" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
       <window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
-      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="true" content_ui="tabs" />
+      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="10" side_tool="true" content_ui="tabs" />
     </layout>
-    <layout-to-restore>
-      <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
-      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
-      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
-      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
-      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.57990116" sideWeight="0.18759455" order="14" side_tool="true" content_ui="tabs" />
-      <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.30484116" sideWeight="0.49041095" order="4" side_tool="false" content_ui="tabs" />
-      <window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
-      <window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
-      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
-      <window_info id="Inspection Results" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32454696" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
-      <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32980332" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
-      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25340393" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
-      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
-      <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
-      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.5897858" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
-      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3294893" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
-      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.44481054" sideWeight="0.48789713" order="1" side_tool="false" content_ui="tabs" />
-      <window_info id="Palette&#9;" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
-      <window_info id="Java Enterprise" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="8" side_tool="true" content_ui="tabs" />
-      <window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
-      <window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
-      <window_info id="Run Dashboard" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.29983526" sideWeight="0.8774584" order="10" side_tool="false" content_ui="combo" />
-      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
-      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.42339373" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
-      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.57990116" sideWeight="0.81240547" order="11" side_tool="false" content_ui="tabs" />
-      <window_info id="Coverage" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.45688352" sideWeight="0.509589" order="9" side_tool="true" content_ui="tabs" />
-      <window_info id="Spring" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.47116968" sideWeight="0.5" order="12" side_tool="false" content_ui="tabs" />
-      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.14662273" sideWeight="0.5" order="13" side_tool="false" content_ui="tabs" />
-      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.23373677" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
-      <window_info id="Bean Validation" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32980332" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
-      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.38879737" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
-      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="true" content_ui="tabs" />
-      <window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
-    </layout-to-restore>
   </component>
   <component name="TypeScriptGeneratedFilesManager">
     <option name="version" value="1" />
@@ -1502,6 +1728,7 @@
     <watches-manager />
   </component>
   <component name="editorHistoryManager">
+<<<<<<< Updated upstream
     <entry file="file://$PROJECT_DIR$/frontend/pc-web/index.html">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="176">
@@ -1516,6 +1743,8 @@
         </state>
       </provider>
     </entry>
+=======
+>>>>>>> Stashed changes
     <entry file="file://$PROJECT_DIR$/applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/controller/PrincipalMailboxController.java" />
     <entry file="file://$PROJECT_DIR$/applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/controller/StudentController.java" />
     <entry file="file://$PROJECT_DIR$/applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/controller/VoteElectController.java" />
@@ -1624,10 +1853,19 @@
         </state>
       </provider>
     </entry>
+<<<<<<< Updated upstream
     <entry file="file://$PROJECT_DIR$/applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/controller/GradeController.java">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="247">
           <caret line="13" column="0" lean-forward="false" selection-start-line="13" selection-start-column="0" selection-end-line="13" selection-end-column="0" />
+=======
+    <entry file="file://$PROJECT_DIR$/applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/controller/GradeController.java" />
+    <entry file="file://$PROJECT_DIR$/applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/exception/BizExceptionCode.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="209">
+          <caret line="11" column="37" lean-forward="false" selection-start-line="11" selection-start-column="37" selection-end-line="11" selection-end-column="37" />
+          <folding />
+>>>>>>> Stashed changes
         </state>
       </provider>
     </entry>
@@ -1711,30 +1949,9 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/controller/SchoolController.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="62">
-          <caret line="25" column="45" lean-forward="false" selection-start-line="25" selection-start-column="45" selection-end-line="25" selection-end-column="45" />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/service/SchoolService.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="101">
-          <caret line="9" column="20" lean-forward="true" selection-start-line="9" selection-start-column="20" selection-end-line="9" selection-end-column="20" />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/service/impl/SchoolServiceImpl.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="228">
-          <caret line="19" column="44" lean-forward="false" selection-start-line="19" selection-start-column="44" selection-end-line="19" selection-end-column="44" />
-          <folding>
-            <element signature="imports" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
+    <entry file="file://$PROJECT_DIR$/applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/controller/SchoolController.java" />
+    <entry file="file://$PROJECT_DIR$/applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/service/SchoolService.java" />
+    <entry file="file://$PROJECT_DIR$/applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/service/impl/SchoolServiceImpl.java" />
     <entry file="file://$PROJECT_DIR$/applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/SchoolApplication.java">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="133">
@@ -1788,6 +2005,7 @@
         </state>
       </provider>
     </entry>
+<<<<<<< Updated upstream
     <entry file="file://$PROJECT_DIR$/applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/exception/BizExceptionCode.java">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="133">
@@ -1797,15 +2015,54 @@
             <marker date="1548207640216" expanded="false" signature="493:499" ph=" }" />
             <marker date="1548207640216" expanded="false" signature="545:556" ph=" { " />
             <marker date="1548207640216" expanded="false" signature="571:577" ph=" }" />
+=======
+    <entry file="file://$PROJECT_DIR$/applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/impl/StudentServiceImpl.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="328">
+          <caret line="111" column="38" lean-forward="false" selection-start-line="111" selection-start-column="38" selection-end-line="111" selection-end-column="38" />
+          <folding>
+            <element signature="imports" expanded="true" />
+>>>>>>> Stashed changes
           </folding>
         </state>
       </provider>
     </entry>
+<<<<<<< Updated upstream
     <entry file="file://$PROJECT_DIR$/smartschool-platform.iml">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="171">
           <caret line="9" column="56" lean-forward="true" selection-start-line="9" selection-start-column="56" selection-end-line="9" selection-end-column="56" />
           <folding />
+=======
+    <entry file="file://$PROJECT_DIR$/applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/SysStudentMapper.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="423">
+          <caret line="29" column="22" lean-forward="false" selection-start-line="29" selection-start-column="9" selection-end-line="29" selection-end-column="22" />
+          <folding>
+            <element signature="imports" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/applications/school/school-server/src/main/resources/mapper/SysStudentMapper.xml">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="1544">
+          <caret line="326" column="2" lean-forward="false" selection-start-line="326" selection-start-column="2" selection-end-line="326" selection-end-column="2" />
+          <folding>
+            <marker date="1548207591859" expanded="true" signature="1793:1907" ph="select from sys_student" />
+            <marker date="1548207591859" expanded="true" signature="1991:2059" ph="delete from " />
+            <marker date="1548207591859" expanded="true" signature="2164:2922" ph="insert into sys_student... " />
+            <marker date="1548207591859" expanded="true" signature="5696:7230" ph="update sys_s... " />
+            <marker date="1548207591859" expanded="true" signature="7347:8126" ph="update sys_s... " />
+            <marker date="1548207591859" expanded="true" signature="8203:8228" ph="select * fro... sys_student" />
+            <marker date="1548207591859" expanded="true" signature="8203:8402" ph="select * fro... sys_student" />
+            <marker date="1548207591859" expanded="true" signature="9725:9842" ph="select * fro... sys_parents" />
+            <marker date="1548207591859" expanded="true" signature="9725:9845" ph="select sys_p... sys_parents" />
+            <marker date="1548207591859" expanded="true" signature="9725:9880" ph="select sys_p... sys_parents" />
+            <marker date="1548207591859" expanded="true" signature="12156:12226" ph="insert into sys_parents_stu... " />
+            <marker date="1548207591859" expanded="true" signature="12423:13713" ph="update saled... " />
+          </folding>
+>>>>>>> Stashed changes
         </state>
       </provider>
     </entry>

+ 55 - 0
applications/school/school-dto/src/main/java/com/usoftchina/smartschool/school/dto/DocBaseDTO.java

@@ -0,0 +1,55 @@
+package com.usoftchina.smartschool.school.dto;
+
+import java.io.Serializable;
+
+/**
+ * @author: guq
+ * @create: 2019-01-22 19:53
+ **/
+public class DocBaseDTO implements Serializable{
+    private Long id;
+    private String code;
+    private String name;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    @Override
+    public String toString() {
+        return "DocBaseDTO{" +
+                "id=" + id +
+                ", code='" + code + '\'' +
+                ", name='" + name + '\'' +
+                '}';
+    }
+
+    public DocBaseDTO(Long id, String code, String name) {
+        this.id = id;
+        this.code = code;
+        this.name = name;
+    }
+
+    public DocBaseDTO() {
+    }
+}

+ 4 - 0
applications/school/school-server/pom.xml

@@ -74,6 +74,10 @@
             <artifactId>school-dto</artifactId>
             <version>1.0.0-SNAPSHOT</version>
         </dependency>
+        <dependency>
+            <groupId>com.usoftchina.smartschool</groupId>
+            <artifactId>school-dto</artifactId>
+        </dependency>
     </dependencies>
 
     <build>

+ 1 - 1
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/SchoolApplication.java

@@ -12,7 +12,7 @@ import org.springframework.context.annotation.ComponentScan;
  * @create: 2019-01-16 17:41
  **/
 @SpringBootApplication
-@MapperScan("com.usoftchina.smartschool.school")
+@MapperScan("com.usoftchina.smartschool.school.mapper")
 @EnableEurekaClient
 @EnableFeignClients("com.usoftchina.smartschool")
 @ComponentScan(basePackages = {"com.usoftchina.smartschool"})

+ 4 - 6
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/controller/GradeController.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/controller/ClassController.java

@@ -1,16 +1,14 @@
-package com.usoftchina.smartschool.school.controller;
+package com.usoftchina.smartschool.school.basic.controller;
 
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 /**
  * @author: guq
- * @create: 2019-01-22 09:27
+ * @create: 2019-01-22 17:39
  **/
 @RestController
-@RequestMapping("/grade")
-public class GradeController {
-
-
+@RequestMapping("/class")
+public class ClassController {
 
 }

+ 37 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/controller/GradeController.java

@@ -0,0 +1,37 @@
+package com.usoftchina.smartschool.school.basic.controller;
+
+import com.usoftchina.smartschool.base.Result;
+import com.usoftchina.smartschool.school.basic.service.GradeService;
+import com.usoftchina.smartschool.school.po.SysSchool;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author: guq
+ * @create: 2019-01-22 09:27
+ **/
+@RestController
+@RequestMapping("/grade")
+public class GradeController {
+
+    @Autowired
+    private GradeService gradeService;
+
+    /**
+    * @Description 获取学校树状数据
+    * @Param: [id]
+    * @return: com.usoftchina.smartschool.base.Result
+    * @Author: guq
+    * @Date: 2019/1/22
+    */
+    @RequestMapping("/read/{id}")
+    public Result getSchoolTree(@PathVariable("id") Long id) {
+        SysSchool school = gradeService.getSchoolTree(id);
+        return Result.success(school);
+    }
+
+
+
+}

+ 2 - 2
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/controller/SchoolController.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/controller/SchoolController.java

@@ -1,8 +1,8 @@
-package com.usoftchina.smartschool.school.controller;
+package com.usoftchina.smartschool.school.basic.controller;
 
 import com.usoftchina.smartschool.base.Result;
+import com.usoftchina.smartschool.school.basic.service.SchoolService;
 import com.usoftchina.smartschool.school.po.SysSchool;
-import com.usoftchina.smartschool.school.service.SchoolService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestBody;

+ 52 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/controller/StudentController.java

@@ -0,0 +1,52 @@
+package com.usoftchina.smartschool.school.basic.controller;
+
+import com.github.pagehelper.PageInfo;
+import com.mysql.cj.api.xdevapi.DocResult;
+import com.usoftchina.smartschool.base.Result;
+import com.usoftchina.smartschool.page.PageDefault;
+import com.usoftchina.smartschool.page.PageRequest;
+import com.usoftchina.smartschool.school.basic.service.StudentService;
+import com.usoftchina.smartschool.school.dto.DocBaseDTO;
+import com.usoftchina.smartschool.school.dto.ListReqDTO;
+import com.usoftchina.smartschool.school.po.StudentForm;
+import com.usoftchina.smartschool.school.po.SysSchool;
+import com.usoftchina.smartschool.school.po.SysStudent;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author: guq
+ * @create: 2019-01-22 17:40
+ **/
+@RestController
+@RequestMapping("/student")
+public class StudentController {
+
+    @Autowired
+    private StudentService studentService;
+
+    @RequestMapping("/list")
+    public Result getList(@PageDefault PageRequest page, ListReqDTO listReqDTO) {
+        PageInfo<SysStudent> student = studentService.getListData(page, listReqDTO);
+        return Result.success(student);
+    }
+
+
+    @RequestMapping("/read/{id}")
+    public Result getFormData(@PathVariable("id") Long id) {
+         StudentForm formData = studentService.getFormData(id);
+        return Result.success(formData);
+    }
+
+    @RequestMapping("/save")
+    public Result getFormData(@RequestBody StudentForm form) {
+        DocBaseDTO formData = studentService.saveFormData(form);
+        return Result.success(formData);
+    }
+
+
+
+}

+ 15 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/controller/TeacherController.java

@@ -0,0 +1,15 @@
+package com.usoftchina.smartschool.school.basic.controller;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author: guq
+ * @create: 2019-01-22 17:40
+ **/
+@RestController
+@RequestMapping("teacher")
+public class TeacherController {
+
+
+}

+ 7 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/GradeService.java

@@ -0,0 +1,7 @@
+package com.usoftchina.smartschool.school.basic.service;
+
+import com.usoftchina.smartschool.school.po.SysSchool;
+
+public interface GradeService {
+    SysSchool getSchoolTree(Long id);
+}

+ 1 - 1
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/service/SchoolService.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/SchoolService.java

@@ -1,4 +1,4 @@
-package com.usoftchina.smartschool.school.service;
+package com.usoftchina.smartschool.school.basic.service;
 
 import com.usoftchina.smartschool.school.po.SysSchool;
 

+ 16 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/StudentService.java

@@ -0,0 +1,16 @@
+package com.usoftchina.smartschool.school.basic.service;
+
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.smartschool.page.PageRequest;
+import com.usoftchina.smartschool.school.dto.DocBaseDTO;
+import com.usoftchina.smartschool.school.dto.ListReqDTO;
+import com.usoftchina.smartschool.school.po.StudentForm;
+import com.usoftchina.smartschool.school.po.SysStudent;
+
+public interface StudentService {
+    PageInfo<SysStudent> getListData(PageRequest page, ListReqDTO listReqDTO);
+
+    StudentForm getFormData(Long id);
+
+    DocBaseDTO saveFormData(StudentForm form);
+}

+ 49 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/impl/GradeServiceImpl.java

@@ -0,0 +1,49 @@
+package com.usoftchina.smartschool.school.basic.service.impl;
+
+import com.usoftchina.smartschool.exception.BizException;
+import com.usoftchina.smartschool.school.basic.service.GradeService;
+import com.usoftchina.smartschool.school.exception.BizExceptionCode;
+import com.usoftchina.smartschool.school.mapper.SysClazzMapper;
+import com.usoftchina.smartschool.school.mapper.SysGradeMapper;
+import com.usoftchina.smartschool.school.mapper.SysSchoolMapper;
+import com.usoftchina.smartschool.school.po.SysClazz;
+import com.usoftchina.smartschool.school.po.SysGrade;
+import com.usoftchina.smartschool.school.po.SysSchool;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @author: guq
+ * @create: 2019-01-22 16:13
+ **/
+@Service
+public class GradeServiceImpl implements GradeService{
+
+    @Autowired
+    private SysSchoolMapper sysSchoolMapper;
+
+    @Autowired
+    private SysGradeMapper sysGradeMapper;
+
+    @Autowired
+    private SysClazzMapper sysClazzMapper;
+
+    @Override
+    public SysSchool getSchoolTree(Long id) {
+        if (null == id || "0".equals(id)) {
+            throw new BizException(BizExceptionCode.USELESS_DATA);
+        }
+        SysSchool school = sysSchoolMapper.selectByPrimaryKey(id);
+        List<SysGrade> grades = sysGradeMapper.selectBySchool(id);
+        if (null != grades && grades.size() > 0) {
+            for (SysGrade grade : grades) {
+                List<SysClazz> classes = sysClazzMapper.selectBygrade(grade.getGrade_id());
+                grade.setChildren(classes);
+            }
+        }
+        school.setChildren(grades);
+        return school;
+    }
+}

+ 3 - 3
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/service/impl/SchoolServiceImpl.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/impl/SchoolServiceImpl.java

@@ -1,10 +1,10 @@
-package com.usoftchina.smartschool.school.service.impl;
+package com.usoftchina.smartschool.school.basic.service.impl;
 
 import com.usoftchina.smartschool.exception.BizException;
+import com.usoftchina.smartschool.school.basic.service.SchoolService;
 import com.usoftchina.smartschool.school.exception.BizExceptionCode;
 import com.usoftchina.smartschool.school.mapper.SysSchoolMapper;
 import com.usoftchina.smartschool.school.po.SysSchool;
-import com.usoftchina.smartschool.school.service.SchoolService;
 import com.usoftchina.smartschool.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -14,7 +14,7 @@ import org.springframework.stereotype.Service;
  * @create: 2019-01-21 16:49
  **/
 @Service
-public class SchoolServiceImpl implements SchoolService{
+public class SchoolServiceImpl implements SchoolService {
 
     @Autowired
     private SysSchoolMapper sysSchoolMapper;

+ 120 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/impl/StudentServiceImpl.java

@@ -0,0 +1,120 @@
+package com.usoftchina.smartschool.school.basic.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.smartschool.context.BaseContextHolder;
+import com.usoftchina.smartschool.exception.BizException;
+import com.usoftchina.smartschool.page.PageRequest;
+import com.usoftchina.smartschool.school.basic.service.StudentService;
+import com.usoftchina.smartschool.school.dto.DocBaseDTO;
+import com.usoftchina.smartschool.school.dto.ListReqDTO;
+import com.usoftchina.smartschool.school.exception.BizExceptionCode;
+import com.usoftchina.smartschool.school.mapper.SysStudentMapper;
+import com.usoftchina.smartschool.school.po.StudentForm;
+import com.usoftchina.smartschool.school.po.SysParents;
+import com.usoftchina.smartschool.school.po.SysStudent;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.StringUtils;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author: guq
+ * @create: 2019-01-22 17:57
+ **/
+public class StudentServiceImpl implements StudentService{
+
+    @Autowired
+    private SysStudentMapper sysStudentMapper;
+
+    @Override
+    public PageInfo<SysStudent> getListData(PageRequest page, ListReqDTO listReqDTO) {
+        PageHelper.startPage(page.getNumber(), page.getSize());
+        Long schoolId = BaseContextHolder.getSchoolId();
+        //condition语句
+        String condition = listReqDTO.getFinalCondition();
+        if(condition == null){
+            condition = "1=1";
+        }
+        List<SysStudent> studentList = sysStudentMapper.selectByConditon(condition, schoolId);
+
+        return null;
+    }
+
+    @Override
+    public StudentForm getFormData(Long id) {
+        if (null == id || "0".equals(id)) {
+            throw new BizException(BizExceptionCode.USELESS_DATA);
+        }
+        SysStudent student = sysStudentMapper.selectByPrimaryKey(id);
+        List<SysParents> parents = sysStudentMapper.selectParent(id);
+        StudentForm studentForm = new StudentForm();
+        studentForm.setMain(student);
+        studentForm.setItems(parents);
+        return studentForm;
+    }
+
+    @Override
+    public DocBaseDTO saveFormData(StudentForm formdata) {
+        if (null == formdata || null == formdata.getMain()){
+            throw new BizException(BizExceptionCode.EMPTY_DATA);
+        }
+        SysStudent student = formdata.getMain();
+        List<SysParents> items = formdata.getItems();
+        Long id = student.getStu_id();
+        Long schoolid = BaseContextHolder.getSchoolId();
+        //插入从表数据
+        List<SysParents> insertDetails = new ArrayList<>();
+        //更新从表数据
+        List<SysParents> updateDetails = new ArrayList<>();
+        //新增学生
+        if (StringUtils.isEmpty(id) || "0".equals(id.toString())) {
+            student.setSchool_id(schoolid);
+            sysStudentMapper.insertSelective(student);
+            id = student.getStu_id();
+            if (null != items && items.size() > 0) {
+                Long pr_id = null;
+                for (SysParents item : items) {
+                    item.setSchool_id(schoolid);
+                    sysStudentMapper.insertparent(item);
+                    pr_id = item.getParent_id();
+                    sysStudentMapper.insertrelation(id, pr_id);
+                }
+            }
+            return new DocBaseDTO(id, null, "student");
+        }
+        //更新学生
+        sysStudentMapper.updateByPrimaryKeySelective(student);
+
+        //添加从表传输对象
+        for (SysParents detail : items) {
+            detail.setSchool_id(schoolid);
+            if (StringUtils.isEmpty(detail.getParent_id()) || "0".equals(detail.getParent_id().toString())) {
+                insertDetails.add(detail);
+            } else {
+                updateDetails.add(detail);
+            }
+        }
+        //插入从表
+        if (insertDetails.size() > 0) {
+            Long pr_id = null;
+            for (SysParents item : items) {
+                item.setSchool_id(schoolid);
+                sysStudentMapper.insertparent(item);
+                pr_id = item.getParent_id();
+                sysStudentMapper.insertrelation(id, pr_id);
+            }
+        }
+        //更新从表
+        if (updateDetails.size() > 0) {
+            sysStudentMapper.updateParents(updateDetails);
+            for (SysParents item : items) {
+                sysStudentMapper.updateRelation(item.getParent_id(), id, item.getPr_relation());
+            }
+        }
+
+        return null;
+    }
+}

+ 2 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/exception/BizExceptionCode.java

@@ -8,6 +8,8 @@ import com.usoftchina.smartschool.exception.BaseExceptionCode;
  **/
 public enum BizExceptionCode implements BaseExceptionCode {
 
+
+    EMPTY_DATA(76100,"数据为空,请填写后再保存"),
     USELESS_DATA(50001, "无效数据");
 
     private int code;

+ 21 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/SysClazzMapper.java

@@ -0,0 +1,21 @@
+package com.usoftchina.smartschool.school.mapper;
+
+import com.usoftchina.smartschool.school.po.SysClazz;
+
+import java.util.List;
+
+public interface SysClazzMapper {
+    int deleteByPrimaryKey(Long clazz_id);
+
+    int insert(SysClazz record);
+
+    int insertSelective(SysClazz record);
+
+    SysClazz selectByPrimaryKey(Long clazz_id);
+
+    int updateByPrimaryKeySelective(SysClazz record);
+
+    int updateByPrimaryKey(SysClazz record);
+
+    List<SysClazz> selectBygrade(Long id);
+}

+ 21 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/SysGradeMapper.java

@@ -0,0 +1,21 @@
+package com.usoftchina.smartschool.school.mapper;
+
+import com.usoftchina.smartschool.school.po.SysGrade;
+
+import java.util.List;
+
+public interface SysGradeMapper {
+    int deleteByPrimaryKey(Long grade_id);
+
+    int insert(SysGrade record);
+
+    int insertSelective(SysGrade record);
+
+    SysGrade selectByPrimaryKey(Long grade_id);
+
+    int updateByPrimaryKeySelective(SysGrade record);
+
+    int updateByPrimaryKey(SysGrade record);
+
+    List<SysGrade> selectBySchool(Long id);
+}

+ 33 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/SysStudentMapper.java

@@ -0,0 +1,33 @@
+package com.usoftchina.smartschool.school.mapper;
+
+import com.usoftchina.smartschool.school.po.SysParents;
+import com.usoftchina.smartschool.school.po.SysStudent;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface SysStudentMapper {
+    int deleteByPrimaryKey(Long stu_id);
+
+    int insert(SysStudent record);
+
+    int insertSelective(SysStudent record);
+
+    SysStudent selectByPrimaryKey(Long stu_id);
+
+    int updateByPrimaryKeySelective(SysStudent record);
+
+    int updateByPrimaryKey(SysStudent record);
+
+    List<SysStudent> selectByConditon(@Param("con") String con, @Param("schoolId") Long schoolId);
+
+    List<SysParents> selectParent(Long id);
+
+    void insertparent(SysParents item);
+
+    void insertrelation(@Param("id") Long id, @Param("pr_id") Long pr_id);
+
+    void updateParents(List<SysParents> updateDetails);
+
+    void updateRelation(@Param("parent_id") Long parent_id, @Param("id") Long id, @Param("relation") String relation);
+}

+ 29 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/StudentForm.java

@@ -0,0 +1,29 @@
+package com.usoftchina.smartschool.school.po;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @author: guq
+ * @create: 2019-01-22 19:26
+ **/
+public class StudentForm implements Serializable{
+    private SysStudent main;
+    private List<SysParents> items;
+
+    public SysStudent getMain() {
+        return main;
+    }
+
+    public void setMain(SysStudent main) {
+        this.main = main;
+    }
+
+    public List<SysParents> getItems() {
+        return items;
+    }
+
+    public void setItems(List<SysParents> items) {
+        this.items = items;
+    }
+}

+ 79 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/SysClazz.java

@@ -0,0 +1,79 @@
+package com.usoftchina.smartschool.school.po;
+
+/**
+ * @author: guq
+ * @create: 2019-01-22 16:12
+ **/
+public class SysClazz {
+
+    private Long clazz_id;
+
+    private String clazz_name;
+
+    private String clazz_adress;
+
+    private Integer clazz_status;
+
+    private String clazz_remarks;
+
+    private Long grade_id;
+
+    private Boolean leaf = true;
+
+    public Boolean getLeaf() {
+        return leaf;
+    }
+
+    public void setLeaf(Boolean leaf) {
+        this.leaf = leaf;
+    }
+
+    public Long getClazz_id() {
+        return clazz_id;
+    }
+
+    public void setClazz_id(Long clazz_id) {
+        this.clazz_id = clazz_id;
+    }
+
+    public String getClazz_name() {
+        return clazz_name;
+    }
+
+    public void setClazz_name(String clazz_name) {
+        this.clazz_name = clazz_name == null ? null : clazz_name.trim();
+    }
+
+    public String getClazz_adress() {
+        return clazz_adress;
+    }
+
+    public void setClazz_adress(String clazz_adress) {
+        this.clazz_adress = clazz_adress == null ? null : clazz_adress.trim();
+    }
+
+    public Integer getClazz_status() {
+        return clazz_status;
+    }
+
+    public void setClazz_status(Integer clazz_status) {
+        this.clazz_status = clazz_status;
+    }
+
+    public String getClazz_remarks() {
+        return clazz_remarks;
+    }
+
+    public void setClazz_remarks(String clazz_remarks) {
+        this.clazz_remarks = clazz_remarks == null ? null : clazz_remarks.trim();
+    }
+
+    public Long getGrade_id() {
+        return grade_id;
+    }
+
+    public void setGrade_id(Long grade_id) {
+        this.grade_id = grade_id;
+    }
+
+}

+ 91 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/SysGrade.java

@@ -0,0 +1,91 @@
+package com.usoftchina.smartschool.school.po;
+
+import java.util.List;
+
+/**
+ * @author: guq
+ * @create: 2019-01-22 16:11
+ **/
+public class SysGrade {
+
+    private Long grade_id;
+
+    private String grade_name;
+
+    private Integer grade_status;
+
+    private String grade_remarks;
+
+    private String grade_address;
+
+    private Long school_id;
+
+    private List<SysClazz> children;
+
+    private Boolean leaf = false;
+
+    public Boolean getLeaf() {
+        return leaf;
+    }
+
+    public void setLeaf(Boolean leaf) {
+        this.leaf = leaf;
+    }
+
+    public List<SysClazz> getChildren() {
+        return children;
+    }
+
+    public void setChildren(List<SysClazz> children) {
+        this.children = children;
+    }
+
+    public Long getGrade_id() {
+        return grade_id;
+    }
+
+    public void setGrade_id(Long grade_id) {
+        this.grade_id = grade_id;
+    }
+
+    public String getGrade_name() {
+        return grade_name;
+    }
+
+    public void setGrade_name(String grade_name) {
+        this.grade_name = grade_name == null ? null : grade_name.trim();
+    }
+
+    public Integer getGrade_status() {
+        return grade_status;
+    }
+
+    public void setGrade_status(Integer grade_status) {
+        this.grade_status = grade_status;
+    }
+
+    public String getGrade_remarks() {
+        return grade_remarks;
+    }
+
+    public void setGrade_remarks(String grade_remarks) {
+        this.grade_remarks = grade_remarks == null ? null : grade_remarks.trim();
+    }
+
+    public String getGrade_address() {
+        return grade_address;
+    }
+
+    public void setGrade_address(String grade_address) {
+        this.grade_address = grade_address == null ? null : grade_address.trim();
+    }
+
+    public Long getSchool_id() {
+        return school_id;
+    }
+
+    public void setSchool_id(Long school_id) {
+        this.school_id = school_id;
+    }
+
+}

+ 161 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/SysParents.java

@@ -0,0 +1,161 @@
+package com.usoftchina.smartschool.school.po;
+
+import java.util.Date;
+
+/**
+ * @author: guq
+ * @create: 2019-01-22 19:31
+ **/
+public class SysParents {
+
+    private Long parent_id;
+
+    private Long user_id;
+
+    private String openid;
+
+    private Long school_id;
+
+    private String parents_name;
+
+    private Date parents_birthday;
+
+    private Integer parents_sex;
+
+    private Integer parents_status;
+
+    private String parents_job;
+
+    private String parents_address;
+
+    private String parents_honor;
+
+    private String parents_remarks;
+
+    private String parents_photo;
+
+    private Long pr_stuid;
+
+    private String pr_relation;
+
+    public String getPr_relation() {
+        return pr_relation;
+    }
+
+    public void setPr_relation(String pr_relation) {
+        this.pr_relation = pr_relation;
+    }
+
+    public Long getPr_stuid() {
+        return pr_stuid;
+    }
+
+    public void setPr_stuid(Long pr_stuid) {
+        this.pr_stuid = pr_stuid;
+    }
+
+    public Long getParent_id() {
+        return parent_id;
+    }
+
+    public void setParent_id(Long parent_id) {
+        this.parent_id = parent_id;
+    }
+
+    public Long getUser_id() {
+        return user_id;
+    }
+
+    public void setUser_id(Long user_id) {
+        this.user_id = user_id;
+    }
+
+    public String getOpenid() {
+        return openid;
+    }
+
+    public void setOpenid(String openid) {
+        this.openid = openid == null ? null : openid.trim();
+    }
+
+    public Long getSchool_id() {
+        return school_id;
+    }
+
+    public void setSchool_id(Long school_id) {
+        this.school_id = school_id;
+    }
+
+    public String getParents_name() {
+        return parents_name;
+    }
+
+    public void setParents_name(String parents_name) {
+        this.parents_name = parents_name == null ? null : parents_name.trim();
+    }
+
+    public Date getParents_birthday() {
+        return parents_birthday;
+    }
+
+    public void setParents_birthday(Date parents_birthday) {
+        this.parents_birthday = parents_birthday;
+    }
+
+    public Integer getParents_sex() {
+        return parents_sex;
+    }
+
+    public void setParents_sex(Integer parents_sex) {
+        this.parents_sex = parents_sex;
+    }
+
+    public Integer getParents_status() {
+        return parents_status;
+    }
+
+    public void setParents_status(Integer parents_status) {
+        this.parents_status = parents_status;
+    }
+
+    public String getParents_job() {
+        return parents_job;
+    }
+
+    public void setParents_job(String parents_job) {
+        this.parents_job = parents_job == null ? null : parents_job.trim();
+    }
+
+    public String getParents_address() {
+        return parents_address;
+    }
+
+    public void setParents_address(String parents_address) {
+        this.parents_address = parents_address == null ? null : parents_address.trim();
+    }
+
+    public String getParents_honor() {
+        return parents_honor;
+    }
+
+    public void setParents_honor(String parents_honor) {
+        this.parents_honor = parents_honor == null ? null : parents_honor.trim();
+    }
+
+    public String getParents_remarks() {
+        return parents_remarks;
+    }
+
+    public void setParents_remarks(String parents_remarks) {
+        this.parents_remarks = parents_remarks == null ? null : parents_remarks.trim();
+    }
+
+    public String getParents_photo() {
+        return parents_photo;
+    }
+
+    public void setParents_photo(String parents_photo) {
+        this.parents_photo = parents_photo == null ? null : parents_photo.trim();
+    }
+
+}

+ 21 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/SysSchool.java

@@ -1,6 +1,7 @@
 package com.usoftchina.smartschool.school.po;
 
 import java.io.Serializable;
+import java.util.List;
 
 /**
  * @author: guq
@@ -24,6 +25,26 @@ public class SysSchool implements Serializable{
 
     private String school_secret;
 
+    private List<SysGrade> children;
+
+    private Boolean leaf = false;
+
+    public Boolean getLeaf() {
+        return leaf;
+    }
+
+    public void setLeaf(Boolean leaf) {
+        this.leaf = leaf;
+    }
+
+    public List<SysGrade> getChildren() {
+        return children;
+    }
+
+    public void setChildren(List<SysGrade> children) {
+        this.children = children;
+    }
+
     public Long getSchool_id() {
         return school_id;
     }

+ 159 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/SysStudent.java

@@ -0,0 +1,159 @@
+package com.usoftchina.smartschool.school.po;
+
+import java.util.Date;
+
+/**
+ * @author: guq
+ * @create: 2019-01-22 17:50
+ **/
+public class SysStudent {
+    private Long stu_id;
+
+    private String stu_number;
+
+    private String stu_name;
+
+    private Date stu_enroll_date;
+
+    private Date stu_graduate_date;
+
+    private Date stu_birthday;
+
+    private Integer stu_age;
+
+    private Integer stu_sex;
+
+    private String stu_address;
+
+    private String stu_photo;
+
+    private Integer stu_status;
+
+    private Integer stu_is_write;
+
+    private String stu_remarks;
+
+    private Long clazz_id;
+
+    private Long school_id;
+
+    public Long getStu_id() {
+        return stu_id;
+    }
+
+    public void setStu_id(Long stu_id) {
+        this.stu_id = stu_id;
+    }
+
+    public String getStu_number() {
+        return stu_number;
+    }
+
+    public void setStu_number(String stu_number) {
+        this.stu_number = stu_number == null ? null : stu_number.trim();
+    }
+
+    public String getStu_name() {
+        return stu_name;
+    }
+
+    public void setStu_name(String stu_name) {
+        this.stu_name = stu_name == null ? null : stu_name.trim();
+    }
+
+    public Date getStu_enroll_date() {
+        return stu_enroll_date;
+    }
+
+    public void setStu_enroll_date(Date stu_enroll_date) {
+        this.stu_enroll_date = stu_enroll_date;
+    }
+
+    public Date getStu_graduate_date() {
+        return stu_graduate_date;
+    }
+
+    public void setStu_graduate_date(Date stu_graduate_date) {
+        this.stu_graduate_date = stu_graduate_date;
+    }
+
+    public Date getStu_birthday() {
+        return stu_birthday;
+    }
+
+    public void setStu_birthday(Date stu_birthday) {
+        this.stu_birthday = stu_birthday;
+    }
+
+    public Integer getStu_age() {
+        return stu_age;
+    }
+
+    public void setStu_age(Integer stu_age) {
+        this.stu_age = stu_age;
+    }
+
+    public Integer getStu_sex() {
+        return stu_sex;
+    }
+
+    public void setStu_sex(Integer stu_sex) {
+        this.stu_sex = stu_sex;
+    }
+
+    public String getStu_address() {
+        return stu_address;
+    }
+
+    public void setStu_address(String stu_address) {
+        this.stu_address = stu_address == null ? null : stu_address.trim();
+    }
+
+    public String getStu_photo() {
+        return stu_photo;
+    }
+
+    public void setStu_photo(String stu_photo) {
+        this.stu_photo = stu_photo == null ? null : stu_photo.trim();
+    }
+
+    public Integer getStu_status() {
+        return stu_status;
+    }
+
+    public void setStu_status(Integer stu_status) {
+        this.stu_status = stu_status;
+    }
+
+    public Integer getStu_is_write() {
+        return stu_is_write;
+    }
+
+    public void setStu_is_write(Integer stu_is_write) {
+        this.stu_is_write = stu_is_write;
+    }
+
+    public String getStu_remarks() {
+        return stu_remarks;
+    }
+
+    public void setStu_remarks(String stu_remarks) {
+        this.stu_remarks = stu_remarks == null ? null : stu_remarks.trim();
+    }
+
+    public Long getClazz_id() {
+        return clazz_id;
+    }
+
+    public void setClazz_id(Long clazz_id) {
+        this.clazz_id = clazz_id;
+    }
+
+    public Long getSchool_id() {
+        return school_id;
+    }
+
+    public void setSchool_id(Long school_id) {
+        this.school_id = school_id;
+    }
+}

+ 111 - 0
applications/school/school-server/src/main/resources/mapper/SysClazzMapper.xml

@@ -0,0 +1,111 @@
+<?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.usoftchina.smartschool.school.mapper.SysClazzMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.smartschool.school.po.SysClazz" >
+    <id column="clazz_id" property="clazz_id" jdbcType="BIGINT" />
+    <result column="clazz_name" property="clazz_name" jdbcType="VARCHAR" />
+    <result column="clazz_adress" property="clazz_adress" jdbcType="VARCHAR" />
+    <result column="clazz_status" property="clazz_status" jdbcType="INTEGER" />
+    <result column="clazz_remarks" property="clazz_remarks" jdbcType="VARCHAR" />
+    <result column="grade_id" property="grade_id" jdbcType="BIGINT" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    clazz_id, clazz_name, clazz_adress, clazz_status, clazz_remarks, grade_id
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
+    select 
+    <include refid="Base_Column_List" />
+    from sys_clazz
+    where clazz_id = #{clazz_id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
+    delete from sys_clazz
+    where clazz_id = #{clazz_id,jdbcType=BIGINT}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.smartschool.school.po.SysClazz" >
+
+    insert into sys_clazz (clazz_id, clazz_name, clazz_adress, 
+      clazz_status, clazz_remarks, grade_id
+      )
+    values (#{clazz_id,jdbcType=BIGINT}, #{clazz_name,jdbcType=VARCHAR}, #{clazz_adress,jdbcType=VARCHAR}, 
+      #{clazz_status,jdbcType=INTEGER}, #{clazz_remarks,jdbcType=VARCHAR}, #{grade_id,jdbcType=BIGINT}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.smartschool.school.po.SysClazz" >
+    insert into sys_clazz
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="clazz_id != null" >
+        clazz_id,
+      </if>
+      <if test="clazz_name != null" >
+        clazz_name,
+      </if>
+      <if test="clazz_adress != null" >
+        clazz_adress,
+      </if>
+      <if test="clazz_status != null" >
+        clazz_status,
+      </if>
+      <if test="clazz_remarks != null" >
+        clazz_remarks,
+      </if>
+      <if test="grade_id != null" >
+        grade_id,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="clazz_id != null" >
+        #{clazz_id,jdbcType=BIGINT},
+      </if>
+      <if test="clazz_name != null" >
+        #{clazz_name,jdbcType=VARCHAR},
+      </if>
+      <if test="clazz_adress != null" >
+        #{clazz_adress,jdbcType=VARCHAR},
+      </if>
+      <if test="clazz_status != null" >
+        #{clazz_status,jdbcType=INTEGER},
+      </if>
+      <if test="clazz_remarks != null" >
+        #{clazz_remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="grade_id != null" >
+        #{grade_id,jdbcType=BIGINT},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.smartschool.school.po.SysClazz" >
+    update sys_clazz
+    <set >
+      <if test="clazz_name != null" >
+        clazz_name = #{clazz_name,jdbcType=VARCHAR},
+      </if>
+      <if test="clazz_adress != null" >
+        clazz_adress = #{clazz_adress,jdbcType=VARCHAR},
+      </if>
+      <if test="clazz_status != null" >
+        clazz_status = #{clazz_status,jdbcType=INTEGER},
+      </if>
+      <if test="clazz_remarks != null" >
+        clazz_remarks = #{clazz_remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="grade_id != null" >
+        grade_id = #{grade_id,jdbcType=BIGINT},
+      </if>
+    </set>
+    where clazz_id = #{clazz_id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.smartschool.school.po.SysClazz" >
+    update sys_clazz
+    set clazz_name = #{clazz_name,jdbcType=VARCHAR},
+      clazz_adress = #{clazz_adress,jdbcType=VARCHAR},
+      clazz_status = #{clazz_status,jdbcType=INTEGER},
+      clazz_remarks = #{clazz_remarks,jdbcType=VARCHAR},
+      grade_id = #{grade_id,jdbcType=BIGINT}
+    where clazz_id = #{clazz_id,jdbcType=BIGINT}
+  </update>
+
+  <select id="selectBygrade" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select * from sys_clazz where grade_id = #{id}
+  </select>
+</mapper>

+ 109 - 0
applications/school/school-server/src/main/resources/mapper/SysGradeMapper.xml

@@ -0,0 +1,109 @@
+<?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.usoftchina.smartschool.school.mapper.SysGradeMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.smartschool.school.po.SysGrade" >
+    <id column="grade_id" property="grade_id" jdbcType="BIGINT" />
+    <result column="grade_name" property="grade_name" jdbcType="VARCHAR" />
+    <result column="grade_status" property="grade_status" jdbcType="INTEGER" />
+    <result column="grade_remarks" property="grade_remarks" jdbcType="VARCHAR" />
+    <result column="grade_address" property="grade_address" jdbcType="VARCHAR" />
+    <result column="school_id" property="school_id" jdbcType="BIGINT" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    grade_id, grade_name, grade_status, grade_remarks, grade_address, school_id
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
+    select 
+    <include refid="Base_Column_List" />
+    from sys_grade
+    where grade_id = #{grade_id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
+    delete from sys_grade
+    where grade_id = #{grade_id,jdbcType=BIGINT}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.smartschool.school.po.SysGrade" >
+    insert into sys_grade (grade_id, grade_name, grade_status, 
+      grade_remarks, grade_address, school_id
+      )
+    values (#{grade_id,jdbcType=BIGINT}, #{grade_name,jdbcType=VARCHAR}, #{grade_status,jdbcType=INTEGER}, 
+      #{grade_remarks,jdbcType=VARCHAR}, #{grade_address,jdbcType=VARCHAR}, #{school_id,jdbcType=BIGINT}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.smartschool.school.po.SysGrade" >
+    insert into sys_grade
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="grade_id != null" >
+        grade_id,
+      </if>
+      <if test="grade_name != null" >
+        grade_name,
+      </if>
+      <if test="grade_status != null" >
+        grade_status,
+      </if>
+      <if test="grade_remarks != null" >
+        grade_remarks,
+      </if>
+      <if test="grade_address != null" >
+        grade_address,
+      </if>
+      <if test="school_id != null" >
+        school_id,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="grade_id != null" >
+        #{grade_id,jdbcType=BIGINT},
+      </if>
+      <if test="grade_name != null" >
+        #{grade_name,jdbcType=VARCHAR},
+      </if>
+      <if test="grade_status != null" >
+        #{grade_status,jdbcType=INTEGER},
+      </if>
+      <if test="grade_remarks != null" >
+        #{grade_remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="grade_address != null" >
+        #{grade_address,jdbcType=VARCHAR},
+      </if>
+      <if test="school_id != null" >
+        #{school_id,jdbcType=BIGINT},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.smartschool.school.po.SysGrade" >
+    update sys_grade
+    <set >
+      <if test="grade_name != null" >
+        grade_name = #{grade_name,jdbcType=VARCHAR},
+      </if>
+      <if test="grade_status != null" >
+        grade_status = #{grade_status,jdbcType=INTEGER},
+      </if>
+      <if test="grade_remarks != null" >
+        grade_remarks = #{grade_remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="grade_address != null" >
+        grade_address = #{grade_address,jdbcType=VARCHAR},
+      </if>
+      <if test="school_id != null" >
+        school_id = #{school_id,jdbcType=BIGINT},
+      </if>
+    </set>
+    where grade_id = #{grade_id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.smartschool.school.po.SysGrade" >
+    update sys_grade
+    set grade_name = #{grade_name,jdbcType=VARCHAR},
+      grade_status = #{grade_status,jdbcType=INTEGER},
+      grade_remarks = #{grade_remarks,jdbcType=VARCHAR},
+      grade_address = #{grade_address,jdbcType=VARCHAR},
+      school_id = #{school_id,jdbcType=BIGINT}
+    where grade_id = #{grade_id,jdbcType=BIGINT}
+  </update>
+  <select id="selectBySchool" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select * from sys_grade where school_id = #{id}
+  </select>
+</mapper>

+ 341 - 0
applications/school/school-server/src/main/resources/mapper/SysStudentMapper.xml

@@ -0,0 +1,341 @@
+<?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.usoftchina.smartschool.school.mapper.SysStudentMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.smartschool.school.po.SysStudent" >
+    <id column="stu_id" property="stu_id" jdbcType="BIGINT" />
+    <result column="stu_number" property="stu_number" jdbcType="VARCHAR" />
+    <result column="stu_name" property="stu_name" jdbcType="VARCHAR" />
+    <result column="stu_enroll_date" property="stu_enroll_date" jdbcType="DATE" />
+    <result column="stu_graduate_date" property="stu_graduate_date" jdbcType="DATE" />
+    <result column="stu_birthday" property="stu_birthday" jdbcType="DATE" />
+    <result column="stu_age" property="stu_age" jdbcType="INTEGER" />
+    <result column="stu_sex" property="stu_sex" jdbcType="INTEGER" />
+    <result column="stu_address" property="stu_address" jdbcType="VARCHAR" />
+    <result column="stu_photo" property="stu_photo" jdbcType="VARCHAR" />
+    <result column="stu_status" property="stu_status" jdbcType="INTEGER" />
+    <result column="stu_is_write" property="stu_is_write" jdbcType="INTEGER" />
+    <result column="stu_remarks" property="stu_remarks" jdbcType="VARCHAR" />
+    <result column="clazz_id" property="clazz_id" jdbcType="BIGINT" />
+    <result column="school_id" property="school_id" jdbcType="BIGINT" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    stu_id, stu_number, stu_name, stu_enroll_date, stu_graduate_date, stu_birthday, stu_age, 
+    stu_sex, stu_address, stu_photo, stu_status, stu_is_write, stu_remarks, clazz_id, 
+    school_id
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
+    select 
+    <include refid="Base_Column_List" />
+    from sys_student
+    where stu_id = #{stu_id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
+    delete from sys_student
+    where stu_id = #{stu_id,jdbcType=BIGINT}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.smartschool.school.po.SysStudent" >
+    insert into sys_student (stu_id, stu_number, stu_name, 
+      stu_enroll_date, stu_graduate_date, stu_birthday, 
+      stu_age, stu_sex, stu_address, 
+      stu_photo, stu_status, stu_is_write, 
+      stu_remarks, clazz_id, school_id
+      )
+    values (#{stu_id,jdbcType=BIGINT}, #{stu_number,jdbcType=VARCHAR}, #{stu_name,jdbcType=VARCHAR}, 
+      #{stu_enroll_date,jdbcType=DATE}, #{stu_graduate_date,jdbcType=DATE}, #{stu_birthday,jdbcType=DATE}, 
+      #{stu_age,jdbcType=INTEGER}, #{stu_sex,jdbcType=INTEGER}, #{stu_address,jdbcType=VARCHAR}, 
+      #{stu_photo,jdbcType=VARCHAR}, #{stu_status,jdbcType=INTEGER}, #{stu_is_write,jdbcType=INTEGER}, 
+      #{stu_remarks,jdbcType=VARCHAR}, #{clazz_id,jdbcType=BIGINT}, #{school_id,jdbcType=BIGINT}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.smartschool.school.po.SysStudent" >
+    <selectKey  resultType="java.lang.Long" keyProperty="stu_id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
+    insert into sys_student
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="stu_number != null" >
+        stu_number,
+      </if>
+      <if test="stu_name != null" >
+        stu_name,
+      </if>
+      <if test="stu_enroll_date != null" >
+        stu_enroll_date,
+      </if>
+      <if test="stu_graduate_date != null" >
+        stu_graduate_date,
+      </if>
+      <if test="stu_birthday != null" >
+        stu_birthday,
+      </if>
+      <if test="stu_age != null" >
+        stu_age,
+      </if>
+      <if test="stu_sex != null" >
+        stu_sex,
+      </if>
+      <if test="stu_address != null" >
+        stu_address,
+      </if>
+      <if test="stu_photo != null" >
+        stu_photo,
+      </if>
+      <if test="stu_status != null" >
+        stu_status,
+      </if>
+      <if test="stu_is_write != null" >
+        stu_is_write,
+      </if>
+      <if test="stu_remarks != null" >
+        stu_remarks,
+      </if>
+      <if test="clazz_id != null" >
+        clazz_id,
+      </if>
+      <if test="school_id != null" >
+        school_id,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="stu_number != null" >
+        #{stu_number,jdbcType=VARCHAR},
+      </if>
+      <if test="stu_name != null" >
+        #{stu_name,jdbcType=VARCHAR},
+      </if>
+      <if test="stu_enroll_date != null" >
+        #{stu_enroll_date,jdbcType=DATE},
+      </if>
+      <if test="stu_graduate_date != null" >
+        #{stu_graduate_date,jdbcType=DATE},
+      </if>
+      <if test="stu_birthday != null" >
+        #{stu_birthday,jdbcType=DATE},
+      </if>
+      <if test="stu_age != null" >
+        #{stu_age,jdbcType=INTEGER},
+      </if>
+      <if test="stu_sex != null" >
+        #{stu_sex,jdbcType=INTEGER},
+      </if>
+      <if test="stu_address != null" >
+        #{stu_address,jdbcType=VARCHAR},
+      </if>
+      <if test="stu_photo != null" >
+        #{stu_photo,jdbcType=VARCHAR},
+      </if>
+      <if test="stu_status != null" >
+        #{stu_status,jdbcType=INTEGER},
+      </if>
+      <if test="stu_is_write != null" >
+        #{stu_is_write,jdbcType=INTEGER},
+      </if>
+      <if test="stu_remarks != null" >
+        #{stu_remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="clazz_id != null" >
+        #{clazz_id,jdbcType=BIGINT},
+      </if>
+      <if test="school_id != null" >
+        #{school_id,jdbcType=BIGINT},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.smartschool.school.po.SysStudent" >
+    update sys_student
+    <set >
+      <if test="stu_number != null" >
+        stu_number = #{stu_number,jdbcType=VARCHAR},
+      </if>
+      <if test="stu_name != null" >
+        stu_name = #{stu_name,jdbcType=VARCHAR},
+      </if>
+      <if test="stu_enroll_date != null" >
+        stu_enroll_date = #{stu_enroll_date,jdbcType=DATE},
+      </if>
+      <if test="stu_graduate_date != null" >
+        stu_graduate_date = #{stu_graduate_date,jdbcType=DATE},
+      </if>
+      <if test="stu_birthday != null" >
+        stu_birthday = #{stu_birthday,jdbcType=DATE},
+      </if>
+      <if test="stu_age != null" >
+        stu_age = #{stu_age,jdbcType=INTEGER},
+      </if>
+      <if test="stu_sex != null" >
+        stu_sex = #{stu_sex,jdbcType=INTEGER},
+      </if>
+      <if test="stu_address != null" >
+        stu_address = #{stu_address,jdbcType=VARCHAR},
+      </if>
+      <if test="stu_photo != null" >
+        stu_photo = #{stu_photo,jdbcType=VARCHAR},
+      </if>
+      <if test="stu_status != null" >
+        stu_status = #{stu_status,jdbcType=INTEGER},
+      </if>
+      <if test="stu_is_write != null" >
+        stu_is_write = #{stu_is_write,jdbcType=INTEGER},
+      </if>
+      <if test="stu_remarks != null" >
+        stu_remarks = #{stu_remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="clazz_id != null" >
+        clazz_id = #{clazz_id,jdbcType=BIGINT},
+      </if>
+      <if test="school_id != null" >
+        school_id = #{school_id,jdbcType=BIGINT},
+      </if>
+    </set>
+    where stu_id = #{stu_id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.smartschool.school.po.SysStudent" >
+    update sys_student
+    set stu_number = #{stu_number,jdbcType=VARCHAR},
+      stu_name = #{stu_name,jdbcType=VARCHAR},
+      stu_enroll_date = #{stu_enroll_date,jdbcType=DATE},
+      stu_graduate_date = #{stu_graduate_date,jdbcType=DATE},
+      stu_birthday = #{stu_birthday,jdbcType=DATE},
+      stu_age = #{stu_age,jdbcType=INTEGER},
+      stu_sex = #{stu_sex,jdbcType=INTEGER},
+      stu_address = #{stu_address,jdbcType=VARCHAR},
+      stu_photo = #{stu_photo,jdbcType=VARCHAR},
+      stu_status = #{stu_status,jdbcType=INTEGER},
+      stu_is_write = #{stu_is_write,jdbcType=INTEGER},
+      stu_remarks = #{stu_remarks,jdbcType=VARCHAR},
+      clazz_id = #{clazz_id,jdbcType=BIGINT},
+      school_id = #{school_id,jdbcType=BIGINT}
+    where stu_id = #{stu_id,jdbcType=BIGINT}
+  </update>
+
+  <select id="selectByConditon" resultMap="BaseResultMap">
+    select * from sys_student
+    <where>
+    <if test="con != null">
+      ${con}
+    </if>
+    <if test="schoolId != null">
+      and school_id=#{schoolId}
+    </if>
+  </where>
+    ORDER BY stu_id DESC
+  </select>
+
+  <resultMap id="parentMap" type="com.usoftchina.smartschool.school.po.SysParents" >
+    <id column="parent_id" property="parent_id" jdbcType="BIGINT" />
+    <result column="user_id" property="user_id" jdbcType="BIGINT" />
+    <result column="openid" property="openid" jdbcType="VARCHAR" />
+    <result column="school_id" property="school_id" jdbcType="BIGINT" />
+    <result column="parents_name" property="parents_name" jdbcType="VARCHAR" />
+    <result column="parents_birthday" property="parents_birthday" jdbcType="DATE" />
+    <result column="parents_sex" property="parents_sex" jdbcType="INTEGER" />
+    <result column="parents_status" property="parents_status" jdbcType="INTEGER" />
+    <result column="parents_job" property="parents_job" jdbcType="VARCHAR" />
+    <result column="parents_address" property="parents_address" jdbcType="VARCHAR" />
+    <result column="parents_honor" property="parents_honor" jdbcType="VARCHAR" />
+    <result column="parents_remarks" property="parents_remarks" jdbcType="VARCHAR" />
+  </resultMap>
+  <resultMap id="ResultMapWithBLOBs" type="com.usoftchina.smartschool.school.po.SysParents" extends="parentMap" >
+    <result column="parents_photo" property="parents_photo" jdbcType="LONGVARCHAR" />
+  </resultMap>
+
+  <select id="selectParent" resultMap="parentMap">
+    select sys_parents.* from sys_parents left join sys_parents_stu on sys_parents.parent_id =
+    sys_parents_stu.parent_id where sys_parents_stu.stu_id=#{id}
+  </select>
+
+  <insert id="insertparent" parameterType="com.usoftchina.smartschool.school.po.SysParents" >
+    <selectKey  resultType="java.lang.Long" keyProperty="parent_id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
+    insert into sys_parents
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="user_id != null" >
+        user_id,
+      </if>
+      <if test="openid != null" >
+        openid,
+      </if>
+      <if test="school_id != null" >
+        school_id,
+      </if>
+      <if test="parents_name != null" >
+        parents_name,
+      </if>
+      <if test="parents_birthday != null" >
+        parents_birthday,
+      </if>
+      <if test="parents_sex != null" >
+        parents_sex,
+      </if>
+      <if test="parents_status != null" >
+        parents_status,
+      </if>
+      <if test="parents_job != null" >
+        parents_job,
+      </if>
+      <if test="parents_address != null" >
+        parents_address,
+      </if>
+      <if test="parents_honor != null" >
+        parents_honor,
+      </if>
+      <if test="parents_remarks != null" >
+        parents_remarks,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="user_id != null" >
+        #{user_id,jdbcType=BIGINT},
+      </if>
+      <if test="openid != null" >
+        #{openid,jdbcType=VARCHAR},
+      </if>
+      <if test="school_id != null" >
+        #{school_id,jdbcType=BIGINT},
+      </if>
+      <if test="parents_name != null" >
+        #{parents_name,jdbcType=VARCHAR},
+      </if>
+      <if test="parents_birthday != null" >
+        #{parents_birthday,jdbcType=DATE},
+      </if>
+      <if test="parents_sex != null" >
+        #{parents_sex,jdbcType=INTEGER},
+      </if>
+      <if test="parents_status != null" >
+        #{parents_status,jdbcType=INTEGER},
+      </if>
+      <if test="parents_job != null" >
+        #{parents_job,jdbcType=VARCHAR},
+      </if>
+      <if test="parents_address != null" >
+        #{parents_address,jdbcType=VARCHAR},
+      </if>
+      <if test="parents_honor != null" >
+        #{parents_honor,jdbcType=VARCHAR},
+      </if>
+      <if test="parents_remarks != null" >
+        #{parents_remarks,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+
+  <insert id="insertrelation">
+    insert into sys_parents_stu (stu_id,parent_id) VALUES (#{id},#{pr_id})
+  </insert>
+
+  <update id="updateParents" parameterType="com.usoftchina.smartschool.school.po.SysParents" >
+    <foreach collection="list" item="item" index="index" open="" close="" separator=";">
+      update sys_parents <set>
+      parents_name = #{item.parents_name,jdbcType=VARCHAR}
+    </set>
+      where parent_id = #{item.parent_id,jdbcType=BIGINT}
+    </foreach>
+  </update>
+
+
+  <update id="updateRelation">
+    update sys_parents_stu set ps_relation=#{relation} where parent_id=#{parent_id} and stu_id =#{id}
+  </update>
+</mapper>

+ 5 - 0
framework/core/src/main/java/com/usoftchina/smartschool/constant/CommonConstants.java

@@ -11,6 +11,11 @@ public class CommonConstants {
      * ThreadLocal中的companyId key
      */
     public static final String CONTEXT_KEY_COMPANY_ID = "currentCompanyId";
+
+    /**
+     * ThreadLocal中的schoolId key
+     */
+    public static final String CONTEXT_KEY_SCHOOL_ID = "currentSchoolId";
     /***
      * ThreadLocal中的登录用户Id key
      */

+ 10 - 0
framework/core/src/main/java/com/usoftchina/smartschool/context/BaseContextHolder.java

@@ -47,10 +47,20 @@ public class BaseContextHolder {
         return ObjectUtils.getLongValue(value);
     }
 
+    public static void setSchoolId(long schoolId) {
+        set(CommonConstants.CONTEXT_KEY_SCHOOL_ID, schoolId);
+    }
+
+    public static Long getSchoolId() {
+        Object value = get(CommonConstants.CONTEXT_KEY_SCHOOL_ID);
+        return ObjectUtils.getLongValue(value);
+    }
+
     public static void setCompanyId(long companyId) {
         set(CommonConstants.CONTEXT_KEY_COMPANY_ID, companyId);
     }
 
+
     public static String getAppId() {
         Object value = get(CommonConstants.CONTEXT_KEY_APP_ID);
         return ObjectUtils.getStringValue(value);