Browse Source

Merge branch 'dev' of ssh://10.10.100.21/source/smartschool-platform into dev

jinsy 6 years ago
parent
commit
f1c405e939
100 changed files with 1151 additions and 709 deletions
  1. 11 11
      README.md
  2. 39 0
      applications/school/school-server/pom.xml
  3. 5 13
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/SchoolApplication.java
  4. 2 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/DataImportMapper.java
  5. 2 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/DataTempletMapper.java
  6. 2 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/SysClazzMapper.java
  7. 2 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/SysGradeMapper.java
  8. 2 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/SysSchoolMapper.java
  9. 2 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/SysStudentMapper.java
  10. 4 1
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/SysTeacherMapper.java
  11. 1 1
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/ClazzAlbumDO.java
  12. 4 2
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/ClazzCurriculumDO.java
  13. 1 2
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/ClazzDO.java
  14. 1 2
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/ClazzPictureDO.java
  15. 1 2
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/FileDO.java
  16. 1 3
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/GradeDO.java
  17. 1 1
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/MeetingDO.java
  18. 1 2
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/MeetingRecordsDO.java
  19. 2 1
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/NotifyDO.java
  20. 1 2
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/NotifyrecordsDO.java
  21. 1 1
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/OaApproveDO.java
  22. 1 3
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/OaArticlesDO.java
  23. 1 1
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/OaLeaveDO.java
  24. 1 2
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/OaLeaveReplyDO.java
  25. 1 2
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/OutInRecordDO.java
  26. 1 2
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/ParentsDO.java
  27. 1 3
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/ParentsStuDO.java
  28. 1 3
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/PayCardDO.java
  29. 1 2
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/PayRanksDO.java
  30. 1 2
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/PaymentDO.java
  31. 1 2
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/PaymentrecordsDO.java
  32. 1 2
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/PrincipalMailboxDO.java
  33. 1 2
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/PrincipalReplyDO.java
  34. 1 3
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/SchoolDO.java
  35. 1 2
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/StuScoreDO.java
  36. 1 1
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/StudentDO.java
  37. 1 3
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/SubjectDO.java
  38. 1 2
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/TaskNotifyDO.java
  39. 1 2
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/TaskReplyDO.java
  40. 1 3
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/TeacherClazzDO.java
  41. 1 2
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/TeacherDO.java
  42. 1 3
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/UserDO.java
  43. 1 3
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/UserRoleDO.java
  44. 1 1
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/VoteDO.java
  45. 1 3
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/VoteElectDO.java
  46. 1 2
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/VoteOptionsDO.java
  47. 1 1
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/VoteTopicDO.java
  48. 6 6
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxClazzAlbumController.java
  49. 8 9
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxClazzController.java
  50. 8 8
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxClazzCurriculumController.java
  51. 6 9
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxClazzPictureController.java
  52. 5 5
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxFileController.java
  53. 7 7
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxMeetingController.java
  54. 7 7
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxNotifyController.java
  55. 6 6
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxOaApproveController.java
  56. 7 7
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxOaLeaveController.java
  57. 9 8
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxOutInRecordController.java
  58. 6 6
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxPrincipalMailboxController.java
  59. 6 8
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxSchoolController.java
  60. 5 5
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxStuScoreController.java
  61. 10 15
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxTaskNotifyController.java
  62. 35 15
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxUserController.java
  63. 7 7
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxVoteController.java
  64. 5 5
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/WxClazzAlbumService.java
  65. 3 5
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/WxClazzCurriculumService.java
  66. 4 4
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/WxClazzPictureService.java
  67. 8 6
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/WxClazzService.java
  68. 2 2
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/WxFileService.java
  69. 8 10
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/WxMeetingService.java
  70. 8 8
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/WxNotifyService.java
  71. 47 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/WxOaApproveService.java
  72. 4 19
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/WxOaLeaveService.java
  73. 4 5
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/WxOutInRecordService.java
  74. 5 19
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/WxPrincipalMailboxService.java
  75. 3 3
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/WxSchoolService.java
  76. 3 4
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/WxStuScoreService.java
  77. 63 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/WxTaskNotifyService.java
  78. 3 4
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/WxUserService.java
  79. 7 7
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/WxVoteService.java
  80. 14 17
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxClazzAlbumServiceImpl.java
  81. 171 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxClazzCurriculumServiceImpl.java
  82. 12 14
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxClazzPictureServiceImpl.java
  83. 23 26
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxClazzServiceImpl.java
  84. 10 17
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxFileServiceImpl.java
  85. 28 20
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxMeetingServiceImpl.java
  86. 44 14
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxNotifyServiceImpl.java
  87. 34 23
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxOaApproveServiceImpl.java
  88. 24 56
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxOaLeaveServiceImpl.java
  89. 74 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxOutInRecordServiceImpl.java
  90. 26 56
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxPrincipalMailboxServiceImpl.java
  91. 24 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxSchoolServiceImpl.java
  92. 12 12
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxStuScoreServiceImpl.java
  93. 64 63
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxTaskNotifyServiceImpl.java
  94. 19 20
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxUserServiceImpl.java
  95. 48 30
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxVoteServiceImpl.java
  96. 1 1
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/config/CodeConfig.java
  97. 1 1
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/config/SchoolConfig.java
  98. 86 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/config/WXConfig.java
  99. 3 2
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/config/WebConfigurer.java
  100. 6 7
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/mapper/WxClazzAlbumMapper.java

+ 11 - 11
README.md

@@ -91,32 +91,32 @@
 > 服务
 
 * [eureka http://10.1.81.61:8500](http://10.1.81.61:8500) **账号** admin **密码** select111***
-* [com.usoftchina.smartschool.gateway http://10.1.81.61:8560](http://10.1.81.61:8560)
+* [gateway http://10.1.81.61:8560](http://10.1.81.61:8560)
 * [admin http://10.1.81.61:8520](http://10.1.81.61:8520) **账号** admin **密码** select111***
 * [zipkin http://10.1.81.61:8540](http://10.1.81.61:8540) **账号** admin **密码** select111***
 
-> 访问
-
-* [门户 https://saas-dev.usoftchina.com:5443](https://saas-dev.usoftchina.com:5443)
-* [系统 https://trade-dev.usoftchina.com:5443](https://trade-dev.usoftchina.com:5443)
-* [打印 https://saas-report-dev.usoftchina.com:5443](https://saas-report-dev.usoftchina.com:5443)
-* [接口 https://saas-api-dev.usoftchina.com:5443](https://saas-api-dev.usoftchina.com:5443)
 
 # 本地调试环境
 
 > 服务
 
-* [eureka http://10.1.81.61:8510](http://10.1.81.61:8510) **账号** admin **密码** select111***
-* [com.usoftchina.smartschool.gateway http://10.1.81.61:8570](http://10.1.81.61:8570)
+* [eureka http://10.10.100.23:9500/](http://10.1.81.61:8510) **账号** admin **密码** select111***
+* [gateway http://10.10.100.23:9520/](http://10.1.81.61:8570)
 
 
 # 测试环境
 
 > 构建
 
-* [jenkins](http://10.10.100.200:5001/job/school/) **账号** admin **密码** select123***
+* [jenkins](http://10.10.100.200:5001/view/DevelopmentCenter/job/school/) **账号** admin **密码** select123***
 
 #接口环境
 [智慧校园接口地址](https://school-api.ubtob.com)
 [微信端web](https://school-wechat.ubtob.com)
-[pc端web地址](https://school.ubtob.com)
+[pc端web地址](https://school.ubtob.com)
+
+
+#程序发布
+1. 将代码合并至master,推送至远程
+2. 登陆[jenkins](http://10.10.100.200:5001/view/DevelopmentCenter/job/school/)
+3. 先构建smartschool-platform-prod任务,等任务正确构建完成,再构建其它剩余任务

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

@@ -12,6 +12,7 @@
     <artifactId>school-server</artifactId>
 
     <dependencies>
+
         <dependency>
             <groupId>com.usoftchina.smartschool</groupId>
             <artifactId>server-starter</artifactId>
@@ -77,6 +78,44 @@
             <groupId>org.apache.poi</groupId>
             <artifactId>poi-ooxml</artifactId>
         </dependency>
+        <!--webAPP-->
+        <dependency>
+            <groupId>com.usoftchina.smartschool</groupId>
+            <artifactId>wechat-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>commons-httpclient</groupId>
+            <artifactId>commons-httpclient</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.aliyun</groupId>
+            <artifactId>aliyun-java-sdk-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.aliyun</groupId>
+            <artifactId>aliyun-java-sdk-dysmsapi</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jdom</groupId>
+            <artifactId>jdom</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.github.kevinsawicki</groupId>
+            <artifactId>http-request</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>net.sf.json-lib</groupId>
+            <artifactId>json-lib</artifactId>
+            <classifier>jdk15</classifier>
+        </dependency>
     </dependencies>
 
     <build>

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

@@ -1,11 +1,12 @@
 package com.usoftchina.smartschool.school;
 
-import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
 import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
 import org.springframework.cloud.openfeign.EnableFeignClients;
 import org.springframework.context.annotation.ComponentScan;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
 import org.springframework.web.servlet.config.annotation.CorsRegistry;
 import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
 
@@ -14,22 +15,13 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
  * @create: 2019-01-16 17:41
  **/
 @SpringBootApplication
-@MapperScan("com.usoftchina.smartschool.school.mapper")
+@EnableTransactionManagement
+@ServletComponentScan
 @EnableEurekaClient
 @EnableFeignClients("com.usoftchina.smartschool")
-@ComponentScan(basePackages = {"com.usoftchina.smartschool"})
-public class SchoolApplication extends WebMvcConfigurerAdapter {
+public class SchoolApplication {
     public static void main(String[] args) {
         SpringApplication.run(SchoolApplication.class, args);
     }
 
-    @Override
-    public void addCorsMappings(CorsRegistry registry) {
-
-        registry.addMapping("/**")
-                .allowCredentials(true)
-                .allowedHeaders("*")
-                .allowedOrigins("*")
-                .allowedMethods("*");
-    }
 }

+ 2 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/DataImportMapper.java

@@ -2,8 +2,10 @@ package com.usoftchina.smartschool.school.mapper;
 
 import com.usoftchina.smartschool.school.po.DataImport;
 import com.usoftchina.smartschool.school.po.DataImportDetail;
+import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
+@Mapper
 public interface DataImportMapper {
     void deleteByCaller(@Param("caller") String caller, @Param("companyid") Long companyid);
     int insertSelective(DataImport record);

+ 2 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/DataTempletMapper.java

@@ -1,8 +1,10 @@
 package com.usoftchina.smartschool.school.mapper;
 
 import com.usoftchina.smartschool.school.po.DataTemplet;
+import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
+@Mapper
 public interface DataTempletMapper {
 
     DataTemplet selectByCaller(@Param("caller") String caller, @Param("companyid") Long companyid);

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

@@ -2,9 +2,11 @@ package com.usoftchina.smartschool.school.mapper;
 
 import com.usoftchina.smartschool.school.po.SysClazz;
 import com.usoftchina.smartschool.school.po.TeacherDetail;
+import org.apache.ibatis.annotations.Mapper;
 
 import java.util.List;
 
+@Mapper
 public interface SysClazzMapper {
     int deleteByPrimaryKey(Long clazz_id);
 

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

@@ -1,9 +1,11 @@
 package com.usoftchina.smartschool.school.mapper;
 
 import com.usoftchina.smartschool.school.po.SysGrade;
+import org.apache.ibatis.annotations.Mapper;
 
 import java.util.List;
 
+@Mapper
 public interface SysGradeMapper {
     int deleteByPrimaryKey(Long grade_id);
 

+ 2 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/SysSchoolMapper.java

@@ -1,7 +1,9 @@
 package com.usoftchina.smartschool.school.mapper;
 
 import com.usoftchina.smartschool.school.po.SysSchool;
+import org.apache.ibatis.annotations.Mapper;
 
+@Mapper
 public interface SysSchoolMapper {
     int deleteByPrimaryKey(Long school_id);
 

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

@@ -2,10 +2,12 @@ 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.Mapper;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
+@Mapper
 public interface SysStudentMapper {
     int deleteByPrimaryKey(Long stu_id);
 

+ 4 - 1
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/SysTeacherMapper.java

@@ -2,9 +2,12 @@ package com.usoftchina.smartschool.school.mapper;
 
 import com.usoftchina.smartschool.school.po.SysTeacher;
 import com.usoftchina.smartschool.school.po.TeacherDetail;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
+@Mapper
 public interface SysTeacherMapper {
     int deleteByPrimaryKey(Long teacher_id);
 
@@ -20,7 +23,7 @@ public interface SysTeacherMapper {
 
     int updateByPrimaryKey(SysTeacher record);
 
-    List<SysTeacher> selectByConditon(String condition, Long schoolId);
+    List<SysTeacher> selectByConditon(@Param("con") String con, @Param("schoolId") Long schoolId);
 
     List<TeacherDetail> selectDetail(Long id);
 }

+ 1 - 1
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/ClazzAlbumDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/ClazzAlbumDO.java

@@ -1,4 +1,4 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 

+ 4 - 2
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/ClazzCurriculumDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/ClazzCurriculumDO.java

@@ -1,12 +1,12 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 
 import java.io.Serializable;
 import java.util.Date;
 
 
-
 /**
  * 课程表; InnoDB free: 5120 kB
  * 
@@ -41,8 +41,10 @@ public class ClazzCurriculumDO implements Serializable {
 	private Long curSat;
 	private String curSatSubject;
 	//开始时间
+	@JsonFormat(pattern = "HH:mm")
 	private Date curStartTime;
 	//结束时间
+	@JsonFormat(pattern = "HH:mm")
 	private Date curEndTime;
 	//状态  1使用   0草稿
 	private Integer curStatus;

+ 1 - 2
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/ClazzDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/ClazzDO.java

@@ -1,9 +1,8 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 
 import java.io.Serializable;
-import java.util.Date;
 import java.util.List;
 
 

+ 1 - 2
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/ClazzPictureDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/ClazzPictureDO.java

@@ -1,4 +1,4 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 
@@ -6,7 +6,6 @@ import java.io.Serializable;
 import java.util.Date;
 
 
-
 /**
  * 相片表; InnoDB free: 5120 kB
  * 

+ 1 - 2
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/FileDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/FileDO.java

@@ -1,4 +1,4 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 
@@ -6,7 +6,6 @@ import java.io.Serializable;
 import java.util.Date;
 
 
-
 /**
  * 文件表; InnoDB free: 5120 kB
  * 

+ 1 - 3
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/GradeDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/GradeDO.java

@@ -1,10 +1,8 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 
 import java.io.Serializable;
-import java.util.Date;
-
 
 
 /**

+ 1 - 1
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/MeetingDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/MeetingDO.java

@@ -1,4 +1,4 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 

+ 1 - 2
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/MeetingRecordsDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/MeetingRecordsDO.java

@@ -1,4 +1,4 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 
@@ -6,7 +6,6 @@ import java.io.Serializable;
 import java.util.Date;
 
 
-
 /**
  * 会议签到表; InnoDB free: 5120 kB
  * 

+ 2 - 1
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/NotifyDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/NotifyDO.java

@@ -1,4 +1,4 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 
@@ -28,6 +28,7 @@ public class NotifyDO implements Serializable {
 	private String notifyDetails;
 	//附件地址
 	private String notifyFiles;
+	private List<String> enclosure;
 	//创建人
 	private Long notifyCreator;
 	private String teacherName;

+ 1 - 2
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/NotifyrecordsDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/NotifyrecordsDO.java

@@ -1,4 +1,4 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 
@@ -6,7 +6,6 @@ import java.io.Serializable;
 import java.util.Date;
 
 
-
 /**
  * 读取通知详情表; InnoDB free: 5120 kB
  * 

+ 1 - 1
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/OaApproveDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/OaApproveDO.java

@@ -1,4 +1,4 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 

+ 1 - 3
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/OaArticlesDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/OaArticlesDO.java

@@ -1,10 +1,8 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 
 import java.io.Serializable;
-import java.util.Date;
-
 
 
 /**

+ 1 - 1
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/OaLeaveDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/OaLeaveDO.java

@@ -1,4 +1,4 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 

+ 1 - 2
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/OaLeaveReplyDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/OaLeaveReplyDO.java

@@ -1,4 +1,4 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 
@@ -6,7 +6,6 @@ import java.io.Serializable;
 import java.util.Date;
 
 
-
 /**
  * 请假回复表; InnoDB free: 5120 kB
  * 

+ 1 - 2
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/OutInRecordDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/OutInRecordDO.java

@@ -1,4 +1,4 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 
@@ -6,7 +6,6 @@ import java.io.Serializable;
 import java.util.Date;
 
 
-
 /**
  * 出入校通知表; InnoDB free: 5120 kB
  * 

+ 1 - 2
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/ParentsDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/ParentsDO.java

@@ -1,4 +1,4 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 
@@ -6,7 +6,6 @@ import java.io.Serializable;
 import java.util.Date;
 
 
-
 /**
  * 家长表; InnoDB free: 5120 kB
  * 

+ 1 - 3
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/ParentsStuDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/ParentsStuDO.java

@@ -1,10 +1,8 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 
 import java.io.Serializable;
-import java.util.Date;
-
 
 
 /**

+ 1 - 3
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/PayCardDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/PayCardDO.java

@@ -1,10 +1,8 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 
 import java.io.Serializable;
-import java.util.Date;
-
 
 
 /**

+ 1 - 2
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/PayRanksDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/PayRanksDO.java

@@ -1,4 +1,4 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 
@@ -6,7 +6,6 @@ import java.io.Serializable;
 import java.util.Date;
 
 
-
 /**
  * 充值消费详情表; InnoDB free: 5120 kB
  * 

+ 1 - 2
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/PaymentDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/PaymentDO.java

@@ -1,4 +1,4 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 
@@ -6,7 +6,6 @@ import java.io.Serializable;
 import java.util.Date;
 
 
-
 /**
  * 交费表; InnoDB free: 5120 kB
  * 

+ 1 - 2
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/PaymentrecordsDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/PaymentrecordsDO.java

@@ -1,4 +1,4 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 
@@ -6,7 +6,6 @@ import java.io.Serializable;
 import java.util.Date;
 
 
-
 /**
  * 交费详情表; InnoDB free: 5120 kB
  * 

+ 1 - 2
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/PrincipalMailboxDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/PrincipalMailboxDO.java

@@ -1,4 +1,4 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 
@@ -6,7 +6,6 @@ import java.io.Serializable;
 import java.util.Date;
 
 
-
 /**
  * 校长信箱表; InnoDB free: 5120 kB
  * 

+ 1 - 2
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/PrincipalReplyDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/PrincipalReplyDO.java

@@ -1,4 +1,4 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 
@@ -6,7 +6,6 @@ import java.io.Serializable;
 import java.util.Date;
 
 
-
 /**
  * 校长信箱回复表; InnoDB free: 5120 kB
  * 

+ 1 - 3
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/SchoolDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/SchoolDO.java

@@ -1,10 +1,8 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 
 import java.io.Serializable;
-import java.util.Date;
-
 
 
 /**

+ 1 - 2
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/StuScoreDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/StuScoreDO.java

@@ -1,4 +1,4 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 
@@ -6,7 +6,6 @@ import java.io.Serializable;
 import java.util.Date;
 
 
-
 /**
  * 分数表; InnoDB free: 5120 kB
  * 

+ 1 - 1
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/StudentDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/StudentDO.java

@@ -1,4 +1,4 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 

+ 1 - 3
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/SubjectDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/SubjectDO.java

@@ -1,10 +1,8 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 
 import java.io.Serializable;
-import java.util.Date;
-
 
 
 /**

+ 1 - 2
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/TaskNotifyDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/TaskNotifyDO.java

@@ -1,4 +1,4 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 
@@ -6,7 +6,6 @@ import java.io.Serializable;
 import java.util.Date;
 
 
-
 /**
  * 作业通知表; InnoDB free: 5120 kB
  * 

+ 1 - 2
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/TaskReplyDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/TaskReplyDO.java

@@ -1,4 +1,4 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 
@@ -6,7 +6,6 @@ import java.io.Serializable;
 import java.util.Date;
 
 
-
 /**
  * 作业回复表; InnoDB free: 5120 kB
  * 

+ 1 - 3
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/TeacherClazzDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/TeacherClazzDO.java

@@ -1,10 +1,8 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 
 import java.io.Serializable;
-import java.util.Date;
-
 
 
 /**

+ 1 - 2
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/TeacherDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/TeacherDO.java

@@ -1,4 +1,4 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 
@@ -6,7 +6,6 @@ import java.io.Serializable;
 import java.util.Date;
 
 
-
 /**
  * 教师表; InnoDB free: 5120 kB
  * 

+ 1 - 3
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/UserDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/UserDO.java

@@ -1,10 +1,8 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 
 import java.io.Serializable;
-import java.util.Date;
-
 
 
 /**

+ 1 - 3
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/UserRoleDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/UserRoleDO.java

@@ -1,10 +1,8 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 
 import java.io.Serializable;
-import java.util.Date;
-
 
 
 /**

+ 1 - 1
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/VoteDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/VoteDO.java

@@ -1,4 +1,4 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 

+ 1 - 3
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/VoteElectDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/VoteElectDO.java

@@ -1,10 +1,8 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 
 import java.io.Serializable;
-import java.util.Date;
-
 
 
 /**

+ 1 - 2
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/VoteOptionsDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/VoteOptionsDO.java

@@ -1,9 +1,8 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 
 import java.io.Serializable;
-import java.util.Date;
 import java.util.List;
 
 

+ 1 - 1
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/domain/VoteTopicDO.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/VoteTopicDO.java

@@ -1,4 +1,4 @@
-package com.usoftchina.smartschool.wechat.domain;
+package com.usoftchina.smartschool.school.po;
 
 import lombok.Data;
 

+ 6 - 6
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/controller/ClazzAlbumController.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxClazzAlbumController.java

@@ -1,9 +1,9 @@
-package com.usoftchina.smartschool.wechat.controller;
+package com.usoftchina.smartschool.school.wxschool.basic.controller;
 
 
-import com.usoftchina.smartschool.wechat.domain.ClazzAlbumDO;
-import com.usoftchina.smartschool.wechat.service.ClazzAlbumService;
-import com.usoftchina.smartschool.wechat.utils.ResultBean;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxClazzAlbumService;
+import com.usoftchina.smartschool.school.po.ClazzAlbumDO;
+import com.usoftchina.smartschool.school.wxschool.utils.ResultBean;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.util.Assert;
@@ -24,9 +24,9 @@ import java.util.List;
 
 @RestController
 @RequestMapping("/wxSchool/clazzAlbum")
-public class ClazzAlbumController {
+public class WxClazzAlbumController {
 	@Autowired
-	private ClazzAlbumService clazzAlbumService;
+	private WxClazzAlbumService clazzAlbumService;
 
 	/**
 	 * 创建相册

+ 8 - 9
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/controller/ClazzController.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxClazzController.java

@@ -1,11 +1,10 @@
-package com.usoftchina.smartschool.wechat.controller;
+package com.usoftchina.smartschool.school.wxschool.basic.controller;
 
-import com.usoftchina.smartschool.wechat.domain.ClazzDO;
-import com.usoftchina.smartschool.wechat.domain.ParentsDO;
-import com.usoftchina.smartschool.wechat.domain.StudentDO;
-import com.usoftchina.smartschool.wechat.domain.TeacherDO;
-import com.usoftchina.smartschool.wechat.service.ClazzService;
-import com.usoftchina.smartschool.wechat.utils.ResultBean;
+import com.usoftchina.smartschool.school.po.ClazzDO;
+import com.usoftchina.smartschool.school.po.StudentDO;
+import com.usoftchina.smartschool.school.po.TeacherDO;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxClazzService;
+import com.usoftchina.smartschool.school.wxschool.utils.ResultBean;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -25,9 +24,9 @@ import java.util.List;
  
 @RestController
 @RequestMapping("/wxSchool/clazz")
-public class ClazzController {
+public class WxClazzController {
 	@Autowired
-	private ClazzService clazzService;
+	private WxClazzService clazzService;
 
 	/**
 	 * 老师获取所教班级

+ 8 - 8
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/controller/ClazzCurriculumController.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxClazzCurriculumController.java

@@ -1,8 +1,8 @@
-package com.usoftchina.smartschool.wechat.controller;
+package com.usoftchina.smartschool.school.wxschool.basic.controller;
 
-import com.usoftchina.smartschool.wechat.domain.ClazzCurriculumDO;
-import com.usoftchina.smartschool.wechat.service.ClazzCurriculumService;
-import com.usoftchina.smartschool.wechat.utils.ResultBean;
+import com.usoftchina.smartschool.school.po.ClazzCurriculumDO;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxClazzCurriculumService;
+import com.usoftchina.smartschool.school.wxschool.utils.ResultBean;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -22,9 +22,9 @@ import java.util.Map;
  
 @RestController
 @RequestMapping("/wxSchool/clazzCurriculum")
-public class ClazzCurriculumController {
+public class WxClazzCurriculumController {
 	@Autowired
-	private ClazzCurriculumService clazzCurriculumService;
+	private WxClazzCurriculumService clazzCurriculumService;
 	/** 根据学号取课程表 */
 	@GetMapping("/curriculumListByStuId")
 	public ResultBean curriculumListByStuId(@Param("stuId") Long stuId, @Param("curStatus")Integer curStatus){
@@ -40,8 +40,8 @@ public class ClazzCurriculumController {
 	@GetMapping("/curriculumListByTeacherId")
 	public ResultBean curriculumListByTeacherId(@Param("teacherId") Long teacherId, @Param("curStatus")Integer curStatus){
 		try {
-			List<ClazzCurriculumDO> curriculumDOS = clazzCurriculumService.selectCurriculumByTeacherId(teacherId, curStatus);
-			return new ResultBean(curriculumDOS);
+			Map<String, Object> map = clazzCurriculumService.selectCurriculumByTeacherId(teacherId, curStatus);
+			return new ResultBean(map);
 		}catch (Exception e){
 			return new ResultBean(e);
 		}

+ 6 - 9
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/controller/ClazzPictureController.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxClazzPictureController.java

@@ -1,17 +1,14 @@
-package com.usoftchina.smartschool.wechat.controller;
+package com.usoftchina.smartschool.school.wxschool.basic.controller;
 
-import com.usoftchina.smartschool.wechat.domain.ClazzAlbumDO;
-import com.usoftchina.smartschool.wechat.domain.ClazzPictureDO;
-import com.usoftchina.smartschool.wechat.service.ClazzPictureService;
-import com.usoftchina.smartschool.wechat.utils.ResultBean;
+import com.usoftchina.smartschool.school.po.ClazzAlbumDO;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxClazzPictureService;
+import com.usoftchina.smartschool.school.wxschool.utils.ResultBean;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import java.util.List;
-
 /**
  * 相片表; InnoDB free: 5120 kB
  * 
@@ -22,9 +19,9 @@ import java.util.List;
  
 @RestController
 @RequestMapping("/wxSchool/clazzPicture")
-public class ClazzPictureController {
+public class WxClazzPictureController {
 	@Autowired
-	private ClazzPictureService clazzPictureService;
+	private WxClazzPictureService clazzPictureService;
 
 	/**
 	 * 更新相册

+ 5 - 5
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/controller/FileController.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxFileController.java

@@ -1,8 +1,8 @@
-package com.usoftchina.smartschool.wechat.controller;
+package com.usoftchina.smartschool.school.wxschool.basic.controller;
 
 
-import com.usoftchina.smartschool.wechat.service.FileService;
-import com.usoftchina.smartschool.wechat.utils.ResultBean;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxFileService;
+import com.usoftchina.smartschool.school.wxschool.utils.ResultBean;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -20,9 +20,9 @@ import org.springframework.web.multipart.MultipartFile;
  
 @RestController
 @RequestMapping("/wxSchool/file")
-public class FileController {
+public class WxFileController {
 	@Autowired
-	private FileService fileService;
+	private WxFileService fileService;
 
 	/**
 	 * 附件上传

+ 7 - 7
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/controller/MeetingController.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxMeetingController.java

@@ -1,8 +1,8 @@
-package com.usoftchina.smartschool.wechat.controller;
+package com.usoftchina.smartschool.school.wxschool.basic.controller;
 
-import com.usoftchina.smartschool.wechat.domain.MeetingDO;
-import com.usoftchina.smartschool.wechat.service.MeetingService;
-import com.usoftchina.smartschool.wechat.utils.ResultBean;
+import com.usoftchina.smartschool.school.po.MeetingDO;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxMeetingService;
+import com.usoftchina.smartschool.school.wxschool.utils.ResultBean;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.util.Assert;
@@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RestController;
 
 import java.util.HashMap;
 
-import static com.usoftchina.smartschool.wechat.utils.ResultBean.ErrorCode.FAIL;
+import static com.usoftchina.smartschool.school.wxschool.utils.ResultBean.ErrorCode.FAIL;
 
 /**
  * 会议表; InnoDB free: 5120 kB
@@ -24,9 +24,9 @@ import static com.usoftchina.smartschool.wechat.utils.ResultBean.ErrorCode.FAIL;
  
 @RestController
 @RequestMapping("/wxSchool/meeting")
-public class MeetingController {
+public class WxMeetingController {
 	@Autowired
-	private MeetingService meetingService;
+	private WxMeetingService meetingService;
 
 	/**
 	 * 创建会议

+ 7 - 7
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/controller/NotifyController.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxNotifyController.java

@@ -1,9 +1,9 @@
-package com.usoftchina.smartschool.wechat.controller;
+package com.usoftchina.smartschool.school.wxschool.basic.controller;
 
 
-import com.usoftchina.smartschool.wechat.domain.NotifyDO;
-import com.usoftchina.smartschool.wechat.service.NotifyService;
-import com.usoftchina.smartschool.wechat.utils.ResultBean;
+import com.usoftchina.smartschool.school.po.NotifyDO;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxNotifyService;
+import com.usoftchina.smartschool.school.wxschool.utils.ResultBean;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.util.Assert;
@@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.RestController;
 import java.util.List;
 import java.util.Map;
 
-import static com.usoftchina.smartschool.wechat.utils.ResultBean.ErrorCode.FAIL;
+import static com.usoftchina.smartschool.school.wxschool.utils.ResultBean.ErrorCode.FAIL;
 
 /**
  * 通知表; InnoDB free: 5120 kB
@@ -27,9 +27,9 @@ import static com.usoftchina.smartschool.wechat.utils.ResultBean.ErrorCode.FAIL;
  
 @RestController
 @RequestMapping("/wxSchool/notify")
-public class NotifyController {
+public class WxNotifyController {
 	@Autowired
-	private NotifyService notifyService;
+	private WxNotifyService notifyService;
 
 	/**
 	 * 获取系统消息和使用帮助

+ 6 - 6
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/controller/OaApproveController.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxOaApproveController.java

@@ -1,8 +1,8 @@
-package com.usoftchina.smartschool.wechat.controller;
+package com.usoftchina.smartschool.school.wxschool.basic.controller;
 
 
-import com.usoftchina.smartschool.wechat.service.OaApproveService;
-import com.usoftchina.smartschool.wechat.utils.ResultBean;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxOaApproveService;
+import com.usoftchina.smartschool.school.wxschool.utils.ResultBean;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.util.Assert;
@@ -13,7 +13,7 @@ import org.springframework.web.bind.annotation.RestController;
 
 import java.util.Map;
 
-import static com.usoftchina.smartschool.wechat.utils.ResultBean.ErrorCode.FAIL;
+import static com.usoftchina.smartschool.school.wxschool.utils.ResultBean.ErrorCode.FAIL;
 
 /**
  * oa出差/用品/请假表(教师端); InnoDB free: 5120 kB
@@ -25,9 +25,9 @@ import static com.usoftchina.smartschool.wechat.utils.ResultBean.ErrorCode.FAIL;
  
 @RestController
 @RequestMapping("/wxSchool/oaApprove")
-public class OaApproveController {
+public class WxOaApproveController {
 	@Autowired
-	private OaApproveService oaApproveService;
+	private WxOaApproveService oaApproveService;
 
 	/**
 	 * 添加OA

+ 7 - 7
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/controller/OaLeaveController.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxOaLeaveController.java

@@ -1,9 +1,9 @@
-package com.usoftchina.smartschool.wechat.controller;
+package com.usoftchina.smartschool.school.wxschool.basic.controller;
 
 
-import com.usoftchina.smartschool.wechat.domain.OaLeaveDO;
-import com.usoftchina.smartschool.wechat.service.OaLeaveService;
-import com.usoftchina.smartschool.wechat.utils.ResultBean;
+import com.usoftchina.smartschool.school.po.OaLeaveDO;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxOaLeaveService;
+import com.usoftchina.smartschool.school.wxschool.utils.ResultBean;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.util.Assert;
@@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.RestController;
 
 import java.util.List;
 
-import static com.usoftchina.smartschool.wechat.utils.ResultBean.ErrorCode.FAIL;
+import static com.usoftchina.smartschool.school.wxschool.utils.ResultBean.ErrorCode.FAIL;
 
 /**
  * 学生请假表; InnoDB free: 5120 kB
@@ -26,9 +26,9 @@ import static com.usoftchina.smartschool.wechat.utils.ResultBean.ErrorCode.FAIL;
  
 @RestController
 @RequestMapping("/wxSchool/oaLeave")
-public class OaLeaveController {
+public class WxOaLeaveController {
 	@Autowired
-	private OaLeaveService oaLeaveService;
+	private WxOaLeaveService oaLeaveService;
 
 	/**
 	 * 请假条提交

+ 9 - 8
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/controller/OutInRecordController.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxOutInRecordController.java

@@ -1,8 +1,8 @@
-package com.usoftchina.smartschool.wechat.controller;
+package com.usoftchina.smartschool.school.wxschool.basic.controller;
 
-import com.usoftchina.smartschool.wechat.domain.OutInRecordDO;
-import com.usoftchina.smartschool.wechat.service.OutInRecordService;
-import com.usoftchina.smartschool.wechat.utils.ResultBean;
+import com.usoftchina.smartschool.school.po.OutInRecordDO;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxOutInRecordService;
+import com.usoftchina.smartschool.school.wxschool.utils.ResultBean;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 出入校通知表; InnoDB free: 5120 kB
@@ -22,9 +23,9 @@ import java.util.List;
  
 @RestController
 @RequestMapping("/wxSchool/outInRecord")
-public class OutInRecordController {
+public class WxOutInRecordController {
 	@Autowired
-	private OutInRecordService outInRecordService;
+	private WxOutInRecordService outInRecordService;
 
 	/**
 	 * 获取出入校记录
@@ -36,8 +37,8 @@ public class OutInRecordController {
 	@PostMapping("/getOutgoingList")
 	public ResultBean getOutgoingList(@Param("stuId") Long stuId, @Param("pageIndex")Integer pageIndex, @Param("pageSize")Integer pageSize){
 		try {
-			List<OutInRecordDO> outInRecordDOS = outInRecordService.selectRecordOutgoingListByStuId(stuId, pageIndex, pageSize);
-			return new ResultBean(outInRecordDOS);
+			Map<String, Object> map = outInRecordService.selectRecordOutgoingListByStuId(stuId, pageIndex, pageSize);
+			return new ResultBean(map);
 		}catch (Exception e){
 			return new ResultBean(e);
 		}

+ 6 - 6
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/controller/PrincipalMailboxController.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxPrincipalMailboxController.java

@@ -1,7 +1,7 @@
-package com.usoftchina.smartschool.wechat.controller;
+package com.usoftchina.smartschool.school.wxschool.basic.controller;
 
-import com.usoftchina.smartschool.wechat.service.PrincipalMailboxService;
-import com.usoftchina.smartschool.wechat.utils.ResultBean;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxPrincipalMailboxService;
+import com.usoftchina.smartschool.school.wxschool.utils.ResultBean;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.util.Assert;
@@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RestController;
 import java.util.List;
 import java.util.Map;
 
-import static com.usoftchina.smartschool.wechat.utils.ResultBean.ErrorCode.FAIL;
+import static com.usoftchina.smartschool.school.wxschool.utils.ResultBean.ErrorCode.FAIL;
 
 /**
  * 校长信箱表; InnoDB free: 5120 kB
@@ -24,9 +24,9 @@ import static com.usoftchina.smartschool.wechat.utils.ResultBean.ErrorCode.FAIL;
  
 @RestController
 @RequestMapping("/wxSchool/principalMailbox")
-public class PrincipalMailboxController {
+public class WxPrincipalMailboxController {
 	@Autowired
-	private PrincipalMailboxService principalMailboxService;
+	private WxPrincipalMailboxService principalMailboxService;
 
 	/**
 	 * 校长信箱创建

+ 6 - 8
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/controller/SchoolController.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxSchoolController.java

@@ -1,12 +1,10 @@
-package com.usoftchina.smartschool.wechat.controller;
+package com.usoftchina.smartschool.school.wxschool.basic.controller;
 
-import com.usoftchina.smartschool.wechat.domain.SchoolDO;
-import com.usoftchina.smartschool.wechat.service.SchoolService;
-import com.usoftchina.smartschool.wechat.utils.ResultBean;
+import com.usoftchina.smartschool.school.po.SchoolDO;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxSchoolService;
+import com.usoftchina.smartschool.school.wxschool.utils.ResultBean;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.ui.Model;
 import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
@@ -22,9 +20,9 @@ import java.util.List;
  
 @RestController
 @RequestMapping("/wxSchool/school")
-public class SchoolController {
+public class WxSchoolController {
 	@Autowired
-	private SchoolService schoolService;
+	private WxSchoolService schoolService;
 
 	@GetMapping("/schoolList")
 	public ResultBean list(){

+ 5 - 5
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/controller/StuScoreController.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxStuScoreController.java

@@ -1,7 +1,7 @@
-package com.usoftchina.smartschool.wechat.controller;
+package com.usoftchina.smartschool.school.wxschool.basic.controller;
 
-import com.usoftchina.smartschool.wechat.service.StuScoreService;
-import com.usoftchina.smartschool.wechat.utils.ResultBean;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxStuScoreService;
+import com.usoftchina.smartschool.school.wxschool.utils.ResultBean;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -21,9 +21,9 @@ import java.util.Map;
  
 @RestController
 @RequestMapping("/wxSchool/stuScore")
-public class StuScoreController {
+public class WxStuScoreController {
 	@Autowired
-	private StuScoreService stuScoreService;
+	private WxStuScoreService stuScoreService;
 
 	/**
 	 * 获取成绩信息

+ 10 - 15
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/controller/TaskNotifyController.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxTaskNotifyController.java

@@ -1,7 +1,7 @@
-package com.usoftchina.smartschool.wechat.controller;
+package com.usoftchina.smartschool.school.wxschool.basic.controller;
 
-import com.usoftchina.smartschool.wechat.service.TaskNotifyService;
-import com.usoftchina.smartschool.wechat.utils.ResultBean;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxTaskNotifyService;
+import com.usoftchina.smartschool.school.wxschool.utils.ResultBean;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.util.Assert;
@@ -22,9 +22,9 @@ import java.util.Map;
  
 @RestController
 @RequestMapping("/wxSchool/taskNotify")
-public class TaskNotifyController {
+public class WxTaskNotifyController {
 	@Autowired
-	private TaskNotifyService taskNotifyService;
+	private WxTaskNotifyService taskNotifyService;
 
 	/**
 	 * 发布作业
@@ -35,12 +35,8 @@ public class TaskNotifyController {
 	public ResultBean createTask(String taskString){
 		try {
 			Assert.notNull(taskString,"请填入相应的数据");
-			int task = taskNotifyService.createTask(taskString);
-			if (task>0){
-				return new ResultBean("创建成功");
-			}else {
-				return new ResultBean("创建失败");
-			}
+			String task = taskNotifyService.createTask(taskString);
+			return new ResultBean(task);
 		}catch (Exception e){
 			return new ResultBean(e);
 		}
@@ -83,12 +79,11 @@ public class TaskNotifyController {
 	/**
 	 *家长端获取作业详情
 	 * @param taskId
-	 * @param stuId
 	 */
-	@PostMapping("/taskDetailStu")
-	public ResultBean taskDetailStu(@Param("taskId")Long taskId, @Param("stuId")Long stuId){
+	@PostMapping("/taskDetail")
+	public ResultBean taskDetail(Long taskId){
 		try {
-			Map<String, Object> map = taskNotifyService.taskDetailStu(taskId, stuId);
+			Map<String, Object> map = taskNotifyService.taskDetail(taskId);
 			return new ResultBean(map);
 		}catch (Exception e){
 			return new ResultBean(e);

+ 35 - 15
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/controller/UserController.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxUserController.java

@@ -1,16 +1,16 @@
-package com.usoftchina.smartschool.wechat.controller;
-
-import java.util.*;
+package com.usoftchina.smartschool.school.wxschool.basic.controller;
 
 import com.alibaba.fastjson.JSON;
 import com.github.kevinsawicki.http.HttpRequest;
-import com.usoftchina.smartschool.wechat.domain.SchoolDO;
-import com.usoftchina.smartschool.wechat.domain.TeacherDO;
-import com.usoftchina.smartschool.wechat.service.SchoolService;
-import com.usoftchina.smartschool.wechat.service.UserService;
-import com.usoftchina.smartschool.wechat.utils.ObjectUtils;
-import com.usoftchina.smartschool.wechat.utils.ResultBean;
+import com.usoftchina.smartschool.school.po.SchoolDO;
+import com.usoftchina.smartschool.school.po.TeacherDO;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxSchoolService;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxUserService;
+import com.usoftchina.smartschool.school.wxschool.utils.ObjectUtils;
+import com.usoftchina.smartschool.school.wxschool.utils.ResultBean;
 import org.apache.ibatis.annotations.Param;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.util.Assert;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -18,9 +18,13 @@ import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.servlet.ModelAndView;
+
 import javax.servlet.http.HttpServletRequest;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
-import static com.usoftchina.smartschool.wechat.utils.ResultBean.ErrorCode.FAIL;
+import static com.usoftchina.smartschool.school.wxschool.utils.ResultBean.ErrorCode.FAIL;
 
 /**
  * 账户表; InnoDB free: 5120 kB
@@ -32,12 +36,14 @@ import static com.usoftchina.smartschool.wechat.utils.ResultBean.ErrorCode.FAIL;
  
 @RestController
 @RequestMapping("/wxSchool/user")
-public class UserController {
+public class WxUserController {
+//	private static final Logger log = LoggerFactory.getLogger(WxUserController.class);
+
 	@Autowired
-	private UserService userService;
+	private WxUserService userService;
 
 	@Autowired
-	private SchoolService schoolService;
+	private WxSchoolService schoolService;
 	/**
 	 * 发送验证码
 	 */
@@ -122,9 +128,23 @@ public class UserController {
 		params.put("grant_type", "authorization_code");
 		HttpRequest response= HttpRequest.get("https://api.weixin.qq.com/sns/oauth2/access_token", params, true);
 		String result=response.body();
+        //System.err.println("result======"+result);
 		String openid= JSON.parseObject(result).getString("openid");
-		//String token= JSON.parseObject(result).getString("access_token");
-		return  new ModelAndView("redirect:https://school-wechat.ubtob.com/bindMenu/open/"+openid);
+        //System.err.println("openid======="+openid);
+		String token= JSON.parseObject(result).getString("access_token");
+		//System.err.println("token====="+token);
+		HashMap<String, Object> param=new HashMap<>();
+		param.put("openid",openid);
+		param.put("access_token",token);
+		param.put("lang","zh_CN");
+		HttpRequest res= HttpRequest.get("https://api.weixin.qq.com/sns/userinfo", param, true);
+		//HttpRequest res= HttpRequest.get("https://api.weixin.qq.com/cgi-bin/user/info", param, true);
+		String body = res.body();
+		//System.err.println("res======"+res);
+		//System.err.println("body======"+body);
+		String headimgurl = JSON.parseObject(body).getString("headimgurl");
+		System.err.println("headimgurl======"+headimgurl);
+		return  new ModelAndView("redirect:https://school-wechat.ubtob.com/bindMenu/open/"+openid+"/headimgurl/"+headimgurl);
 	}
 
 	/**

+ 7 - 7
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/controller/VoteController.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxVoteController.java

@@ -1,8 +1,8 @@
-package com.usoftchina.smartschool.wechat.controller;
+package com.usoftchina.smartschool.school.wxschool.basic.controller;
 
-import com.usoftchina.smartschool.wechat.domain.VoteDO;
-import com.usoftchina.smartschool.wechat.service.VoteService;
-import com.usoftchina.smartschool.wechat.utils.ResultBean;
+import com.usoftchina.smartschool.school.po.VoteDO;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxVoteService;
+import com.usoftchina.smartschool.school.wxschool.utils.ResultBean;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.util.Assert;
@@ -13,7 +13,7 @@ import org.springframework.web.bind.annotation.RestController;
 import java.util.List;
 import java.util.Map;
 
-import static com.usoftchina.smartschool.wechat.utils.ResultBean.ErrorCode.FAIL;
+import static com.usoftchina.smartschool.school.wxschool.utils.ResultBean.ErrorCode.FAIL;
 
 /**
  * 投票单; InnoDB free: 5120 kB
@@ -25,9 +25,9 @@ import static com.usoftchina.smartschool.wechat.utils.ResultBean.ErrorCode.FAIL;
  
 @RestController
 @RequestMapping("/wxSchool/vote")
-public class VoteController {
+public class WxVoteController {
 	@Autowired
-	private VoteService voteService;
+	private WxVoteService voteService;
 
 	/** 创建投票单
 	 *

+ 5 - 5
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/ClazzAlbumService.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/WxClazzAlbumService.java

@@ -1,9 +1,9 @@
-package com.usoftchina.smartschool.wechat.service;
+package com.usoftchina.smartschool.school.wxschool.basic.service;
 
-import com.usoftchina.smartschool.wechat.domain.ClazzAlbumDO;
+import com.usoftchina.smartschool.school.po.ClazzAlbumDO;
 import org.apache.ibatis.annotations.Param;
+
 import java.util.List;
-import java.util.Map;
 
 /**
  * 相册; InnoDB free: 5120 kB
@@ -12,7 +12,7 @@ import java.util.Map;
  * @email ${email}
  * @date 2019-01-16 16:26:23
  */
-public interface ClazzAlbumService {
+public interface WxClazzAlbumService {
 	/**
 	 * 创建相册
 	 * @param jsonAlbum
@@ -44,6 +44,6 @@ public interface ClazzAlbumService {
 	 * @return
 	 * @throws Exception
 	 */
-	List<ClazzAlbumDO> getAlbumList (@Param("clazzId") Long clazzId, @Param("albumType")Integer albumType, @Param("albumStatus")Integer albumStatus, @Param("pageIndex")Integer pageIndex, @Param("pageSize")Integer pageSize) throws Exception;
+	List<ClazzAlbumDO> getAlbumList(@Param("clazzId") Long clazzId, @Param("albumType") Integer albumType, @Param("albumStatus") Integer albumStatus, @Param("pageIndex") Integer pageIndex, @Param("pageSize") Integer pageSize) throws Exception;
 
 }

+ 3 - 5
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/ClazzCurriculumService.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/WxClazzCurriculumService.java

@@ -1,9 +1,7 @@
-package com.usoftchina.smartschool.wechat.service;
+package com.usoftchina.smartschool.school.wxschool.basic.service;
 
-import com.usoftchina.smartschool.wechat.domain.ClazzCurriculumDO;
 import org.apache.ibatis.annotations.Param;
 
-import java.util.List;
 import java.util.Map;
 
 /**
@@ -13,7 +11,7 @@ import java.util.Map;
  * @email ${email}
  * @date 2019-01-16 16:26:24
  */
-public interface ClazzCurriculumService {
+public interface WxClazzCurriculumService {
 
 	/**
 	 * 根据学号取课程表
@@ -29,5 +27,5 @@ public interface ClazzCurriculumService {
 	 * @param curStatus
 	 * @return
 	 */
-	List<ClazzCurriculumDO> selectCurriculumByTeacherId(@Param("teacherId") Long teacherId, @Param("curStatus") Integer curStatus) throws Exception;
+	Map<String, Object> selectCurriculumByTeacherId(@Param("teacherId") Long teacherId, @Param("curStatus") Integer curStatus) throws Exception;
 }

+ 4 - 4
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/ClazzPictureService.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/WxClazzPictureService.java

@@ -1,6 +1,6 @@
-package com.usoftchina.smartschool.wechat.service;
+package com.usoftchina.smartschool.school.wxschool.basic.service;
 
-import com.usoftchina.smartschool.wechat.domain.ClazzAlbumDO;
+import com.usoftchina.smartschool.school.po.ClazzAlbumDO;
 import org.apache.ibatis.annotations.Param;
 
 /**
@@ -10,7 +10,7 @@ import org.apache.ibatis.annotations.Param;
  * @email ${email}
  * @date 2019-01-16 16:26:24
  */
-public interface ClazzPictureService {
+public interface WxClazzPictureService {
 
 	/**
 	 * 更新相册
@@ -26,6 +26,6 @@ public interface ClazzPictureService {
 	 * @param pageIndex
 	 * @param pageSize
 	 */
-	public ClazzAlbumDO getPictureByAlbum(@Param("albumId") Long albumId, @Param("pageIndex")Integer pageIndex, @Param("pageSize") Integer pageSize);
+	public ClazzAlbumDO getPictureByAlbum(@Param("albumId") Long albumId, @Param("pageIndex") Integer pageIndex, @Param("pageSize") Integer pageSize);
 
 }

+ 8 - 6
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/ClazzService.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/WxClazzService.java

@@ -1,6 +1,8 @@
-package com.usoftchina.smartschool.wechat.service;
+package com.usoftchina.smartschool.school.wxschool.basic.service;
 
-import com.usoftchina.smartschool.wechat.domain.*;
+import com.usoftchina.smartschool.school.po.ClazzDO;
+import com.usoftchina.smartschool.school.po.StudentDO;
+import com.usoftchina.smartschool.school.po.TeacherDO;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -12,7 +14,7 @@ import java.util.List;
  * @email ${email}
  * @date 2019-01-16 16:26:27
  */
-public interface ClazzService {
+public interface WxClazzService {
 	/**
 	 * 老师获取所教班级
 	 * @param teacherId
@@ -36,14 +38,14 @@ public interface ClazzService {
 	 * @return
 	 * @throws Exception
 	 */
-	public List<ClazzDO> selectParentPhoneByTeacher(@Param("teacherId") Long teacherId,@Param("selectKey") String selectKey) throws Exception;
+	public List<ClazzDO> selectParentPhoneByTeacher(@Param("teacherId") Long teacherId, @Param("selectKey") String selectKey) throws Exception;
 
 	/**
 	 * 获取学生班级的所有老师
 	 * @param stuId
 	 * @throws Exception
 	 */
-	public List<TeacherDO> getTeacherByStuId(@Param("stuId") Long stuId, @Param("selectKey")String selectKey) throws Exception;
+	public List<TeacherDO> getTeacherByStuId(@Param("stuId") Long stuId, @Param("selectKey") String selectKey) throws Exception;
 
 	/**
 	 * 获取学生班级的所有家长
@@ -58,5 +60,5 @@ public interface ClazzService {
 	 * @param selectKey
 	 * @return
 	 */
-	public List<TeacherDO> getAllTeacherBySchool(@Param("teacherId") Long teacherId,@Param("selectKey") String selectKey);
+	public List<TeacherDO> getAllTeacherBySchool(@Param("teacherId") Long teacherId, @Param("selectKey") String selectKey);
 }

+ 2 - 2
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/FileService.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/WxFileService.java

@@ -1,4 +1,4 @@
-package com.usoftchina.smartschool.wechat.service;
+package com.usoftchina.smartschool.school.wxschool.basic.service;
 
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.multipart.MultipartFile;
@@ -10,7 +10,7 @@ import org.springframework.web.multipart.MultipartFile;
  * @email ${email}
  * @date 2019-01-16 16:26:27
  */
-public interface FileService {
+public interface WxFileService {
 	/**
 	 * 附件上传
 	 * @param file

+ 8 - 10
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/MeetingService.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/WxMeetingService.java

@@ -1,11 +1,9 @@
-package com.usoftchina.smartschool.wechat.service;
+package com.usoftchina.smartschool.school.wxschool.basic.service;
 
-import com.usoftchina.smartschool.wechat.domain.MeetingDO;
+import com.usoftchina.smartschool.school.po.MeetingDO;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
 
 /**
  * 会议表; InnoDB free: 5120 kB
@@ -14,7 +12,7 @@ import java.util.Map;
  * @email ${email}
  * @date 2019-01-16 16:26:24
  */
-public interface MeetingService {
+public interface WxMeetingService {
 
 	/**
 	 * 创建会议
@@ -31,14 +29,14 @@ public interface MeetingService {
 	 * @param pageIndex
 	 * @param pageSize
 	 */
-	public HashMap<String, Object> meetingList(@Param("teacherId") Long teacherId, @Param("meetingStatus") Integer meetingStatus, @Param("pageIndex")  Integer pageIndex, @Param("pageSize") Integer pageSize);
+	public HashMap<String, Object> meetingList(@Param("teacherId") Long teacherId, @Param("meetingStatus") Integer meetingStatus, @Param("pageIndex") Integer pageIndex, @Param("pageSize") Integer pageSize);
 	/**
 	 * 详情
 	 * @param teacherId
 	 * @param meetingId
 	 * @return
 	 */
-	public MeetingDO getMeetingDetails(@Param("teacherId")Long teacherId, @Param("meetingId")Long meetingId) throws Exception;
+	public MeetingDO getMeetingDetails(@Param("teacherId") Long teacherId, @Param("meetingId") Long meetingId) throws Exception;
 
 	/**
 	 * 会议签到
@@ -47,7 +45,7 @@ public interface MeetingService {
 	 * @return
 	 * @throws Exception
 	 */
-	public int meetingSign(@Param("teacherId")Long teacherId, @Param("meetingId")Long meetingId) throws Exception;
+	public int meetingSign(@Param("teacherId") Long teacherId, @Param("meetingId") Long meetingId) throws Exception;
 
 	/**
 	 * 结束会议
@@ -56,7 +54,7 @@ public interface MeetingService {
 	 * @return
 	 * @throws Exception
 	 */
-	public int endMeeting(@Param("teacherId")Long teacherId, @Param("meetingId")Long meetingId) throws Exception;
+	public int endMeeting(@Param("teacherId") Long teacherId, @Param("meetingId") Long meetingId) throws Exception;
 
 	/**
 	 * 删除会议
@@ -65,5 +63,5 @@ public interface MeetingService {
 	 * @return
 	 * @throws Exception
 	 */
-	public int deleteMeeting(@Param("teacherId")Long teacherId, @Param("meetingId")Long meetingId) throws Exception;
+	public int deleteMeeting(@Param("teacherId") Long teacherId, @Param("meetingId") Long meetingId) throws Exception;
 }

+ 8 - 8
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/NotifyService.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/WxNotifyService.java

@@ -1,6 +1,6 @@
-package com.usoftchina.smartschool.wechat.service;
+package com.usoftchina.smartschool.school.wxschool.basic.service;
 
-import com.usoftchina.smartschool.wechat.domain.NotifyDO;
+import com.usoftchina.smartschool.school.po.NotifyDO;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -13,7 +13,7 @@ import java.util.Map;
  * @email ${email}
  * @date 2019-01-16 16:26:24
  */
-public interface NotifyService {
+public interface WxNotifyService {
 
 	/**
 	 * 获取系统消息和使用帮助
@@ -22,7 +22,7 @@ public interface NotifyService {
 	 * @param pageSize
 	 * @return
 	 */
-	public List<NotifyDO> selectNotifyListByType(@Param("notifyType")Integer notifyType, @Param("pageIndex")Integer pageIndex, @Param("pageSize")Integer pageSize);
+	public List<NotifyDO> selectNotifyListByType(@Param("notifyType") Integer notifyType, @Param("pageIndex") Integer pageIndex, @Param("pageSize") Integer pageSize);
 
 	/**
 	 * 创建通知
@@ -38,7 +38,7 @@ public interface NotifyService {
 	 * @param pageIndex
 	 * @param pageSize
 	 */
-	public Map<String, Object> notifyListByTeacher(@Param("teacherId")Long teacherId, @Param("notifyStatus")Integer notifyStatus, @Param("pageIndex")Integer pageIndex, @Param("pageSize")Integer pageSize);
+	public Map<String, Object> notifyListByTeacher(@Param("teacherId") Long teacherId, @Param("notifyStatus") Integer notifyStatus, @Param("pageIndex") Integer pageIndex, @Param("pageSize") Integer pageSize);
 
 	/**
 	 * 家长分页显示
@@ -47,7 +47,7 @@ public interface NotifyService {
 	 * @param pageIndex
 	 * @param pageSize
 	 */
-	public List<NotifyDO> notifyListByStu(@Param("stuId")Long stuId, @Param("notifyStatus")Integer notifyStatus, @Param("pageIndex")Integer pageIndex, @Param("pageSize")Integer pageSize);
+	public List<NotifyDO> notifyListByStu(@Param("stuId") Long stuId, @Param("notifyStatus") Integer notifyStatus, @Param("pageIndex") Integer pageIndex, @Param("pageSize") Integer pageSize);
 
 	/**
 	 * 家长端获取通知详情
@@ -63,7 +63,7 @@ public interface NotifyService {
 	 * @param teacherId
 	 * @return
 	 */
-	public NotifyDO getNotifyDetailsByTeacher(@Param("notifyId")Long notifyId, @Param("teacherId")Long teacherId);
+	public NotifyDO getNotifyDetailsByTeacher(@Param("notifyId") Long notifyId, @Param("teacherId") Long teacherId);
 
 	/**
 	 * 删除创建的通知
@@ -72,6 +72,6 @@ public interface NotifyService {
 	 * @return
 	 * @throws Exception
 	 */
-	public int deleteNotify(@Param("notifyId")Long notifyId, @Param("teacherId")Long teacherId) throws Exception;
+	public int deleteNotify(@Param("notifyId") Long notifyId, @Param("teacherId") Long teacherId) throws Exception;
 
 }

+ 47 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/WxOaApproveService.java

@@ -0,0 +1,47 @@
+package com.usoftchina.smartschool.school.wxschool.basic.service;
+
+import org.apache.ibatis.annotations.Param;
+
+import java.util.Map;
+
+/**
+ * oa出差/用品/请假表(教师端); InnoDB free: 5120 kB
+ * 
+ * @author kl
+ * @email ${email}
+ * @date 2019-01-16 16:26:25
+ */
+public interface WxOaApproveService {
+	/**
+	 * 创建oa
+	 * @param oaString
+	 * @return
+	 */
+	int oaCreate(String oaString);
+
+
+	/**
+	 * oa单列表
+	 * @param teacherId
+	 */
+	Map<String, Object> oaList(@Param("teacherId") Long teacherId, @Param("pageIndex") Integer pageIndex, @Param("pageSize") Integer pageSize);
+
+	/**
+	 * 审批
+	 * @param teacherId
+	 * @param approveId
+	 * @param status
+	 * @param approveOpinion
+	 * @return
+	 * @throws Exception
+	 */
+	String approve(@Param("teacherId") Long teacherId, @Param("approveId") Long approveId, @Param("status") Integer status, @Param("approveOpinion") String approveOpinion) throws Exception;
+
+	/**
+	 * 详情
+	 * @param approveId
+	 * @return
+	 * @throws Exception
+	 */
+	Map<String, Object> oaDetails(Long approveId) throws Exception ;
+}

+ 4 - 19
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/OaLeaveService.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/WxOaLeaveService.java

@@ -1,6 +1,6 @@
-package com.usoftchina.smartschool.wechat.service;
+package com.usoftchina.smartschool.school.wxschool.basic.service;
 
-import com.usoftchina.smartschool.wechat.domain.OaLeaveDO;
+import com.usoftchina.smartschool.school.po.OaLeaveDO;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -13,22 +13,7 @@ import java.util.Map;
  * @email ${email}
  * @date 2019-01-16 16:26:25
  */
-public interface OaLeaveService {
-	
-	OaLeaveDO get(Long lvId);
-	
-	List<OaLeaveDO> list(Map<String, Object> map);
-	
-	int count(Map<String, Object> map);
-	
-	int save(OaLeaveDO oaLeave);
-	
-	int update(OaLeaveDO oaLeave);
-	
-	int remove(Long lvId);
-	
-	int batchRemove(Long[] lvIds);
-
+public interface WxOaLeaveService {
 
 	/**
 	 * 请假条提交
@@ -52,7 +37,7 @@ public interface OaLeaveService {
 	 * @param pageSize
 	 * @return
 	 */
-	public List<OaLeaveDO> leaveListByTeacher(@Param("teacherId") Long teacherId, @Param("pageIndex") Integer pageIndex, @Param("pageSize")Integer pageSize) throws Exception;
+	public List<OaLeaveDO> leaveListByTeacher(@Param("teacherId") Long teacherId, @Param("pageIndex") Integer pageIndex, @Param("pageSize") Integer pageSize) throws Exception;
 
 	/**
 	 * 请假详情

+ 4 - 5
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/OutInRecordService.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/WxOutInRecordService.java

@@ -1,9 +1,8 @@
-package com.usoftchina.smartschool.wechat.service;
+package com.usoftchina.smartschool.school.wxschool.basic.service;
 
-import com.usoftchina.smartschool.wechat.domain.OutInRecordDO;
+import com.usoftchina.smartschool.school.po.OutInRecordDO;
 import org.apache.ibatis.annotations.Param;
 
-import java.util.List;
 import java.util.Map;
 
 /**
@@ -13,7 +12,7 @@ import java.util.Map;
  * @email ${email}
  * @date 2019-01-16 16:26:26
  */
-public interface OutInRecordService {
+public interface WxOutInRecordService {
 
 	/**
 	 * 获取出入校记录
@@ -22,7 +21,7 @@ public interface OutInRecordService {
 	 * @param pageSize
 	 * @return
 	 */
-	public List<OutInRecordDO> selectRecordOutgoingListByStuId(@Param("stuId") Long stuId, @Param("pageIndex")Integer pageIndex, @Param("pageSize")Integer pageSize);
+	public Map<String, Object> selectRecordOutgoingListByStuId(@Param("stuId") Long stuId, @Param("pageIndex") Integer pageIndex, @Param("pageSize") Integer pageSize);
 
 	/**
 	 * 通知详情

+ 5 - 19
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/PrincipalMailboxService.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/WxPrincipalMailboxService.java

@@ -1,6 +1,6 @@
-package com.usoftchina.smartschool.wechat.service;
+package com.usoftchina.smartschool.school.wxschool.basic.service;
 
-import com.usoftchina.smartschool.wechat.domain.PrincipalMailboxDO;
+import com.usoftchina.smartschool.school.po.PrincipalMailboxDO;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -13,21 +13,7 @@ import java.util.Map;
  * @email ${email}
  * @date 2019-01-16 16:26:26
  */
-public interface PrincipalMailboxService {
-	
-	PrincipalMailboxDO get(Long mailboxId);
-	
-	List<PrincipalMailboxDO> list(Map<String, Object> map);
-	
-	int count(Map<String, Object> map);
-	
-	int save(PrincipalMailboxDO principalMailbox);
-	
-	int update(PrincipalMailboxDO principalMailbox);
-	
-	int remove(Long mailboxId);
-	
-	int batchRemove(Long[] mailboxIds);
+public interface WxPrincipalMailboxService {
 
 	/**
 	 * 校长信箱创建
@@ -83,7 +69,7 @@ public interface PrincipalMailboxService {
 	 * @return
 	 * @throws Exception
 	 */
-	public int deleteMailParent(@Param("mailboxId") Long mailboxId, @Param("parentId")Long parentId) throws Exception;
+	public int deleteMailParent(@Param("mailboxId") Long mailboxId, @Param("parentId") Long parentId) throws Exception;
 
 	/**
 	 * 教师端删除校长信箱
@@ -92,6 +78,6 @@ public interface PrincipalMailboxService {
 	 * @return
 	 * @throws Exception
 	 */
-	public int deleteMailTeacher(@Param("mailboxId") Long mailboxId, @Param("teacherId")Long teacherId) throws Exception;
+	public int deleteMailTeacher(@Param("mailboxId") Long mailboxId, @Param("teacherId") Long teacherId) throws Exception;
 
 }

+ 3 - 3
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/SchoolService.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/WxSchoolService.java

@@ -1,6 +1,6 @@
-package com.usoftchina.smartschool.wechat.service;
+package com.usoftchina.smartschool.school.wxschool.basic.service;
 
-import com.usoftchina.smartschool.wechat.domain.SchoolDO;
+import com.usoftchina.smartschool.school.po.SchoolDO;
 
 import java.util.List;
 import java.util.Map;
@@ -12,7 +12,7 @@ import java.util.Map;
  * @email ${email}
  * @date 2019-01-16 16:26:28
  */
-public interface SchoolService {
+public interface WxSchoolService {
 
 	List<SchoolDO> list(Map<String, Object> map);
 }

+ 3 - 4
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/StuScoreService.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/WxStuScoreService.java

@@ -1,6 +1,5 @@
-package com.usoftchina.smartschool.wechat.service;
+package com.usoftchina.smartschool.school.wxschool.basic.service;
 
-import com.usoftchina.smartschool.wechat.domain.StuScoreDO;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -13,7 +12,7 @@ import java.util.Map;
  * @email ${email}
  * @date 2019-01-16 16:26:27
  */
-public interface StuScoreService {
+public interface WxStuScoreService {
 
 	/**
 	 * 获取成绩信息
@@ -23,5 +22,5 @@ public interface StuScoreService {
 	 * @return
 	 * @throws Exception
 	 */
-	public List<Map> getScoreByStu(@Param("stuId") Long stuId,@Param("pageIndex") Integer pageIndex, @Param("pageSize") Integer pageSize) throws Exception;
+	public List<Map> getScoreByStu(@Param("stuId") Long stuId, @Param("pageIndex") Integer pageIndex, @Param("pageSize") Integer pageSize) throws Exception;
 }

+ 63 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/WxTaskNotifyService.java

@@ -0,0 +1,63 @@
+package com.usoftchina.smartschool.school.wxschool.basic.service;
+
+import com.usoftchina.smartschool.school.po.TaskNotifyDO;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 作业通知表; InnoDB free: 5120 kB
+ * 
+ * @author kl
+ * @email ${email}
+ * @date 2019-01-16 16:26:29
+ */
+public interface WxTaskNotifyService {
+
+	/**
+	 * 发布作业
+	 * @param taskString
+	 * @return
+	 */
+	public String createTask(String taskString) throws Exception;
+
+	/**
+	 * 教师端获取作业列表
+	 * @param teacherId
+	 * @param taskStatus
+	 * @param pageIndex
+	 * @param pageSize
+	 */
+	public List<Map<String, Object>> listTaskTeacher(@Param("teacherId") Long teacherId, @Param("taskStatus") Integer taskStatus, @Param("pageIndex") Integer pageIndex, @Param("pageSize") Integer pageSize) throws Exception;
+
+	/**
+	 * 家长端获取作业列表
+	 * @param stuId
+	 * @param taskStatus
+	 * @param pageIndex
+	 * @param pageSize
+	 */
+	public List<Map<String, Object>> listTaskStu(@Param("stuId") Long stuId, @Param("taskStatus") Integer taskStatus, @Param("pageIndex") Integer pageIndex, @Param("pageSize") Integer pageSize) throws Exception ;
+
+	/**
+	 *家长端获取作业详情
+	 * @param taskId
+	 */
+	public Map<String, Object> taskDetail(Long taskId);
+
+	/**
+	 * 教师端获取作业详情
+	 * @param taskId
+	 * @param teacherId
+	 */
+	public Map<String, Object> taskDetailTeacher(@Param("taskId") Long taskId, @Param("teacherId") Long teacherId) throws Exception;
+
+	/**
+	 * 作业回复
+	 * @param taskRepayString
+	 * @return
+	 * @throws Exception
+	 */
+	public int taskReply(String taskRepayString);
+}

+ 3 - 4
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/UserService.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/WxUserService.java

@@ -1,8 +1,7 @@
-package com.usoftchina.smartschool.wechat.service;
+package com.usoftchina.smartschool.school.wxschool.basic.service;
 
 import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
-import com.usoftchina.smartschool.wechat.domain.TeacherDO;
-import com.usoftchina.smartschool.wechat.domain.UserDO;
+import com.usoftchina.smartschool.school.po.TeacherDO;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.HashMap;
@@ -16,7 +15,7 @@ import java.util.Map;
  * @email ${email}
  * @date 2019-01-16 16:26:29
  */
-public interface UserService {
+public interface WxUserService {
 
 	/**
 	 * 发送验证码

+ 7 - 7
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/VoteService.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/WxVoteService.java

@@ -1,6 +1,6 @@
-package com.usoftchina.smartschool.wechat.service;
+package com.usoftchina.smartschool.school.wxschool.basic.service;
 
-import com.usoftchina.smartschool.wechat.domain.VoteDO;
+import com.usoftchina.smartschool.school.po.VoteDO;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -13,7 +13,7 @@ import java.util.Map;
  * @email ${email}
  * @date 2019-01-16 16:26:30
  */
-public interface VoteService {
+public interface WxVoteService {
 
 	/** 创建投票单 */
 	public String voteCreate(String voteString) throws Exception ;
@@ -25,7 +25,7 @@ public interface VoteService {
 	 * @param voteType
 	 * @return
 	 */
-	public List<VoteDO> voteListStu(@Param("stuId") Long stuId, @Param("pageIndex")Integer pageIndex, @Param("pageSize")Integer pageSize,@Param("voteType") Integer voteType) throws Exception;
+	public List<VoteDO> voteListStu(@Param("stuId") Long stuId, @Param("pageIndex") Integer pageIndex, @Param("pageSize") Integer pageSize, @Param("voteType") Integer voteType) throws Exception;
 
 	/**
 	 * 教师投票单列表
@@ -35,7 +35,7 @@ public interface VoteService {
 	 * @param voteType
 	 * @return
 	 */
-	public Map<String, Object> voteListForTeacher(@Param("teacherId") Long teacherId, @Param("pageIndex")Integer pageIndex, @Param("pageSize")Integer pageSize,@Param("voteType") Integer voteType) throws Exception ;
+	public Map<String, Object> voteListForTeacher(@Param("teacherId") Long teacherId, @Param("pageIndex") Integer pageIndex, @Param("pageSize") Integer pageSize, @Param("voteType") Integer voteType) throws Exception ;
 
 	/**
 	 * 教师端投票
@@ -45,7 +45,7 @@ public interface VoteService {
 	 * @return
 	 * @throws Exception
 	 */
-	public String voteActionTeacher(@Param("optionIds") String optionIds, @Param("voteId")Long voteId, @Param("teacherId")Long teacherId) throws Exception;
+	public String voteActionTeacher(@Param("optionIds") String optionIds, @Param("voteId") Long voteId, @Param("teacherId") Long teacherId) throws Exception;
 
 
 	/**
@@ -56,7 +56,7 @@ public interface VoteService {
 	 * @return
 	 * @throws Exception
 	 */
-	public String voteActionParent(@Param("optionIds") String optionIds, @Param("voteId")Long voteId, @Param("parentId")Long parentId,@Param("stuId")Long stuId) throws Exception;
+	public String voteActionParent(@Param("optionIds") String optionIds, @Param("voteId") Long voteId, @Param("parentId") Long parentId, @Param("stuId") Long stuId) throws Exception;
 
 	/**
 	 * 家长端投票单详情

+ 14 - 17
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/impl/ClazzAlbumServiceImpl.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxClazzAlbumServiceImpl.java

@@ -1,37 +1,34 @@
-package com.usoftchina.smartschool.wechat.service.impl;
+package com.usoftchina.smartschool.school.wxschool.basic.service.impl;
 
 import com.alibaba.fastjson.JSONObject;
-import com.usoftchina.smartschool.wechat.domain.ClazzPictureDO;
-import com.usoftchina.smartschool.wechat.mapper.ClazzPictureMapper;
-import com.usoftchina.smartschool.wechat.mapper.FileMapper;
-import com.usoftchina.smartschool.wechat.mapper.TeacherMapper;
-import com.usoftchina.smartschool.wechat.utils.ObjectUtils;
+import com.usoftchina.smartschool.school.po.ClazzAlbumDO;
+import com.usoftchina.smartschool.school.po.ClazzPictureDO;
+import com.usoftchina.smartschool.school.wxschool.mapper.WxClazzAlbumMapper;
+import com.usoftchina.smartschool.school.wxschool.mapper.WxClazzPictureMapper;
+import com.usoftchina.smartschool.school.wxschool.mapper.WxFileMapper;
+import com.usoftchina.smartschool.school.wxschool.mapper.WxTeacherMapper;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxClazzAlbumService;
+import com.usoftchina.smartschool.school.wxschool.utils.ObjectUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.Date;
 import java.util.List;
-import java.util.Map;
-
-import com.usoftchina.smartschool.wechat.mapper.ClazzAlbumMapper;
-import com.usoftchina.smartschool.wechat.domain.ClazzAlbumDO;
-import com.usoftchina.smartschool.wechat.service.ClazzAlbumService;
-
 
 
 @Service
-public class ClazzAlbumServiceImpl implements ClazzAlbumService {
+public class WxClazzAlbumServiceImpl implements WxClazzAlbumService {
 	@Autowired
-	private ClazzAlbumMapper clazzAlbumMapper;
+	private WxClazzAlbumMapper clazzAlbumMapper;
 
 	@Autowired
-	private TeacherMapper teacherMapper;
+	private WxTeacherMapper teacherMapper;
 
 	@Autowired
-	private ClazzPictureMapper clazzPictureMapper;
+	private WxClazzPictureMapper clazzPictureMapper;
 
 	@Autowired
-	private FileMapper fileMapper;
+	private WxFileMapper fileMapper;
 
 	/**
 	 * 创建相册

+ 171 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxClazzCurriculumServiceImpl.java

@@ -0,0 +1,171 @@
+package com.usoftchina.smartschool.school.wxschool.basic.service.impl;
+
+import com.usoftchina.smartschool.school.po.TeacherClazzDO;
+import com.usoftchina.smartschool.school.po.TeacherDO;
+import com.usoftchina.smartschool.school.wxschool.mapper.*;
+import com.usoftchina.smartschool.school.po.ClazzCurriculumDO;
+import com.usoftchina.smartschool.school.po.StudentDO;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxClazzCurriculumService;
+import com.usoftchina.smartschool.school.wxschool.utils.ObjectUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+
+@Service
+public class WxClazzCurriculumServiceImpl implements WxClazzCurriculumService {
+	@Autowired
+	private WxClazzCurriculumMapper clazzCurriculumMapper;
+
+	@Autowired
+	private WxSubjectMapper subjectMapper;
+
+	@Autowired
+	private WxTeacherMapper wxTeacherMapper;
+
+	@Autowired
+	private WxTeacherClazzMapper wxTeacherClazzMapper;
+
+	@Override
+	public Map<String, Object> selectCurriculumByStuId(Long stuId, Integer curStatus) throws Exception {
+		List<ClazzCurriculumDO> curricula = clazzCurriculumMapper.selectCurriculumByStuId(stuId, curStatus);
+		if (ObjectUtils.isNotEmpty(curricula)){
+			//Map<String, Object> maps = new HashMap<>();
+			//StudentDO studentDO = studentMapper.get(stuId);
+			//if (ObjectUtils.isNotEmpty(studentDO)){
+				//maps.put("stuName",studentDO.getStuName());
+				//maps.put("clazzName",clazzMapper.get(studentDO.getClazzId()).getClazzName());
+				//maps.put("curricula",curricula);
+			//}else {
+				//throw new Exception("该学生不存在,请联系管理员");
+			//}
+			return getCurr(curricula);
+		}else {
+			throw new Exception("暂时没有课程表,请联系管理员");
+		}
+
+	}
+
+	@Override
+	public Map<String, Object> selectCurriculumByTeacherId(Long teacherId, Integer curStatus) throws Exception {
+		List<ClazzCurriculumDO> curricula = clazzCurriculumMapper.selectCurriculumByteacherId(teacherId, curStatus);
+		if (ObjectUtils.isNotEmpty(curricula)){
+			return getCurr(curricula);
+		}else {
+			throw new Exception("暂无数据");
+		}
+
+	}
+
+
+	/**
+	 * 写入科目信息
+	 * @param curricula
+	 * @return
+	 */
+	private Map<String, Object> getCurr(List<ClazzCurriculumDO> curricula) {
+		Map<String, Object> map = new HashMap<>();
+		List<Map<String,Object>> curFris = new ArrayList<>();
+		List<Map<String,Object>> curMons = new ArrayList<>();					List<Map<String,Object>> curSats = new ArrayList<>();
+		List<Map<String,Object>> curThurs = new ArrayList<>();
+		List<Map<String,Object>> curTuess = new ArrayList<>();
+		List<Map<String,Object>> curWeds = new ArrayList<>();
+		SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm");
+		dateFormat.setTimeZone(TimeZone.getTimeZone("GMT-6"));
+		for (ClazzCurriculumDO cc:curricula) {
+			Long curFri = cc.getCurFri();
+			//System.err.println(cc.getCurStartTime());
+			//System.err.println(dateFormat.format(cc.getCurStartTime()));
+			if (ObjectUtils.isNotEmpty(curFri)){
+				Map<String, Object> curFriMap = new HashMap<>();
+				curFriMap.put("startTime",dateFormat.format(cc.getCurStartTime()));
+				curFriMap.put("endTime",dateFormat.format(cc.getCurEndTime()));
+				curFriMap.put("subjectName",subjectMapper.get(curFri).getSubjectName());
+				TeacherClazzDO teacher1 = wxTeacherClazzMapper.getTeacher(cc.getClazzId(), curFri);
+				TeacherDO teacherDO1 = wxTeacherMapper.get(teacher1.getTeacherId());
+				curFriMap.put("teacherName",teacherDO1.getTeacherName());
+				curFriMap.put("teacherPhoto",teacherDO1.getTeacherPhoto());
+				curFris.add(curFriMap);
+			}
+
+
+			Long curMon = cc.getCurMon();
+			if (ObjectUtils.isNotEmpty(curMon)){
+				Map<String, Object> curMonMap = new HashMap<>();
+				curMonMap.put("startTime",dateFormat.format(cc.getCurStartTime()));
+				curMonMap.put("endTime",dateFormat.format(cc.getCurEndTime()));
+				curMonMap.put("subjectName",subjectMapper.get(curMon).getSubjectName());
+				TeacherClazzDO teacher2 = wxTeacherClazzMapper.getTeacher(cc.getClazzId(), curMon);
+				TeacherDO teacherDO2 = wxTeacherMapper.get(teacher2.getTeacherId());
+				curMonMap.put("teacherName",teacherDO2.getTeacherName());
+				curMonMap.put("teacherPhoto",teacherDO2.getTeacherPhoto());
+				curMons.add(curMonMap);
+			}
+
+
+			Long curSat = cc.getCurSat();
+			if (ObjectUtils.isNotEmpty(curSat)){
+				Map<String, Object> curSatMap = new HashMap<>();
+				curSatMap.put("startTime",dateFormat.format(cc.getCurStartTime()));
+				curSatMap.put("endTime",dateFormat.format(cc.getCurEndTime()));
+				curSatMap.put("subjectName",subjectMapper.get(curSat).getSubjectName());
+				TeacherClazzDO teacher3 = wxTeacherClazzMapper.getTeacher(cc.getClazzId(), curSat);
+				TeacherDO teacherDO3 = wxTeacherMapper.get(teacher3.getTeacherId());
+				curSatMap.put("teacherName",teacherDO3.getTeacherName());
+				curSatMap.put("teacherPhoto",teacherDO3.getTeacherPhoto());
+				curSats.add(curSatMap);
+			}
+
+
+			Long curThur = cc.getCurThur();
+			if (ObjectUtils.isNotEmpty(curThur)){
+				Map<String, Object> curThurMap = new HashMap<>();
+				curThurMap.put("startTime",dateFormat.format(cc.getCurStartTime()));
+				curThurMap.put("endTime",dateFormat.format(cc.getCurEndTime()));
+				curThurMap.put("subjectName",subjectMapper.get(curThur).getSubjectName());
+				TeacherClazzDO teacher4 = wxTeacherClazzMapper.getTeacher(cc.getClazzId(), curThur);
+				TeacherDO teacherDO4 = wxTeacherMapper.get(teacher4.getTeacherId());
+				curThurMap.put("teacherName",teacherDO4.getTeacherName());
+				curThurMap.put("teacherPhoto",teacherDO4.getTeacherPhoto());
+				curThurs.add(curThurMap);
+			}
+
+
+			Long curTues = cc.getCurTues();
+			if (ObjectUtils.isNotEmpty(curTues)){
+				Map<String, Object> curTuesMap = new HashMap<>();
+				curTuesMap.put("startTime",dateFormat.format(cc.getCurStartTime()));
+				curTuesMap.put("endTime",dateFormat.format(cc.getCurEndTime()));
+				curTuesMap.put("subjectName",subjectMapper.get(curTues).getSubjectName());
+				TeacherClazzDO teacher5 = wxTeacherClazzMapper.getTeacher(cc.getClazzId(), curTues);
+				TeacherDO teacherDO5 = wxTeacherMapper.get(teacher5.getTeacherId());
+				curTuesMap.put("teacherName",teacherDO5.getTeacherName());
+				curTuesMap.put("teacherPhoto",teacherDO5.getTeacherPhoto());
+				curTuess.add(curTuesMap);
+			}
+
+
+			Long curWed = cc.getCurWed();
+			if (ObjectUtils.isNotEmpty(curWed)){
+				Map<String, Object> curWedMap = new HashMap<>();
+				curWedMap.put("startTime",dateFormat.format(cc.getCurStartTime()));
+				curWedMap.put("endTime",dateFormat.format(cc.getCurEndTime()));
+				curWedMap.put("subjectName",subjectMapper.get(curWed).getSubjectName());
+				TeacherClazzDO teacher6 = wxTeacherClazzMapper.getTeacher(cc.getClazzId(), curWed);
+				TeacherDO teacherDO6 = wxTeacherMapper.get(teacher6.getTeacherId());
+				curWedMap.put("teacherName",teacherDO6.getTeacherName());
+				curWedMap.put("teacherPhoto",teacherDO6.getTeacherPhoto());
+				curWeds.add(curWedMap);
+			}
+		}
+		map.put("curMons",curMons);
+		map.put("curFris",curFris);
+		map.put("curSats",curSats);
+		map.put("curThurs",curThurs);
+		map.put("curTuess",curTuess);
+		map.put("curWeds",curWeds);
+		return map;
+	}
+}

+ 12 - 14
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/impl/ClazzPictureServiceImpl.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxClazzPictureServiceImpl.java

@@ -1,32 +1,30 @@
-package com.usoftchina.smartschool.wechat.service.impl;
+package com.usoftchina.smartschool.school.wxschool.basic.service.impl;
 
 import com.alibaba.fastjson.JSON;
-import com.usoftchina.smartschool.wechat.domain.ClazzAlbumDO;
-import com.usoftchina.smartschool.wechat.mapper.ClazzAlbumMapper;
-import com.usoftchina.smartschool.wechat.mapper.FileMapper;
-import com.usoftchina.smartschool.wechat.utils.ObjectUtils;
+import com.usoftchina.smartschool.school.po.ClazzAlbumDO;
+import com.usoftchina.smartschool.school.po.ClazzPictureDO;
+import com.usoftchina.smartschool.school.wxschool.mapper.WxClazzAlbumMapper;
+import com.usoftchina.smartschool.school.wxschool.mapper.WxClazzPictureMapper;
+import com.usoftchina.smartschool.school.wxschool.mapper.WxFileMapper;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxClazzPictureService;
+import com.usoftchina.smartschool.school.wxschool.utils.ObjectUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.Date;
 import java.util.List;
 
-import com.usoftchina.smartschool.wechat.mapper.ClazzPictureMapper;
-import com.usoftchina.smartschool.wechat.domain.ClazzPictureDO;
-import com.usoftchina.smartschool.wechat.service.ClazzPictureService;
-
-
 
 @Service
-public class ClazzPictureServiceImpl implements ClazzPictureService {
+public class WxClazzPictureServiceImpl implements WxClazzPictureService {
 	@Autowired
-	private ClazzPictureMapper clazzPictureMapper;
+	private WxClazzPictureMapper clazzPictureMapper;
 
 	@Autowired
-	private FileMapper fileMapper;
+	private WxFileMapper fileMapper;
 
 	@Autowired
-	private ClazzAlbumMapper clazzAlbumMapper;
+	private WxClazzAlbumMapper clazzAlbumMapper;
 
 	/**
 	 * 更新相册

+ 23 - 26
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/impl/ClazzServiceImpl.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxClazzServiceImpl.java

@@ -1,8 +1,9 @@
-package com.usoftchina.smartschool.wechat.service.impl;
+package com.usoftchina.smartschool.school.wxschool.basic.service.impl;
 
-import com.usoftchina.smartschool.wechat.domain.*;
-import com.usoftchina.smartschool.wechat.mapper.*;
-import com.usoftchina.smartschool.wechat.utils.ObjectUtils;
+import com.usoftchina.smartschool.school.po.*;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxClazzService;
+import com.usoftchina.smartschool.school.wxschool.mapper.*;
+import com.usoftchina.smartschool.school.wxschool.utils.ObjectUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -11,35 +12,32 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import com.usoftchina.smartschool.wechat.service.ClazzService;
-
-
 
 @Service
-public class ClazzServiceImpl implements ClazzService {
+public class WxClazzServiceImpl implements WxClazzService {
 	@Autowired
-	private ClazzMapper clazzMapper;
+	private WxClazzMapper clazzMapper;
 
 	@Autowired
-	private TeacherClazzMapper teacherClazzMapper;
+	private WxTeacherClazzMapper teacherClazzMapper;
 
 	@Autowired
-	private GradeMapper gradeMapper;
+	private WxGradeMapper gradeMapper;
 
 	@Autowired
-	private UserMapper userMapper;
+	private WxUserMapper userMapper;
 
 	@Autowired
-	private ParentsMapper parentsMapper;
+	private WxParentsMapper parentsMapper;
 
 	@Autowired
-	private TeacherMapper teacherMapper;
+	private WxTeacherMapper teacherMapper;
 
 	@Autowired
-	private StudentMapper studentMapper;
+	private WxStudentMapper studentMapper;
 
 	@Autowired
-	private ParentsStuMapper parentsStuMapper;
+	private WxParentsStuMapper parentsStuMapper;
 
 	/**
 	 * 老师获取所教班级
@@ -79,22 +77,21 @@ public class ClazzServiceImpl implements ClazzService {
 	public List<ClazzDO> selectParentPhoneByTeacher(Long teacherId, String selectKey) throws Exception {
 		List<ClazzDO> clazzDOS = selectClazz(teacherId);
 		for (ClazzDO cz:clazzDOS) {
-			List<StudentDO> studentDOS = studentMapper.listByClazzId(cz.getClazzId());
+			Map<String, Object> map = new HashMap<>();
+			map.put("clazzId",cz.getClazzId());
+			map.put("stuName","%"+selectKey+"%");
+			List<StudentDO> studentDOS = studentMapper.list(map);
 			if (ObjectUtils.isNotEmpty(studentDOS)){
 				for (StudentDO st:studentDOS) {
 					List<ParentsStuDO> parentsStuDOS = parentsStuMapper.listByStuId(st.getStuId());
 					if (ObjectUtils.isNotEmpty(parentsStuDOS)){
+						List<ParentsDO> parentsDOS = new ArrayList<>();
 						for (ParentsStuDO ps:parentsStuDOS) {
-							Map<String, Object> map = new HashMap<>();
-							map.put("parentId",ps.getParentId());
-							map.put("parentsName","%"+selectKey+"%");
-							//map.put("","%"+selectKey+"%");
-							List<ParentsDO> list = parentsMapper.list(map);
-							for (ParentsDO pt:list) {
-								pt.setUserPhone(userMapper.get(pt.getUserId()).getUserPhone());
-							}
-							st.setParentsDOS(list);
+							ParentsDO parentsDO = parentsMapper.get(ps.getParentId());
+							parentsDO.setUserPhone(userMapper.get(parentsDO.getUserId()).getUserPhone());
+							parentsDOS.add(parentsDO);
 						}
+						st.setParentsDOS(parentsDOS);
 					}
 				}
 				cz.setStudentDOS(studentDOS);

+ 10 - 17
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/impl/FileServiceImpl.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxFileServiceImpl.java

@@ -1,30 +1,23 @@
-package com.usoftchina.smartschool.wechat.service.impl;
+package com.usoftchina.smartschool.school.wxschool.basic.service.impl;
 
-import com.usoftchina.smartschool.wechat.config.SchoolConfig;
-import com.usoftchina.smartschool.wechat.utils.FileType;
-import com.usoftchina.smartschool.wechat.utils.FileUtil;
-import com.usoftchina.smartschool.wechat.utils.ResultBean;
+import com.usoftchina.smartschool.school.wxschool.config.SchoolConfig;
+import com.usoftchina.smartschool.school.po.FileDO;
+import com.usoftchina.smartschool.school.wxschool.mapper.WxFileMapper;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxFileService;
+import com.usoftchina.smartschool.school.wxschool.utils.FileType;
+import com.usoftchina.smartschool.school.wxschool.utils.FileUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-import com.usoftchina.smartschool.wechat.mapper.FileMapper;
-import com.usoftchina.smartschool.wechat.domain.FileDO;
-import com.usoftchina.smartschool.wechat.service.FileService;
-import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.multipart.MultipartFile;
 
-import javax.servlet.http.HttpServletRequest;
+import java.util.Date;
 
 
 @Service
-public class FileServiceImpl implements FileService {
+public class WxFileServiceImpl implements WxFileService {
 	@Autowired
-	private FileMapper fileMapper;
+	private WxFileMapper fileMapper;
 
 	@Autowired
 	private SchoolConfig schoolConfig;

+ 28 - 20
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/impl/MeetingServiceImpl.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxMeetingServiceImpl.java

@@ -1,35 +1,42 @@
-package com.usoftchina.smartschool.wechat.service.impl;
+package com.usoftchina.smartschool.school.wxschool.basic.service.impl;
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
-import com.usoftchina.smartschool.wechat.domain.MeetingRecordsDO;
-import com.usoftchina.smartschool.wechat.domain.TeacherDO;
-import com.usoftchina.smartschool.wechat.mapper.MeetingRecordsMapper;
-import com.usoftchina.smartschool.wechat.mapper.TeacherMapper;
-import com.usoftchina.smartschool.wechat.support.RemindTask;
-import com.usoftchina.smartschool.wechat.utils.DateFormatUtil;
-import com.usoftchina.smartschool.wechat.utils.ObjectUtils;
+import com.usoftchina.smartschool.school.po.MeetingDO;
+import com.usoftchina.smartschool.school.po.MeetingRecordsDO;
+import com.usoftchina.smartschool.school.po.TeacherDO;
+import com.usoftchina.smartschool.school.wxschool.mapper.WxMeetingMapper;
+import com.usoftchina.smartschool.school.wxschool.mapper.WxMeetingRecordsMapper;
+import com.usoftchina.smartschool.school.wxschool.mapper.WxSchoolMapper;
+import com.usoftchina.smartschool.school.wxschool.mapper.WxTeacherMapper;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxMeetingService;
+import com.usoftchina.smartschool.school.wxschool.support.RemindTask;
+import com.usoftchina.smartschool.school.wxschool.utils.DateFormatUtil;
+import com.usoftchina.smartschool.school.wxschool.utils.ObjectUtils;
+
+import com.usoftchina.smartschool.wechat.api.WxPushApi;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.*;
 
-import com.usoftchina.smartschool.wechat.mapper.MeetingMapper;
-import com.usoftchina.smartschool.wechat.domain.MeetingDO;
-import com.usoftchina.smartschool.wechat.service.MeetingService;
 
+@Service
+public class WxMeetingServiceImpl implements WxMeetingService {
+	@Autowired
+	private WxMeetingMapper meetingMapper;
 
+	@Autowired
+	private WxMeetingRecordsMapper meetingRecordsMapper;
 
-@Service
-public class MeetingServiceImpl implements MeetingService {
 	@Autowired
-	private MeetingMapper meetingMapper;
+	private WxTeacherMapper teacherMapper;
 
 	@Autowired
-	private MeetingRecordsMapper meetingRecordsMapper;
+	private WxPushApi wxPushApi;
 
 	@Autowired
-	private TeacherMapper teacherMapper;
+	private WxSchoolMapper wxSchoolMapper;
 
 	/**
 	 * 创建会议
@@ -61,7 +68,8 @@ public class MeetingServiceImpl implements MeetingService {
 		int save = meetingMapper.save(meetingDO);
 		if (save>0){
 			List<Long> longs = JSON.parseArray(meetingNotifier, Long.class);
-			for (Long l:longs) {
+			List<Long> list = removeDuplicate(longs);
+			for (Long l:list) {
 				MeetingRecordsDO meetingRecordsDO = new MeetingRecordsDO();
 				if (creator.compareTo(l)==0){
 					meetingRecordsDO.setIsRead(2);
@@ -73,9 +81,9 @@ public class MeetingServiceImpl implements MeetingService {
 				meetingRecordsMapper.save(meetingRecordsDO);
 			}
 			Timer timer = new Timer();
-			timer.schedule(new RemindTask(meetingMapper,1,meetingDO.getMeetingId()), startDate);
-			timer.schedule(new RemindTask(meetingMapper,2,meetingDO.getMeetingId()), endDate);
-			timer.schedule(new RemindTask(meetingMapper,3,meetingDO.getMeetingId()), reminderDate);
+			timer.schedule(new RemindTask(teacherMapper,wxSchoolMapper,wxPushApi,meetingMapper,1,meetingDO), startDate);
+			timer.schedule(new RemindTask(teacherMapper,wxSchoolMapper,wxPushApi,meetingMapper,2,meetingDO), endDate);
+			timer.schedule(new RemindTask(teacherMapper,wxSchoolMapper,wxPushApi,meetingMapper,3,meetingDO), reminderDate);
 			return "创建成功";
 		}else {
 			throw new Exception("创建失败,请核查");

+ 44 - 14
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/impl/NotifyServiceImpl.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxNotifyServiceImpl.java

@@ -1,33 +1,44 @@
-package com.usoftchina.smartschool.wechat.service.impl;
+package com.usoftchina.smartschool.school.wxschool.basic.service.impl;
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
-import com.usoftchina.smartschool.wechat.domain.*;
-import com.usoftchina.smartschool.wechat.mapper.*;
-import com.usoftchina.smartschool.wechat.utils.ObjectUtils;
-import org.apache.ibatis.annotations.Param;
+import com.usoftchina.smartschool.school.po.*;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxNotifyService;
+import com.usoftchina.smartschool.school.wxschool.mapper.*;
+import com.usoftchina.smartschool.school.wxschool.utils.ObjectUtils;
+import com.usoftchina.smartschool.wechat.api.WxPushApi;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.text.SimpleDateFormat;
 import java.util.*;
 
-import com.usoftchina.smartschool.wechat.service.NotifyService;
 
+@Service
+public class WxNotifyServiceImpl implements WxNotifyService {
+	@Autowired
+	private WxNotifyMapper notifyMapper;
 
+	@Autowired
+	private WxTeacherMapper teacherMapper;
+
+	@Autowired
+	private WxNotifyrecordsMapper notifyrecordsMapper;
+
+	@Autowired
+	private WxStudentMapper studentMapper;
 
-@Service
-public class NotifyServiceImpl implements NotifyService {
 	@Autowired
-	private NotifyMapper notifyMapper;
+	private WxPushApi wxPushApi;
 
 	@Autowired
-	private TeacherMapper teacherMapper;
+	private WxSchoolMapper wxSchoolMapper;
 
 	@Autowired
-	private NotifyrecordsMapper notifyrecordsMapper;
+	private WxParentsMapper wxParentsMapper;
 
 	@Autowired
-	private StudentMapper studentMapper;
+	private WxParentsStuMapper wxParentsStuMapper;
 
 
 	/**
@@ -50,8 +61,10 @@ public class NotifyServiceImpl implements NotifyService {
 		JSONObject json = JSONObject.parseObject(jsonNotify);
 		NotifyDO notifyDO = new NotifyDO();
 		notifyDO.setCreateDate(new Date());
-		notifyDO.setNotifyTitle(json.getString("notifyTitle"));
-		notifyDO.setNotifyDetails(json.getString("notifyDetails"));
+		String notifyTitle = json.getString("notifyTitle");
+		notifyDO.setNotifyTitle(notifyTitle);
+		String notifyDetails = json.getString("notifyDetails");
+		notifyDO.setNotifyDetails(notifyDetails);
 		Long notifyCreator = json.getLong("notifyCreator");
 		notifyDO.setNotifyCreator(notifyCreator);
 		notifyDO.setSchoolId(teacherMapper.get(notifyCreator).getSchoolId());
@@ -65,6 +78,7 @@ public class NotifyServiceImpl implements NotifyService {
 		notifyDO.setNotifyStu(notifyStu);
 		int save = notifyMapper.save(notifyDO);
 		if (save>0){
+			SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
 			List<Long> longs = JSON.parseArray(notifyTeacher, Long.class);
 			if (ObjectUtils.isNotEmpty(longs)){
 				List<Long> list = removeDuplicate(longs);
@@ -78,6 +92,9 @@ public class NotifyServiceImpl implements NotifyService {
 					notifyrecordsDO.setNotifyId(notifyDO.getNotifyId());
 					notifyrecordsDO.setTeacherId(l);
 					notifyrecordsMapper.save(notifyrecordsDO);
+					TeacherDO teacherDO = teacherMapper.get(l);
+					SchoolDO schoolDO = wxSchoolMapper.get(teacherDO.getSchoolId());
+					wxPushApi.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),teacherDO.getOpenid(), "h0BkcnTo24b2jsficMeVO0B17GvE-VzlPvF0fVXea4w", "您好,您有一条通知", schoolDO.getSchoolName(),teacherMapper.get(notifyCreator).getTeacherName(),format.format(new Date()),notifyDetails, "点击查看详情", "");
 				}
 			}
 			List<Long> stuIds = JSON.parseArray(notifyStu, Long.class);
@@ -89,6 +106,14 @@ public class NotifyServiceImpl implements NotifyService {
 					notifyrecordsDO.setNotifyId(notifyDO.getNotifyId());
 					notifyrecordsDO.setStuId(l);
 					notifyrecordsMapper.save(notifyrecordsDO);
+					List<ParentsStuDO> parentsStuDOS = wxParentsStuMapper.listByStuId(l);
+					if (parentsStuDOS.size()>0){
+						for (ParentsStuDO ps:parentsStuDOS) {
+							ParentsDO parentsDO = wxParentsMapper.get(ps.getParentId());
+							SchoolDO schoolDO = wxSchoolMapper.get(parentsDO.getSchoolId());
+							this.wxPushApi.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),parentsDO.getOpenid(), "h0BkcnTo24b2jsficMeVO0B17GvE-VzlPvF0fVXea4w", "您好,您有一条通知", schoolDO.getSchoolName(),teacherMapper.get(notifyCreator).getTeacherName(),format.format(new Date()),notifyDetails, "点击查看详情", "");
+						}
+					}
 				}
 			}
 			return "创建成功";
@@ -191,6 +216,11 @@ public class NotifyServiceImpl implements NotifyService {
 		TeacherDO teacherDO = teacherMapper.get(notifyDO.getNotifyCreator());
 		notifyDO.setTeacherName(teacherDO.getTeacherName());
 		notifyDO.setTeacherPhoto(teacherDO.getTeacherPhoto());
+		String notifyFiles = notifyDO.getNotifyFiles();
+		if (ObjectUtils.isNotEmpty(notifyFiles)) {
+			List<String> strings = JSON.parseArray(notifyFiles, String.class);
+			notifyDO.setEnclosure(strings);
+		}
 		HashMap<String, Object> map = new HashMap<>();
 		map.put("notifyId",notifyDO.getNotifyId());
 		List<NotifyrecordsDO> notifyrecords = notifyrecordsMapper.list(map);

+ 34 - 23
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/impl/OaApproveServiceImpl.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxOaApproveServiceImpl.java

@@ -1,43 +1,52 @@
-package com.usoftchina.smartschool.wechat.service.impl;
+package com.usoftchina.smartschool.school.wxschool.basic.service.impl;
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
-import com.usoftchina.smartschool.wechat.domain.OaArticlesDO;
-import com.usoftchina.smartschool.wechat.domain.TeacherDO;
-import com.usoftchina.smartschool.wechat.mapper.OaArticlesMapper;
-import com.usoftchina.smartschool.wechat.mapper.TeacherMapper;
-import com.usoftchina.smartschool.wechat.oaBean.Leader;
-import com.usoftchina.smartschool.wechat.oaBean.Manager;
-import com.usoftchina.smartschool.wechat.utils.DateFormatUtil;
-import com.usoftchina.smartschool.wechat.utils.ObjectUtils;
+import com.usoftchina.smartschool.school.po.OaApproveDO;
+import com.usoftchina.smartschool.school.po.OaArticlesDO;
+import com.usoftchina.smartschool.school.po.SchoolDO;
+import com.usoftchina.smartschool.school.po.TeacherDO;
+import com.usoftchina.smartschool.school.wxschool.mapper.WxOaApproveMapper;
+import com.usoftchina.smartschool.school.wxschool.mapper.WxOaArticlesMapper;
+import com.usoftchina.smartschool.school.wxschool.mapper.WxSchoolMapper;
+import com.usoftchina.smartschool.school.wxschool.mapper.WxTeacherMapper;
+import com.usoftchina.smartschool.school.wxschool.oaBean.Leader;
+import com.usoftchina.smartschool.school.wxschool.oaBean.Manager;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxOaApproveService;
+import com.usoftchina.smartschool.school.wxschool.utils.DateFormatUtil;
+import com.usoftchina.smartschool.school.wxschool.utils.ObjectUtils;
+import com.usoftchina.smartschool.wechat.api.WxPushApi;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.text.SimpleDateFormat;
 import java.util.*;
 
-import com.usoftchina.smartschool.wechat.mapper.OaApproveMapper;
-import com.usoftchina.smartschool.wechat.domain.OaApproveDO;
-import com.usoftchina.smartschool.wechat.service.OaApproveService;
 
+@Service
+public class WxOaApproveServiceImpl implements WxOaApproveService {
+	@Autowired
+	private WxOaApproveMapper oaApproveMapper;
 
+	@Autowired
+	private WxOaArticlesMapper oaArticlesMapper;
 
-@Service
-public class OaApproveServiceImpl implements OaApproveService {
 	@Autowired
-	private OaApproveMapper oaApproveMapper;
+	private WxTeacherMapper teacherMapper;
 
 	@Autowired
-	private OaArticlesMapper oaArticlesMapper;
+	private WxPushApi wxPushApi;
 
 	@Autowired
-	private TeacherMapper teacherMapper;
+	private WxSchoolMapper wxSchoolMapper;
 
 	public int oaCreate(String oaString){
 		JSONObject parse = JSONObject.parseObject(oaString);
 		OaApproveDO oaApprove = new OaApproveDO();
-		oaApprove.setApproveTitle(parse.getString("approveTitle"));
-		oaApprove.setApproveDetails(parse.getString("approveDetails"));
+		String approveTitle = parse.getString("approveTitle");
+		oaApprove.setApproveTitle(approveTitle);
+		String approveDetails = parse.getString("approveDetails");
+		oaApprove.setApproveDetails(approveDetails);
 		oaApprove.setApproveFiles(parse.getString("approveFiles"));
 		/** 类型 1、出差  2、用品 3、外出  4、请假*/
 		Integer type = parse.getInteger("approveType");
@@ -55,7 +64,10 @@ public class OaApproveServiceImpl implements OaApproveService {
 		oaApprove.setAddress(parse.getString("address"));
 		int i = oaApproveMapper.save(oaApprove);
 		if (i>0){
-			//SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+			SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+			TeacherDO teacherDO = teacherMapper.get(approver);
+			TeacherDO teacher = teacherMapper.get(proposer);
+			SchoolDO schoolDO = wxSchoolMapper.get(teacherDO.getSchoolId());
 			if (type!= null && 2==type) {
 				String articles1 = parse.getString("oaArticlesDOS");
 				List<OaArticlesDO> oaArticlesDOS = JSONObject.parseArray(articles1, OaArticlesDO.class);
@@ -65,10 +77,9 @@ public class OaApproveServiceImpl implements OaApproveService {
 						oaArticlesMapper.save(articles);
 					}
 				}
-				/*userService.wxPush(userMapper.selectUserById(approver).getUserOpenid(),"ohqfldHKfEmZPrLthLYt3h5SEjqd0AY7UFdngTDLTFY","您有一个待审批事项",parse.getString("approveName"),userMapper.selectUserById(proposer).getUserName(),format.format(new Date()),parse.getString("approveDetails"),"点击查看详情","https://www.akuiguoshu.com/smart-school/");
+				wxPushApi.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),teacherDO.getOpenid(),"ohqfldHKfEmZPrLthLYt3h5SEjqd0AY7UFdngTDLTFY","您有一个待审批事项",approveTitle,teacher.getTeacherName(),format.format(new Date()),approveDetails,"点击查看详情","");
 			}else {
-				userService.wxPush(userMapper.selectUserById(approver).getUserOpenid(),"ohqfldHKfEmZPrLthLYt3h5SEjqd0AY7UFdngTDLTFY","您有一个待审批事项",parse.getString("approveName"),userMapper.selectUserById(proposer).getUserName(),format.format(new Date()),parse.getString("approveDetails"),"点击查看详情","https://www.akuiguoshu.com/smart-school/");
-			}*/
+				wxPushApi.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),teacherDO.getOpenid(),"ohqfldHKfEmZPrLthLYt3h5SEjqd0AY7UFdngTDLTFY","您有一个待审批事项",approveTitle,teacher.getTeacherName(),format.format(new Date()),approveDetails,"点击查看详情","");
 			}
 			return i;
 		}else {

+ 24 - 56
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/impl/OaLeaveServiceImpl.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxOaLeaveServiceImpl.java

@@ -1,74 +1,42 @@
-package com.usoftchina.smartschool.wechat.service.impl;
+package com.usoftchina.smartschool.school.wxschool.basic.service.impl;
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
-import com.usoftchina.smartschool.wechat.domain.OaLeaveReplyDO;
-import com.usoftchina.smartschool.wechat.domain.StudentDO;
-import com.usoftchina.smartschool.wechat.domain.TeacherDO;
-import com.usoftchina.smartschool.wechat.mapper.OaLeaveReplyMapper;
-import com.usoftchina.smartschool.wechat.mapper.StudentMapper;
-import com.usoftchina.smartschool.wechat.mapper.TeacherMapper;
-import com.usoftchina.smartschool.wechat.utils.DateFormatUtil;
-import com.usoftchina.smartschool.wechat.utils.ObjectUtils;
+import com.usoftchina.smartschool.school.po.*;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxSchoolService;
+import com.usoftchina.smartschool.school.wxschool.mapper.*;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxOaLeaveService;
+import com.usoftchina.smartschool.school.wxschool.utils.DateFormatUtil;
+import com.usoftchina.smartschool.school.wxschool.utils.ObjectUtils;
+import com.usoftchina.smartschool.wechat.api.WxPushApi;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
 
-import com.usoftchina.smartschool.wechat.mapper.OaLeaveMapper;
-import com.usoftchina.smartschool.wechat.domain.OaLeaveDO;
-import com.usoftchina.smartschool.wechat.service.OaLeaveService;
 
+@Service
+public class WxOaLeaveServiceImpl implements WxOaLeaveService {
+	@Autowired
+	private WxOaLeaveMapper oaLeaveMapper;
 
+	@Autowired
+	private WxTeacherMapper teacherMapper;
 
-@Service
-public class OaLeaveServiceImpl implements OaLeaveService {
 	@Autowired
-	private OaLeaveMapper oaLeaveMapper;
+	private WxStudentMapper studentMapper;
 
 	@Autowired
-	private TeacherMapper teacherMapper;
+	private WxOaLeaveReplyMapper oaLeaveReplyMapper;
 
 	@Autowired
-	private StudentMapper studentMapper;
+	private WxPushApi wxPushApi;
 
 	@Autowired
-	private OaLeaveReplyMapper oaLeaveReplyMapper;
-	
-	@Override
-	public OaLeaveDO get(Long lvId){
-		return oaLeaveMapper.get(lvId);
-	}
-	
-	@Override
-	public List<OaLeaveDO> list(Map<String, Object> map){
-		return oaLeaveMapper.list(map);
-	}
-	
-	@Override
-	public int count(Map<String, Object> map){
-		return oaLeaveMapper.count(map);
-	}
-	
-	@Override
-	public int save(OaLeaveDO oaLeave){
-		return oaLeaveMapper.save(oaLeave);
-	}
-	
-	@Override
-	public int update(OaLeaveDO oaLeave){
-		return oaLeaveMapper.update(oaLeave);
-	}
-	
-	@Override
-	public int remove(Long lvId){
-		return oaLeaveMapper.remove(lvId);
-	}
-	
-	@Override
-	public int batchRemove(Long[] lvIds){
-		return oaLeaveMapper.batchRemove(lvIds);
-	}
+	private WxSchoolMapper wxSchoolMapper;
 
 	/**
 	 * 请假条提交
@@ -98,8 +66,8 @@ public class OaLeaveServiceImpl implements OaLeaveService {
 				List<Long> longs = JSON.parseArray(lvNotifier, Long.class);
 				for (Long teacherId:longs) {
 					TeacherDO teacherDO = teacherMapper.get(teacherId);
-				/*	userService.wxPush(teacherDO.getOpenid(), "QC8H4hQd1Fh0wqaaE3mbAxvoBC6y-XkHctIe8Kx6gcA", "您好,您有一个来自家长的请假申请",studentMapper.selectStudentById(lvProposer).getStuName(), json.getString("startDate")+"-"+json.getString("endDate"), leave.getLvDetails(),"-", "点击查看详情", "");*/
-					//"https://tmobile.ubtob.com/
+					SchoolDO schoolDO = wxSchoolMapper.get(teacherDO.getSchoolId());
+					wxPushApi.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),teacherDO.getOpenid(), "QC8H4hQd1Fh0wqaaE3mbAxvoBC6y-XkHctIe8Kx6gcA", "您好,您有一个来自家长的请假申请",studentMapper.get(lvProposer).getStuName(), json.getString("startDate")+"-"+json.getString("endDate"), leave.getLvDetails(),"-", "点击查看详情", "");
 				}
 				return "申请成功";
 			}else {

+ 74 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxOutInRecordServiceImpl.java

@@ -0,0 +1,74 @@
+package com.usoftchina.smartschool.school.wxschool.basic.service.impl;
+
+import com.usoftchina.smartschool.school.po.ClazzDO;
+import com.usoftchina.smartschool.school.po.OutInRecordDO;
+import com.usoftchina.smartschool.school.po.StudentDO;
+import com.usoftchina.smartschool.school.wxschool.mapper.WxClazzMapper;
+import com.usoftchina.smartschool.school.wxschool.mapper.WxGradeMapper;
+import com.usoftchina.smartschool.school.wxschool.mapper.WxOutInRecordMapper;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxOutInRecordService;
+import com.usoftchina.smartschool.school.wxschool.mapper.WxStudentMapper;
+import com.usoftchina.smartschool.school.wxschool.utils.JavaBeanUtil;
+import com.usoftchina.smartschool.school.wxschool.utils.ObjectUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+@Service
+public class WxOutInRecordServiceImpl implements WxOutInRecordService {
+	@Autowired
+	private WxOutInRecordMapper outInRecordMapper;
+
+	@Autowired
+	private WxStudentMapper studentMapper;
+
+	@Autowired
+	private WxClazzMapper clazzMapper;
+
+	@Autowired
+	private WxGradeMapper gradeMapper;
+
+	/**
+	 * 获取出入校记录
+	 * @param stuId
+	 * @param pageIndex
+	 * @param pageSize
+	 * @return
+	 */
+	@Override
+	public Map<String, Object> selectRecordOutgoingListByStuId(Long stuId, Integer pageIndex, Integer pageSize) {
+		Integer pageStart = (pageIndex-1)*pageSize;
+		Map<String, Object> map = new HashMap<>();
+		List<OutInRecordDO> outInRecordDOS = outInRecordMapper.selectOutInRecordDOListByStuId(stuId, pageStart, pageSize);
+		if (ObjectUtils.isNotEmpty(outInRecordDOS)){
+			Long stuId1 = outInRecordDOS.get(0).getStuId();
+			StudentDO studentDO = studentMapper.get(stuId1);
+			Map<String, Object> map1 = JavaBeanUtil.object2Map(studentDO);
+			ClazzDO clazzDO = clazzMapper.get(studentDO.getClazzId());
+			map1.put("clazzName",clazzDO.getClazzName());
+			map1.put("gradeName",gradeMapper.get(clazzDO.getGradeId()).getGradeName());
+			map.put("student",map1);
+		}
+		map.put("outInRecordDOS",outInRecordDOS);
+		return map;
+	}
+
+	/**
+	 * 通知详情
+	 * @param recordId
+	 * @return
+	 */
+	public OutInRecordDO outgoingDetail(Long recordId) throws Exception {
+		OutInRecordDO outInRecordDO = outInRecordMapper.get(recordId);
+		if (ObjectUtils.isNotEmpty(outInRecordDO)){
+			return outInRecordDO;
+		}else {
+			throw new Exception("暂无数据");
+		}
+	}
+	
+}

+ 26 - 56
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/impl/PrincipalMailboxServiceImpl.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxPrincipalMailboxServiceImpl.java

@@ -1,77 +1,43 @@
-package com.usoftchina.smartschool.wechat.service.impl;
+package com.usoftchina.smartschool.school.wxschool.basic.service.impl;
 
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
-import com.usoftchina.smartschool.wechat.domain.ParentsDO;
-import com.usoftchina.smartschool.wechat.domain.PrincipalReplyDO;
-import com.usoftchina.smartschool.wechat.domain.TeacherDO;
-import com.usoftchina.smartschool.wechat.mapper.*;
-import com.usoftchina.smartschool.wechat.utils.JavaBeanUtil;
-import com.usoftchina.smartschool.wechat.utils.ObjectUtils;
+import com.usoftchina.smartschool.school.po.*;
+import com.usoftchina.smartschool.school.wxschool.mapper.*;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxPrincipalMailboxService;
+import com.usoftchina.smartschool.school.wxschool.utils.JavaBeanUtil;
+import com.usoftchina.smartschool.school.wxschool.utils.ObjectUtils;
+import com.usoftchina.smartschool.wechat.api.WxPushApi;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
-import com.usoftchina.smartschool.wechat.domain.PrincipalMailboxDO;
-import com.usoftchina.smartschool.wechat.service.PrincipalMailboxService;
-
-
 
 @Service
-public class PrincipalMailboxServiceImpl implements PrincipalMailboxService {
+public class WxPrincipalMailboxServiceImpl implements WxPrincipalMailboxService {
 	@Autowired
-	private PrincipalMailboxMapper principalMailboxMapper;
+	private WxPrincipalMailboxMapper principalMailboxMapper;
 
 	@Autowired
-	private PrincipalReplyMapper principalReplyMapper;
+	private WxPrincipalReplyMapper principalReplyMapper;
 
 	@Autowired
-	private TeacherMapper teacherMapper;
+	private WxTeacherMapper teacherMapper;
 
 	@Autowired
-	private ParentsMapper parentsMapper;
+	private WxParentsMapper parentsMapper;
 
 	@Autowired
-	private SchoolMapper schoolMapper;
+	private WxSchoolMapper schoolMapper;
 
-	@Override
-	public PrincipalMailboxDO get(Long mailboxId){
-		return principalMailboxMapper.get(mailboxId);
-	}
-	
-	@Override
-	public List<PrincipalMailboxDO> list(Map<String, Object> map){
-		return principalMailboxMapper.list(map);
-	}
-	
-	@Override
-	public int count(Map<String, Object> map){
-		return principalMailboxMapper.count(map);
-	}
-	
-	@Override
-	public int save(PrincipalMailboxDO principalMailbox){
-		return principalMailboxMapper.save(principalMailbox);
-	}
-	
-	@Override
-	public int update(PrincipalMailboxDO principalMailbox){
-		return principalMailboxMapper.update(principalMailbox);
-	}
-	
-	@Override
-	public int remove(Long mailboxId){
-		return principalMailboxMapper.remove(mailboxId);
-	}
-	
-	@Override
-	public int batchRemove(Long[] mailboxIds){
-		return principalMailboxMapper.batchRemove(mailboxIds);
-	}
+	@Autowired
+	private WxPushApi wxPushApi;
 
 	/**
 	 * 校长信箱创建
@@ -86,15 +52,14 @@ public class PrincipalMailboxServiceImpl implements PrincipalMailboxService {
 		principalMailboxDO.setCreateDate(new Date());
 		int save = principalMailboxMapper.save(principalMailboxDO);
 		if (save>0){
-			principalMailboxDO.getNotifier();
+			SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
+			SchoolDO schoolDO = schoolMapper.get(schoolId);
+			TeacherDO teacherDO = teacherMapper.get(principalMailboxDO.getNotifier());
+			this.wxPushApi.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),teacherDO.getOpenid(), "h0BkcnTo24b2jsficMeVO0B17GvE-VzlPvF0fVXea4w", "您有一个新的邮件通知",schoolDO.getSchoolName(),parentsMapper.get(principalMailboxDO.getMailboxCreator()).getParentsName(), simpleDateFormat.format(new Date()), principalMailboxDO.getMailboxContext(),"点击查看详情", "");
 			return principalMailboxDO.getMailboxId();
 		}else {
 			throw new Exception("提交失败,请重新提交");
 		}
-					/*SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
-					if (ObjectUtils.isNotEmpty(openid)){
-						userService.wxPush(openid, "h0BkcnTo24b2jsficMeVO0B17GvE-VzlPvF0fVXea4w", "您有一个新的邮件通知",school.getSchName(), userMapper.selectUserById(userId).getUserName(), simpleDateFormat.format(new Date()), details,"点击查看详情", "");
-					}*/
 	}
 
 	/**
@@ -188,6 +153,11 @@ public class PrincipalMailboxServiceImpl implements PrincipalMailboxService {
 	private Map<String, Object> getMailbox(PrincipalMailboxDO principalMailboxDO) throws Exception {
 		if (ObjectUtils.isNotEmpty(principalMailboxDO)){
 			Map<String, Object> map = JavaBeanUtil.object2Map(principalMailboxDO);
+			String mailboxFiles = principalMailboxDO.getMailboxFiles();
+			if (ObjectUtils.isNotEmpty(mailboxFiles)) {
+				List<String> strings = JSON.parseArray(mailboxFiles, String.class);
+				map.put("enclosure",strings);
+			}
 			ParentsDO parentsDO = parentsMapper.get(principalMailboxDO.getMailboxCreator());
 			map.put("parentsName",parentsDO.getParentsName());
 			map.put("parentsPhoto",parentsDO.getParentsPhoto());

+ 24 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxSchoolServiceImpl.java

@@ -0,0 +1,24 @@
+package com.usoftchina.smartschool.school.wxschool.basic.service.impl;
+
+import com.usoftchina.smartschool.school.po.SchoolDO;
+import com.usoftchina.smartschool.school.wxschool.mapper.WxSchoolMapper;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxSchoolService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Map;
+
+
+@Service
+public class WxSchoolServiceImpl implements WxSchoolService {
+	@Autowired
+	private WxSchoolMapper schoolMapper;
+
+	@Override
+	public List<SchoolDO> list(Map<String, Object> map){
+		return schoolMapper.list(map);
+	}
+
+	
+}

+ 12 - 12
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/impl/StuScoreServiceImpl.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxStuScoreServiceImpl.java

@@ -1,8 +1,12 @@
-package com.usoftchina.smartschool.wechat.service.impl;
+package com.usoftchina.smartschool.school.wxschool.basic.service.impl;
 
-import com.usoftchina.smartschool.wechat.domain.StudentDO;
-import com.usoftchina.smartschool.wechat.mapper.*;
-import com.usoftchina.smartschool.wechat.utils.ObjectUtils;
+import com.usoftchina.smartschool.school.wxschool.mapper.WxClazzMapper;
+import com.usoftchina.smartschool.school.wxschool.mapper.WxStuScoreMapper;
+import com.usoftchina.smartschool.school.wxschool.mapper.WxStudentMapper;
+import com.usoftchina.smartschool.school.po.StuScoreDO;
+import com.usoftchina.smartschool.school.po.StudentDO;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxStuScoreService;
+import com.usoftchina.smartschool.school.wxschool.utils.ObjectUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -12,21 +16,17 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import com.usoftchina.smartschool.wechat.domain.StuScoreDO;
-import com.usoftchina.smartschool.wechat.service.StuScoreService;
-
-
 
 @Service
-public class StuScoreServiceImpl implements StuScoreService {
+public class WxStuScoreServiceImpl implements WxStuScoreService {
 	@Autowired
-	private StuScoreMapper stuScoreMapper;
+	private WxStuScoreMapper stuScoreMapper;
 
 	@Autowired
-	private StudentMapper studentMapper;
+	private WxStudentMapper studentMapper;
 
 	@Autowired
-	private ClazzMapper clazzMapper;
+	private WxClazzMapper clazzMapper;
 
 
 	/**

+ 64 - 63
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/impl/TaskNotifyServiceImpl.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxTaskNotifyServiceImpl.java

@@ -1,89 +1,66 @@
-package com.usoftchina.smartschool.wechat.service.impl;
+package com.usoftchina.smartschool.school.wxschool.basic.service.impl;
 
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
-import com.usoftchina.smartschool.wechat.domain.*;
-import com.usoftchina.smartschool.wechat.mapper.*;
-import com.usoftchina.smartschool.wechat.utils.DateFormatUtil;
-import com.usoftchina.smartschool.wechat.utils.JavaBeanUtil;
-import com.usoftchina.smartschool.wechat.utils.ObjectUtils;
+import com.usoftchina.smartschool.school.po.*;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxTaskNotifyService;
+import com.usoftchina.smartschool.school.wxschool.mapper.*;
+import com.usoftchina.smartschool.school.wxschool.utils.DateFormatUtil;
+import com.usoftchina.smartschool.school.wxschool.utils.JavaBeanUtil;
+import com.usoftchina.smartschool.school.wxschool.utils.ObjectUtils;
+import com.usoftchina.smartschool.wechat.api.WxPushApi;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.*;
-
-import com.usoftchina.smartschool.wechat.service.TaskNotifyService;
-
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
 
 
 @Service
-public class TaskNotifyServiceImpl implements TaskNotifyService {
+public class WxTaskNotifyServiceImpl implements WxTaskNotifyService {
 	@Autowired
-	private TaskNotifyMapper taskNotifyMapper;
+	private WxTaskNotifyMapper taskNotifyMapper;
 
 	@Autowired
-	private TeacherMapper teacherMapper;
+	private WxTeacherMapper teacherMapper;
 
 	@Autowired
-	private SubjectMapper subjectMapper;
+	private WxTaskReplyMapper taskReplyMapper;
 
 	@Autowired
-	private TaskReplyMapper taskReplyMapper;
+	private WxParentsMapper parentsMapper;
 
 	@Autowired
-	private ParentsMapper parentsMapper;
+	private WxStudentMapper studentMapper;
 
 	@Autowired
-	private StudentMapper studentMapper;
-	
-	@Override
-	public TaskNotifyDO get(Long taskId){
-		return taskNotifyMapper.get(taskId);
-	}
-	
-	@Override
-	public List<TaskNotifyDO> list(Map<String, Object> map){
-		return taskNotifyMapper.list(map);
-	}
-	
-	@Override
-	public int count(Map<String, Object> map){
-		return taskNotifyMapper.count(map);
-	}
-	
-	@Override
-	public int save(TaskNotifyDO taskNotify){
-		return taskNotifyMapper.save(taskNotify);
-	}
-	
-	@Override
-	public int update(TaskNotifyDO taskNotify){
-		return taskNotifyMapper.update(taskNotify);
-	}
-	
-	@Override
-	public int remove(Long taskId){
-		return taskNotifyMapper.remove(taskId);
-	}
-	
-	@Override
-	public int batchRemove(Long[] taskIds){
-		return taskNotifyMapper.batchRemove(taskIds);
-	}
+	private WxPushApi wxPushApi;
+
+	@Autowired
+	private WxSchoolMapper wxSchoolMapper;
 
+	@Autowired
+	private WxParentsStuMapper wxParentsStuMapper;
 
 	/**
 	 * 发布作业
 	 * @param taskString
 	 * @return
 	 */
-	public int createTask(String taskString){
+	public String createTask(String taskString) throws Exception {
 		JSONObject json = JSONObject.parseObject(taskString);
 		TaskNotifyDO taskNotifyDO = new TaskNotifyDO();
-		taskNotifyDO.setTaskTitle(json.getString("taskTitle"));
-		taskNotifyDO.setTaskContext(json.getString("taskContext"));
+		String taskTitle = json.getString("taskTitle");
+		taskNotifyDO.setTaskTitle(taskTitle);
+		String taskContext = json.getString("taskContext");
+		taskNotifyDO.setTaskContext(taskContext);
 		Long taskCreator = json.getLong("taskCreator");
 		taskNotifyDO.setTaskCreator(taskCreator);
-		taskNotifyDO.setSchoolId(teacherMapper.get(taskCreator).getSchoolId());
+		Long schoolId = teacherMapper.get(taskCreator).getSchoolId();
+		taskNotifyDO.setSchoolId(schoolId);
 		taskNotifyDO.setSubjectId(json.getLong("subjectId"));
 		taskNotifyDO.setTaskFiles(json.getString("taskFiles"));
 		taskNotifyDO.setTaskStatus(json.getInteger("taskStatus"));
@@ -92,8 +69,29 @@ public class TaskNotifyServiceImpl implements TaskNotifyService {
 		taskNotifyDO.setStartDate(startDate);
 		Date endDate = DateFormatUtil.string2Date(json.getString("endDate"));
 		taskNotifyDO.setEndDate(endDate);
-		taskNotifyDO.setTaskNotifier(json.getString("taskNotifier"));
-		return taskNotifyMapper.save(taskNotifyDO);
+		String taskNotifier = json.getString("taskNotifier");
+		taskNotifyDO.setTaskNotifier(taskNotifier);
+		int save = taskNotifyMapper.save(taskNotifyDO);
+		if (save>0){
+			if (ObjectUtils.isNotEmpty(taskNotifier)){
+				SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
+				SchoolDO schoolDO = wxSchoolMapper.get(schoolId);
+				List<Long> longs = JSON.parseArray(taskNotifier, Long.class);
+				for (Long stuId:longs) {
+					List<ParentsStuDO> parentsStuDOS = wxParentsStuMapper.listByStuId(stuId);
+					if (parentsStuDOS.size()>0){
+						for (ParentsStuDO ps:parentsStuDOS) {
+							ParentsDO parentsDO = parentsMapper.get(ps.getParentId());
+							wxPushApi.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),parentsDO.getOpenid(), "WwKtiHd4lso9axuavfLdpHIVbzTiopOTyh_uCsL3ZI8",taskTitle,"-",format.format(new Date()), taskContext,"-", "点击查看详情", "");
+						}
+						}
+					}
+
+			}
+			return "作业发布成功";
+		}else {
+			throw new Exception("作业发布失败");
+		}
 	}
 
 	/**
@@ -131,6 +129,11 @@ public class TaskNotifyServiceImpl implements TaskNotifyService {
 		if (ObjectUtils.isNotEmpty(taskNotifyDOS)){
 			List<Map<String, Object>> maps = new ArrayList<>();
 			for (TaskNotifyDO tn:taskNotifyDOS) {
+				List<TaskReplyDO> taskReplyDOS = taskReplyMapper.listByTaskStu(tn.getTaskId(),stuId);
+				if (taskReplyDOS.size()>0){
+					tn.setTaskStatus(2);
+				}
+
 				Map<String, Object> map = taskDetail(tn);
 				maps.add(map);
 			}
@@ -143,9 +146,8 @@ public class TaskNotifyServiceImpl implements TaskNotifyService {
 	/**
 	 *家长端获取作业详情
 	 * @param taskId
-	 * @param stuId
 	 */
-	public Map<String, Object> taskDetailStu(Long taskId, Long stuId){
+	public Map<String, Object> taskDetail(Long taskId){
 		TaskNotifyDO taskNotifyDO = taskNotifyMapper.get(taskId);
 		return taskDetail(taskNotifyDO);
 
@@ -183,9 +185,8 @@ public class TaskNotifyServiceImpl implements TaskNotifyService {
 		map1.put("teacherName",teacherDO.getTeacherName());
 		map1.put("teacherPhoto",teacherDO.getTeacherPhoto());
 		List<TaskReplyDO> taskReplyDOS = taskReplyMapper.listByTaskId(taskNotifyDO.getTaskId());
-
+		List<Map<String, Object>> maps = new ArrayList<>();
 		if (ObjectUtils.isNotEmpty(taskReplyDOS)){
-			List<Map<String, Object>> maps = new ArrayList<>();
 			for (TaskReplyDO tr:taskReplyDOS) {
 				Map<String, Object> map = JavaBeanUtil.object2Map(tr);
 				ParentsDO parentsDO = parentsMapper.get(tr.getParentId());
@@ -195,8 +196,8 @@ public class TaskNotifyServiceImpl implements TaskNotifyService {
 				map.put("stuName",studentDO.getStuName());
 				maps.add(map);
 			}
-			map1.put("taskReplyDOs",maps);
 		}
+		map1.put("taskReplyDOs",maps);
 		return map1;
 	}
 }

+ 19 - 20
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/impl/UserServiceImpl.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxUserServiceImpl.java

@@ -1,53 +1,52 @@
-package com.usoftchina.smartschool.wechat.service.impl;
+package com.usoftchina.smartschool.school.wxschool.basic.service.impl;
 
 import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
-import com.usoftchina.smartschool.wechat.config.CodeConfig;
-import com.usoftchina.smartschool.wechat.domain.*;
-import com.usoftchina.smartschool.wechat.mapper.*;
-import com.usoftchina.smartschool.wechat.support.CodeTask;
-import com.usoftchina.smartschool.wechat.utils.*;
+import com.usoftchina.smartschool.school.po.*;
+import com.usoftchina.smartschool.school.wxschool.config.CodeConfig;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxUserService;
+import com.usoftchina.smartschool.school.wxschool.mapper.*;
+import com.usoftchina.smartschool.school.wxschool.support.CodeTask;
+import com.usoftchina.smartschool.school.wxschool.utils.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.*;
 
-import com.usoftchina.smartschool.wechat.service.UserService;
-
 
 @Service
-public class UserServiceImpl implements UserService {
+public class WxUserServiceImpl implements WxUserService {
 	@Autowired
-	private UserMapper userMapper;
+	private WxUserMapper userMapper;
 
 	@Autowired
-	private TeacherMapper teacherMapper;
+	private WxTeacherMapper teacherMapper;
 
 	@Autowired
-	private ParentsMapper parentsMapper;
+	private WxParentsMapper parentsMapper;
 
 	@Autowired
-	private SchoolMapper schoolMapper;
+	private WxSchoolMapper schoolMapper;
 
 	@Autowired
-	private TeacherClazzMapper teacherClazzMapper;
+	private WxTeacherClazzMapper teacherClazzMapper;
 
 	@Autowired
-	private ClazzAlbumMapper clazzAlbumMapper;
+	private WxClazzAlbumMapper clazzAlbumMapper;
 
 	@Autowired
-	private ClazzPictureMapper clazzPictureMapper;
+	private WxClazzPictureMapper clazzPictureMapper;
 
 	@Autowired
-	private ParentsStuMapper parentsStuMapper;
+	private WxParentsStuMapper parentsStuMapper;
 
 	@Autowired
-	private StudentMapper studentMapper;
+	private WxStudentMapper studentMapper;
 
 	@Autowired
-	private ClazzMapper clazzMapper;
+	private WxClazzMapper clazzMapper;
 
 	@Autowired
-	private GradeMapper gradeMapper;
+	private WxGradeMapper gradeMapper;
 
 	/**
 	 * 发送验证码

+ 48 - 30
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/impl/VoteServiceImpl.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxVoteServiceImpl.java

@@ -1,37 +1,50 @@
-package com.usoftchina.smartschool.wechat.service.impl;
+package com.usoftchina.smartschool.school.wxschool.basic.service.impl;
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
-import com.usoftchina.smartschool.wechat.domain.*;
-import com.usoftchina.smartschool.wechat.mapper.*;
-import com.usoftchina.smartschool.wechat.support.RemindTaskVote;
-import com.usoftchina.smartschool.wechat.utils.DateFormatUtil;
-import com.usoftchina.smartschool.wechat.utils.ObjectUtils;
+import com.usoftchina.smartschool.school.po.*;
+import com.usoftchina.smartschool.school.wxschool.basic.service.WxVoteService;
+import com.usoftchina.smartschool.school.wxschool.mapper.*;
+import com.usoftchina.smartschool.school.wxschool.support.RemindTaskVote;
+import com.usoftchina.smartschool.school.wxschool.utils.DateFormatUtil;
+import com.usoftchina.smartschool.school.wxschool.utils.ObjectUtils;
+import com.usoftchina.smartschool.wechat.api.WxPushApi;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
+import java.text.SimpleDateFormat;
 import java.util.*;
 
-import com.usoftchina.smartschool.wechat.service.VoteService;
-import org.springframework.transaction.annotation.Transactional;
-
 
 @Service
-public class VoteServiceImpl implements VoteService {
+public class WxVoteServiceImpl implements WxVoteService {
 	@Autowired
-	private VoteMapper voteMapper;
+	private WxVoteMapper voteMapper;
 
 	@Autowired
-	private VoteElectMapper voteElectMapper;
+	private WxVoteElectMapper voteElectMapper;
 
 	@Autowired
-	private VoteOptionsMapper voteOptionsMapper;
+	private WxVoteOptionsMapper voteOptionsMapper;
 
 	@Autowired
-	private VoteTopicMapper voteTopicMapper;
+	private WxVoteTopicMapper voteTopicMapper;
 
 	@Autowired
-	private TeacherMapper teacherMapper;
+	private WxTeacherMapper teacherMapper;
+
+	@Autowired
+	private WxPushApi wxPushApi;
+
+	@Autowired
+	private WxSchoolMapper wxSchoolMapper;
+
+	@Autowired
+	private WxParentsStuMapper wxParentsStuMapper;
+
+	@Autowired
+	private WxParentsMapper wxParentsMapper;
 
 
 	/** 创建投票单 */
@@ -80,24 +93,29 @@ public class VoteServiceImpl implements VoteService {
 				timer.schedule(new RemindTaskVote(voteMapper,vote.getVoteId()),DateFormatUtil.string2Date(voteEndDate));
 			}
 			List<Long> teacherId = JSON.parseArray(teacherIds, Long.class);
-			List<Long> list = removeDuplicate(teacherId);
+			if (ObjectUtils.isNotEmpty(teacherId)){
+				List<Long> list = removeDuplicate(teacherId);
+				for (Long ll:list) {
+					TeacherDO teacherDO = teacherMapper.get(ll);
+					SchoolDO schoolDO = wxSchoolMapper.get(teacherDO.getSchoolId());
+					SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+					wxPushApi.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),teacherDO.getOpenid(),"h0BkcnTo24b2jsficMeVO0B17GvE-VzlPvF0fVXea4w","有一个投票单需要您的支持",schoolDO.getSchoolName(),teacherMapper.get(creator).getTeacherName(),format.format(new Date()),vote.getVoteName(),"点击查看详情","");
+				}
+			}
 			List<Long> stuId = JSON.parseArray(stuIds, Long.class);
 			List<Long> list1 = removeDuplicate(stuId);
-			/*for (int j = 0; j <list.size() ; j++) {
-				Long teacherId = list.get(j);
-				SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
-				if (ObjectUtils.isNotEmpty(user)){
-					String userOpenid = user.getUserOpenid();
-					if (ObjectUtils.isNotEmpty(userOpenid)){
-						userService.wxPush(userOpenid,"h0BkcnTo24b2jsficMeVO0B17GvE-VzlPvF0fVXea4w","有一个投票单需要您的支持",schoolMapper.selectSchoolById(userMapper.selectUserById(votes.getLong("creator")).getSchoolId()).getSchName(),userMapper.selectUserById(votes.getLong("creator")).getUserName(),format.format(new Date()),vote.getVoteName(),"点击查看详情","https://www.akuiguoshu.com/smart-school/classRechargeDetail/"+userId+"/"+vote.getVoteId());
-					}*//*else {
-						throw new Exception("请关注智慧校园公众号");
-					}*//*
-				}else {
-					throw new Exception("用户不存在");
+			//new ArrayList<Long>();
+			for (Long l:list1) {
+				List<ParentsStuDO> parentsStuDOS = wxParentsStuMapper.listByStuId(l);
+				if (parentsStuDOS.size() > 0) {
+					for (ParentsStuDO ps : parentsStuDOS) {
+						ParentsDO parentsDO = wxParentsMapper.get(ps.getParentId());
+						SchoolDO schoolDO = wxSchoolMapper.get(parentsDO.getSchoolId());
+						SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+						wxPushApi.wxPush(schoolDO.getSchoolAppid(), schoolDO.getSchoolSecret(), parentsDO.getOpenid(), "h0BkcnTo24b2jsficMeVO0B17GvE-VzlPvF0fVXea4w", "有一个投票单需要您的支持", schoolDO.getSchoolName(), teacherMapper.get(creator).getTeacherName(), format.format(new Date()), vote.getVoteName(), "点击查看详情", "");
+					}
 				}
-
-			}*/
+			}
 			return "创建成功";
 		}else {
 			throw new Exception("创建失败");

+ 1 - 1
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/config/CodeConfig.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/config/CodeConfig.java

@@ -1,4 +1,4 @@
-package com.usoftchina.smartschool.wechat.config;
+package com.usoftchina.smartschool.school.wxschool.config;
 
 public class CodeConfig {
     private static String signName = "登录验证";

+ 1 - 1
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/config/SchoolConfig.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/config/SchoolConfig.java

@@ -1,4 +1,4 @@
-package com.usoftchina.smartschool.wechat.config;
+package com.usoftchina.smartschool.school.wxschool.config;
 
 import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.stereotype.Component;

+ 86 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/config/WXConfig.java

@@ -0,0 +1,86 @@
+package com.usoftchina.smartschool.school.wxschool.config;
+
+public class WXConfig {
+   private static String key = "F5B4E8E74FB0A9711CE1BFE45622510C";
+  
+   //private static String appID = "wx172657dad29220cc";
+   // private static String appID = "wx172657dad29220cc";
+    private static final String appID="wxbc1f8607137d3b8a";
+
+
+
+  
+   private static String mch_id = "1495003642";
+   //private static String secret = "462dc751130ccde1b6f6e35585e7b775";
+   // private static String secret = "4b0fc97b0b6f717972971297b78a7c5c";
+   private static final String  secret ="cadf13c4e21c2c122cb2341b341e5c22";
+  
+   private static String Trade_type = "JSAPI";
+   private static String body = "果蔬-测试";
+   private static String notify_url = "https://www.akuiguoshu.com/fruits/wxpay/wxPayNotify";
+   //private static String notify_url = "http://nf20718343.iask.in:32004/fruits/wxpay/wxPayNotify";
+   private static String cert_path = "D:/apiclient_cert.p12";
+  
+  public static String getCert_path() {
+     return cert_path;
+  }
+  
+  public static void setCert_path(String cert_path) {
+     cert_path = cert_path;
+  }
+  
+  public static String getNotify_url() {
+     return notify_url;
+  }
+  
+  public static void setNotify_url(String notify_url) {
+     notify_url = notify_url;
+  }
+  
+  public static String getBody() {
+     return body;
+  }
+  
+  public static void setBody(String body) {
+     body = body;
+  }
+  
+  public static String getTrade_type() {
+     return Trade_type;
+  }
+  
+  public static void setTrade_type(String trade_type) {
+     Trade_type = trade_type;
+  }
+  public static String getSecret() {
+     return secret;
+  }
+  
+  public static void setSecret(String secret) {
+     secret = secret;
+  }
+  
+  public static String getKey() {
+     return key;
+  }
+  
+  public static void setKey(String key) {
+     key = key;
+  }
+  
+  public static String getAppID() {
+     return appID;
+  }
+  
+  public static void setAppID(String appID) {
+     appID = appID;
+  }
+  
+  public static String getMch_id() {
+     return mch_id;
+  }
+  
+  public static void setMch_id(String mch_id) {
+     mch_id = mch_id;
+  }
+}

+ 3 - 2
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/config/WebConfigurer.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/config/WebConfigurer.java

@@ -1,11 +1,12 @@
-package com.usoftchina.smartschool.wechat.config;
+package com.usoftchina.smartschool.school.wxschool.config;
 
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
 
 @Component
-class WebConfigurer extends WebMvcConfigurer {
+class WebConfigurer extends WebMvcConfigurerAdapter {
     @Autowired
     SchoolConfig schoolConfig;
     @Override

+ 6 - 7
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/mapper/ClazzAlbumMapper.java → applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/mapper/WxClazzAlbumMapper.java

@@ -1,13 +1,12 @@
-package com.usoftchina.smartschool.wechat.mapper;
+package com.usoftchina.smartschool.school.wxschool.mapper;
 
-import com.usoftchina.smartschool.wechat.domain.ClazzAlbumDO;
+import com.usoftchina.smartschool.school.po.ClazzAlbumDO;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 import java.util.Map;
 
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
 /**
  * 相册; InnoDB free: 5120 kB
  * @author kl
@@ -15,7 +14,7 @@ import org.apache.ibatis.annotations.Param;
  * @date 2019-01-16 16:26:23
  */
 @Mapper
-public interface ClazzAlbumMapper {
+public interface WxClazzAlbumMapper {
 
 	ClazzAlbumDO get(Long albumId);
 	
@@ -33,6 +32,6 @@ public interface ClazzAlbumMapper {
 
 	List<ClazzAlbumDO> getListByClazzId(Long clazzId);
 
-	List<ClazzAlbumDO> listByClazzId(@Param("clazzId") Long clazzId, @Param("albumType")Integer albumType, @Param("albumStatus")Integer albumStatus, @Param("pageStart")Integer pageStart, @Param("pageSize")Integer pageSize);
+	List<ClazzAlbumDO> listByClazzId(@Param("clazzId") Long clazzId, @Param("albumType") Integer albumType, @Param("albumStatus") Integer albumStatus, @Param("pageStart") Integer pageStart, @Param("pageSize") Integer pageSize);
 
 }

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