wangwei 7 年 前
コミット
41900c9151
96 ファイル変更1337 行追加1335 行削除
  1. 0 83
      core-api/pom.xml
  2. 0 44
      core-domain/pom.xml
  3. 0 52
      core-main/pom.xml
  4. 83 0
      examcloud-core-basic-api/pom.xml
  5. 0 0
      examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/api/AppApi.java
  6. 0 0
      examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/api/CourseApi.java
  7. 0 0
      examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/api/CourseSpeciatlyApi.java
  8. 0 0
      examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/api/ExamSiteApi.java
  9. 0 0
      examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/api/FaceSetTokenApi.java
  10. 0 0
      examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/api/OrgApi.java
  11. 47 47
      examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/api/OrgConfigApi.java
  12. 67 67
      examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/api/OrgFunctionApi.java
  13. 0 0
      examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/api/PermissionApi.java
  14. 0 0
      examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/api/RolePermissionRelationApi.java
  15. 0 0
      examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/api/SpecialtyApi.java
  16. 0 0
      examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/api/StudentApi.java
  17. 0 0
      examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/api/StudentFaceInfoApi.java
  18. 285 285
      examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/api/UserApi.java
  19. 85 85
      examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/api/UserRoleApi.java
  20. 0 0
      examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/CourseService.java
  21. 0 0
      examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/CourseSpeciatlyService.java
  22. 0 0
      examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/ExamSiteService.java
  23. 0 0
      examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/FaceSetTokenService.java
  24. 48 48
      examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/OrgConfigService.java
  25. 0 0
      examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/OrgService.java
  26. 0 0
      examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/PermissionService.java
  27. 0 0
      examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/PermissionServiceImpl.java
  28. 0 0
      examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/RolePermissionRelationService.java
  29. 0 0
      examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/RolePermissionRelationServiceImpl.java
  30. 0 0
      examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/SpecialtyService.java
  31. 0 0
      examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/StudentFaceInfoService.java
  32. 0 0
      examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/StudentService.java
  33. 92 92
      examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/UserRoleService.java
  34. 0 0
      examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/UserService.java
  35. 0 0
      examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/sync/DataReceiveService.java
  36. 0 0
      examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/sync/DataSendService.java
  37. 0 0
      examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/util/ExportUtils.java
  38. 44 0
      examcloud-core-basic-domain/pom.xml
  39. 23 23
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/assemble/CourseAssembler.java
  40. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/dto/CourseDto.java
  41. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/dto/OrgDto.java
  42. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/dto/SpecialtyDto.java
  43. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/dto/UserInfo.java
  44. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/Course.java
  45. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/CourseSpeciatly.java
  46. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/ExamSite.java
  47. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/FaceSetToken.java
  48. 273 273
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/Org.java
  49. 140 140
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/OrgFunction.java
  50. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/Permission.java
  51. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/RolePermissionRelation.java
  52. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/Specialty.java
  53. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/Student.java
  54. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/StudentFaceInfo.java
  55. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/User.java
  56. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/UserLogin.java
  57. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/UserOpsLog.java
  58. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/UserRole.java
  59. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/enums/CourseLevel.java
  60. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/enums/Gender.java
  61. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/enums/LoginType.java
  62. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/enums/OrgType.java
  63. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/enums/PermissionType.java
  64. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/enums/UserScope.java
  65. 8 8
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/enums/UserType.java
  66. 11 11
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/params/OrgProperties.java
  67. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/params/UserParam.java
  68. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/BaseMemRepository.java
  69. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/CourseRepo.java
  70. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/CourseSpeciatlyRepo.java
  71. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/ExamSiteRepo.java
  72. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/FaceSetTokenRepo.java
  73. 29 29
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/OrgFunctionRepo.java
  74. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/OrgRepo.java
  75. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/PermissionRepo.java
  76. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/RolePermissionRelationRepo.java
  77. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/SpecialtyRepo.java
  78. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/StudentFaceInfoRepo.java
  79. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/StudentRepo.java
  80. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/UserLoginRepo.java
  81. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/UserOpsLogRepo.java
  82. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/UserRepo.java
  83. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/UserRoleRepo.java
  84. 0 0
      examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/memory/OrgMemRepo.java
  85. 54 0
      examcloud-core-basic-main/pom.xml
  86. 41 41
      examcloud-core-basic-main/src/main/java/cn/com/qmth/examcloud/service/core/AccessControlConfig.java
  87. 0 0
      examcloud-core-basic-main/src/main/java/cn/com/qmth/examcloud/service/core/Application.java
  88. 0 0
      examcloud-core-basic-main/src/main/java/cn/com/qmth/examcloud/service/core/Swagger2.java
  89. 0 0
      examcloud-core-basic-main/src/main/resources/application-dev.properties
  90. 0 0
      examcloud-core-basic-main/src/main/resources/application-prac.properties
  91. 0 0
      examcloud-core-basic-main/src/main/resources/application-prod.properties
  92. 0 0
      examcloud-core-basic-main/src/main/resources/application-prodvpc.properties
  93. 0 0
      examcloud-core-basic-main/src/main/resources/application-test.properties
  94. 0 0
      examcloud-core-basic-main/src/main/resources/application.properties
  95. 0 0
      examcloud-core-basic-main/src/main/resources/logback-spring.xml
  96. 7 7
      pom.xml

+ 0 - 83
core-api/pom.xml

@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>core</artifactId>
-        <groupId>cn.com.qmth.examcloud.service</groupId>
-        <version>0.1.0</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>core-api</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>cn.com.qmth.examcloud.service</groupId>
-            <artifactId>core-domain</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>cn.com.qmth.examcloud.common</groupId>
-            <artifactId>common-util</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>cn.com.qmth.examcloud.common</groupId>
-            <artifactId>common-dto</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>cn.com.qmth.examcloud.common</groupId>
-            <artifactId>common-uac</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>cn.com.qmth.examcloud.common</groupId>
-            <artifactId>common-config</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-test</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-feign</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-eureka</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-web</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-data-redis</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>io.springfox</groupId>
-            <artifactId>springfox-swagger2</artifactId>
-            <version>2.6.1</version>
-        </dependency>
-        <dependency>
-            <groupId>io.springfox</groupId>
-            <artifactId>springfox-swagger-ui</artifactId>
-            <version>2.6.1</version>
-        </dependency>
-        <dependency>
-            <groupId>commons-fileupload</groupId>
-            <artifactId>commons-fileupload</artifactId>
-            <version>1.3.2</version>
-        </dependency>
-        <dependency>
-            <groupId>com.qmth.commons</groupId>
-            <artifactId>data-sync-rabbit</artifactId>
-            <version>1.0-SNAPSHOT</version>
-        </dependency>
-    </dependencies>
-
-</project>

+ 0 - 44
core-domain/pom.xml

@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<parent>
-		<artifactId>core</artifactId>
-		<groupId>cn.com.qmth.examcloud.service</groupId>
-		<version>0.1.0</version>
-	</parent>
-	<modelVersion>4.0.0</modelVersion>
-
-	<artifactId>core-domain</artifactId>
-
-	<dependencies>
-		<dependency>
-			<groupId>mysql</groupId>
-			<artifactId>mysql-connector-java</artifactId>
-		</dependency>
-
-		<dependency>
-			<groupId>org.springframework.boot</groupId>
-			<artifactId>spring-boot-starter-data-jpa</artifactId>
-		</dependency>
-
-		<dependency>
-			<groupId>org.hibernate</groupId>
-			<artifactId>hibernate-validator</artifactId>
-		</dependency>
-
-		<dependency>
-			<groupId>cn.com.qmth.examcloud.common</groupId>
-			<artifactId>common-util</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>cn.com.qmth.examcloud.common</groupId>
-			<artifactId>common-support</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>cn.com.qmth.examcloud.common</groupId>
-			<artifactId>common-dto</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-	</dependencies>
-</project>

+ 0 - 52
core-main/pom.xml

@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>core</artifactId>
-        <groupId>cn.com.qmth.examcloud.service</groupId>
-        <version>0.1.0</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>core-main</artifactId>
-    <dependencies>
-        <dependency>
-            <groupId>cn.com.qmth.examcloud.service</groupId>
-            <artifactId>core-api</artifactId>
-            <version>0.1.0</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-test</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-autoconfigure</artifactId>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <configuration><!-- 指定该Main Class为全局的唯一入口 -->
-                    <mainClass>cn.com.qmth.examcloud.service.core.Application</mainClass>
-                    <layout>ZIP</layout>
-                    <includeSystemScope>true</includeSystemScope>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
-</project>

+ 83 - 0
examcloud-core-basic-api/pom.xml

@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>cn.com.qmth.examcloud.core.basic</groupId>
+		<artifactId>examcloud-core-basic</artifactId>
+		<version>0.1.0</version>
+	</parent>
+	<artifactId>examcloud-core-basic-api</artifactId>
+	<packaging>jar</packaging>
+
+	<dependencies>
+		<dependency>
+			<groupId>cn.com.qmth.examcloud.core.basic</groupId>
+			<artifactId>examcloud-core-basic-domain</artifactId>
+			<version>${examcloud.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>cn.com.qmth.examcloud.commons</groupId>
+			<artifactId>examcloud-commons-util</artifactId>
+			<version>${examcloud.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>cn.com.qmth.examcloud.commons</groupId>
+			<artifactId>examcloud-commons-dto</artifactId>
+			<version>${examcloud.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>cn.com.qmth.examcloud.commons</groupId>
+			<artifactId>examcloud-commons-uac</artifactId>
+			<version>${examcloud.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>cn.com.qmth.examcloud.commons</groupId>
+			<artifactId>examcloud-commons-config</artifactId>
+			<version>${examcloud.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-test</artifactId>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework.cloud</groupId>
+			<artifactId>spring-cloud-starter-feign</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework.cloud</groupId>
+			<artifactId>spring-cloud-starter-eureka</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-web</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-data-redis</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>io.springfox</groupId>
+			<artifactId>springfox-swagger2</artifactId>
+			<version>2.6.1</version>
+		</dependency>
+		<dependency>
+			<groupId>io.springfox</groupId>
+			<artifactId>springfox-swagger-ui</artifactId>
+			<version>2.6.1</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-fileupload</groupId>
+			<artifactId>commons-fileupload</artifactId>
+			<version>1.3.2</version>
+		</dependency>
+		<dependency>
+			<groupId>com.qmth.commons</groupId>
+			<artifactId>data-sync-rabbit</artifactId>
+			<version>1.0-SNAPSHOT</version>
+		</dependency>
+	</dependencies>
+
+</project>

+ 0 - 0
core-api/src/main/java/cn/com/qmth/examcloud/service/core/api/AppApi.java → examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/api/AppApi.java


+ 0 - 0
core-api/src/main/java/cn/com/qmth/examcloud/service/core/api/CourseApi.java → examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/api/CourseApi.java


+ 0 - 0
core-api/src/main/java/cn/com/qmth/examcloud/service/core/api/CourseSpeciatlyApi.java → examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/api/CourseSpeciatlyApi.java


+ 0 - 0
core-api/src/main/java/cn/com/qmth/examcloud/service/core/api/ExamSiteApi.java → examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/api/ExamSiteApi.java


+ 0 - 0
core-api/src/main/java/cn/com/qmth/examcloud/service/core/api/FaceSetTokenApi.java → examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/api/FaceSetTokenApi.java


+ 0 - 0
core-api/src/main/java/cn/com/qmth/examcloud/service/core/api/OrgApi.java → examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/api/OrgApi.java


+ 47 - 47
core-api/src/main/java/cn/com/qmth/examcloud/service/core/api/OrgConfigApi.java → examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/api/OrgConfigApi.java

@@ -1,47 +1,47 @@
-package cn.com.qmth.examcloud.service.core.api;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import cn.com.qmth.examcloud.service.core.service.OrgConfigService;
-import io.swagger.annotations.ApiOperation;
-
-/**
- * 机构配置API
- * 
- * @author wang wei
- * @date 2018年4月9日
- */
-@RestController
-@RequestMapping("${app.api.root}/orgConfig")
-public class OrgConfigApi {
-
-	@Autowired
-	private OrgConfigService orgConfigService;
-
-	@ApiOperation(value = "查询机构配置", notes = "查询")
-	@GetMapping("/{id}/{key}")
-	public ResponseEntity<?> getOrgConfig(@PathVariable Long id, @PathVariable String key) {
-
-		String value = orgConfigService.getOrgConfig(id, key);
-
-		return new ResponseEntity<>(value, HttpStatus.OK);
-	}
-
-	@ApiOperation(value = "更新机构配置", notes = "更新")
-	@PutMapping("/{id}/{key}")
-	public ResponseEntity<?> setOrgConfig(@PathVariable Long id, @PathVariable String key, @RequestBody String value) {
-
-		orgConfigService.setOrgConfig(id, key, value);
-
-		return new ResponseEntity<>("", HttpStatus.OK);
-	}
-
-}
+package cn.com.qmth.examcloud.service.core.api;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import cn.com.qmth.examcloud.service.core.service.OrgConfigService;
+import io.swagger.annotations.ApiOperation;
+
+/**
+ * 机构配置API
+ * 
+ * @author wang wei
+ * @date 2018年4月9日
+ */
+@RestController
+@RequestMapping("${app.api.root}/orgConfig")
+public class OrgConfigApi {
+
+	@Autowired
+	private OrgConfigService orgConfigService;
+
+	@ApiOperation(value = "查询机构配置", notes = "查询")
+	@GetMapping("/{id}/{key}")
+	public ResponseEntity<?> getOrgConfig(@PathVariable Long id, @PathVariable String key) {
+
+		String value = orgConfigService.getOrgConfig(id, key);
+
+		return new ResponseEntity<>(value, HttpStatus.OK);
+	}
+
+	@ApiOperation(value = "更新机构配置", notes = "更新")
+	@PutMapping("/{id}/{key}")
+	public ResponseEntity<?> setOrgConfig(@PathVariable Long id, @PathVariable String key, @RequestBody String value) {
+
+		orgConfigService.setOrgConfig(id, key, value);
+
+		return new ResponseEntity<>("", HttpStatus.OK);
+	}
+
+}

+ 67 - 67
core-api/src/main/java/cn/com/qmth/examcloud/service/core/api/OrgFunctionApi.java → examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/api/OrgFunctionApi.java

@@ -1,67 +1,67 @@
-package cn.com.qmth.examcloud.service.core.api;
-
-import java.util.List;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import cn.com.qmth.examcloud.common.support.ControllerSupport;
-import cn.com.qmth.examcloud.common.support.tree.TreeNode;
-import cn.com.qmth.examcloud.common.support.tree.TreeUtil;
-import cn.com.qmth.examcloud.common.support.tree.ZtreeNode;
-import cn.com.qmth.examcloud.service.core.entity.OrgFunction;
-import cn.com.qmth.examcloud.service.core.repo.OrgFunctionRepo;
-import io.swagger.annotations.ApiOperation;
-
-/**
- * 机构功能API
- * 
- * @author wang wei
- * @date 2018年4月9日
- */
-@RestController
-@RequestMapping("${app.api.root}/orgFunction")
-public class OrgFunctionApi extends ControllerSupport {
-
-	@Autowired
-	OrgFunctionRepo orgFunctionRepo;
-
-	@ApiOperation(value = "查询所有功能", notes = "查询")
-	@GetMapping("/getAllFunctions")
-	public ResponseEntity<?> getAllFunctions() {
-		List<OrgFunction> allFuncs = orgFunctionRepo.findAll();
-
-		List<TreeNode> zTreeData = TreeUtil.convert(allFuncs, ZtreeNode.class);
-		return new ResponseEntity<>(zTreeData, HttpStatus.OK);
-	}
-
-	@ApiOperation(value = "查询机构功能", notes = "查询")
-	@GetMapping("/{id}")
-	public ResponseEntity<?> getOrgFunctions(@PathVariable Long id) {
-		log.debug("getOrgFunctions(). id=" + id);
-		List<OrgFunction> orgFunctions = orgFunctionRepo.getOrgFunctions(id);
-		return new ResponseEntity<>(orgFunctions, HttpStatus.OK);
-	}
-
-	@ApiOperation(value = "修改机构功能", notes = "修改")
-	@PutMapping("/{id}")
-	public ResponseEntity<?> setOrgFunctions(@PathVariable Long id, @RequestBody String[] funcIds) {
-		log.debug("setOrgFunctions(). id=" + id);
-		try {
-			orgFunctionRepo.deleteAllOrgFunctions(id);
-			for (String funcId : funcIds) {
-				orgFunctionRepo.addOrgFunction(id, Long.parseLong(funcId));
-			}
-			return new ResponseEntity<>("", HttpStatus.CREATED);
-		} catch (Exception e) {
-			return new ResponseEntity<>("", HttpStatus.INTERNAL_SERVER_ERROR);
-		}
-	}
-}
+package cn.com.qmth.examcloud.service.core.api;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import cn.com.qmth.examcloud.common.support.ControllerSupport;
+import cn.com.qmth.examcloud.common.support.tree.TreeNode;
+import cn.com.qmth.examcloud.common.support.tree.TreeUtil;
+import cn.com.qmth.examcloud.common.support.tree.ZtreeNode;
+import cn.com.qmth.examcloud.service.core.entity.OrgFunction;
+import cn.com.qmth.examcloud.service.core.repo.OrgFunctionRepo;
+import io.swagger.annotations.ApiOperation;
+
+/**
+ * 机构功能API
+ * 
+ * @author wang wei
+ * @date 2018年4月9日
+ */
+@RestController
+@RequestMapping("${app.api.root}/orgFunction")
+public class OrgFunctionApi extends ControllerSupport {
+
+	@Autowired
+	OrgFunctionRepo orgFunctionRepo;
+
+	@ApiOperation(value = "查询所有功能", notes = "查询")
+	@GetMapping("/getAllFunctions")
+	public ResponseEntity<?> getAllFunctions() {
+		List<OrgFunction> allFuncs = orgFunctionRepo.findAll();
+
+		List<TreeNode> zTreeData = TreeUtil.convert(allFuncs, ZtreeNode.class);
+		return new ResponseEntity<>(zTreeData, HttpStatus.OK);
+	}
+
+	@ApiOperation(value = "查询机构功能", notes = "查询")
+	@GetMapping("/{id}")
+	public ResponseEntity<?> getOrgFunctions(@PathVariable Long id) {
+		log.debug("getOrgFunctions(). id=" + id);
+		List<OrgFunction> orgFunctions = orgFunctionRepo.getOrgFunctions(id);
+		return new ResponseEntity<>(orgFunctions, HttpStatus.OK);
+	}
+
+	@ApiOperation(value = "修改机构功能", notes = "修改")
+	@PutMapping("/{id}")
+	public ResponseEntity<?> setOrgFunctions(@PathVariable Long id, @RequestBody String[] funcIds) {
+		log.debug("setOrgFunctions(). id=" + id);
+		try {
+			orgFunctionRepo.deleteAllOrgFunctions(id);
+			for (String funcId : funcIds) {
+				orgFunctionRepo.addOrgFunction(id, Long.parseLong(funcId));
+			}
+			return new ResponseEntity<>("", HttpStatus.CREATED);
+		} catch (Exception e) {
+			return new ResponseEntity<>("", HttpStatus.INTERNAL_SERVER_ERROR);
+		}
+	}
+}

+ 0 - 0
core-api/src/main/java/cn/com/qmth/examcloud/service/core/api/PermissionApi.java → examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/api/PermissionApi.java


+ 0 - 0
core-api/src/main/java/cn/com/qmth/examcloud/service/core/api/RolePermissionRelationApi.java → examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/api/RolePermissionRelationApi.java


+ 0 - 0
core-api/src/main/java/cn/com/qmth/examcloud/service/core/api/SpecialtyApi.java → examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/api/SpecialtyApi.java


+ 0 - 0
core-api/src/main/java/cn/com/qmth/examcloud/service/core/api/StudentApi.java → examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/api/StudentApi.java


+ 0 - 0
core-api/src/main/java/cn/com/qmth/examcloud/service/core/api/StudentFaceInfoApi.java → examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/api/StudentFaceInfoApi.java


+ 285 - 285
core-api/src/main/java/cn/com/qmth/examcloud/service/core/api/UserApi.java → examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/api/UserApi.java

@@ -1,285 +1,285 @@
-package cn.com.qmth.examcloud.service.core.api;
-
-import io.swagger.annotations.ApiOperation;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.commons.lang.StringEscapeUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.domain.PageImpl;
-import org.springframework.data.domain.PageRequest;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.util.StringUtils;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.ModelAttribute;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-import cn.com.qmth.examcloud.common.uac.annotation.Uac;
-import cn.com.qmth.examcloud.common.uac.entity.AccessUser;
-import cn.com.qmth.examcloud.common.uac.enums.RoleMeta;
-import cn.com.qmth.examcloud.common.uac.enums.UacPolicy;
-import cn.com.qmth.examcloud.common.util.ErrorMsg;
-import cn.com.qmth.examcloud.service.core.dto.UserInfo;
-import cn.com.qmth.examcloud.service.core.entity.User;
-import cn.com.qmth.examcloud.service.core.enums.UserType;
-import cn.com.qmth.examcloud.service.core.repo.UserRepo;
-import cn.com.qmth.examcloud.service.core.service.UserService;
-
-/**
- * 用户服务API
- * Created by songyue on 17/1/13.
- */
-@RestController
-@RequestMapping("${app.api.root}/user")
-public class UserApi {
-
-    @Autowired
-    UserService userService;
-
-    @Autowired
-    UserRepo userRepo;
-
-
-    @ApiOperation(value = "查询所有用户", notes = "分页带查询")
-    @GetMapping("/all/{curPage}/{pageSize}")
-    public ResponseEntity getAllUser(@ModelAttribute User userCriteria,
-                                     @PathVariable Integer curPage,
-                                     @PathVariable Integer pageSize,
-                                     HttpServletRequest request) {
-        AccessUser accessUser = (AccessUser) request.getAttribute("accessUser");
-        if (accessUser != null) {
-            if (accessUser.getRootOrgId() == 0) {
-                return new ResponseEntity(userService.findOrgUser(userCriteria,
-                        new PageRequest(curPage - 1, pageSize)), HttpStatus.OK);
-            } else {
-                userCriteria.setRootOrgId(accessUser.getRootOrgId());
-            }
-        } else {
-            return new ResponseEntity(HttpStatus.NOT_FOUND);
-        }
-        return new ResponseEntity(userService.findAll(userCriteria,
-                new PageRequest(curPage - 1, pageSize)), HttpStatus.OK);
-    }
-
-    @ApiOperation(value = "按id查询用户", notes = "id查询")
-    @GetMapping("/{id}")
-    public ResponseEntity getUserById(@PathVariable long id) {
-        return new ResponseEntity(userRepo.findOne(id), HttpStatus.OK);
-    }
-
-    @ApiOperation(value = "按orgId查询用户", notes = "机构id查询机构用户")
-    @GetMapping("/org/{orgId}")
-    public ResponseEntity getUserByOrgId(@PathVariable long orgId) {
-        List<User> userList = userRepo.findByOrgIdAndType(orgId, UserType.NOT_STUDENT.name());
-        return new ResponseEntity(userList, HttpStatus.OK);
-    }
-
-    @ApiOperation(value = "按rootOrgId查询用户", notes = "根机构id查询机构用户")
-    @GetMapping("/rootOrg/{rootOrgId}")
-    public ResponseEntity getUserByRootOrgId(@PathVariable long rootOrgId) {
-        List<User> userList = userRepo.findByRootOrgIdAndType(rootOrgId, UserType.NOT_STUDENT.name());
-        return new ResponseEntity(userList, HttpStatus.OK);
-    }
-
-    @ApiOperation(value = "新增用户", notes = "新增")
-    @PostMapping
-    public ResponseEntity addUser(@RequestBody User user, HttpServletRequest request) {
-        AccessUser accessUser = (AccessUser) request.getAttribute("accessUser");
-        if (accessUser != null) {
-            if (accessUser.getRootOrgId() != 0) {
-                user.setRootOrgId(accessUser.getRootOrgId());
-            } else {
-                user.setRootOrgId(user.getOrgId());
-            }
-        } else {
-            return new ResponseEntity(HttpStatus.NOT_FOUND);
-        }
-        try {
-            return new ResponseEntity(userService.save(user), HttpStatus.CREATED);
-        } catch (Exception e) {
-            return new ResponseEntity(new ErrorMsg(e.getMessage()), HttpStatus.INTERNAL_SERVER_ERROR);
-        }
-    }
-
-    @ApiOperation(value = "更新用户", notes = "更新")
-    @PutMapping
-    public ResponseEntity updateUser(@RequestBody User user, HttpServletRequest request) {
-        AccessUser accessUser = (AccessUser) request.getAttribute("accessUser");
-        if (accessUser != null) {
-            if (accessUser.getRootOrgId() != 0) {
-                user.setRootOrgId(accessUser.getRootOrgId());
-            } else {
-                user.setRootOrgId(user.getOrgId());
-            }
-        } else {
-            return new ResponseEntity(HttpStatus.NOT_FOUND);
-        }
-        try {
-            return new ResponseEntity(userService.update(user.getId(), user), HttpStatus.OK);
-        } catch (Exception e) {
-            return new ResponseEntity(new ErrorMsg(e.getMessage()), HttpStatus.INTERNAL_SERVER_ERROR);
-        }
-    }
-
-    @ApiOperation(value = "重置用户密码", notes = "重置密码")
-    @PutMapping("/resetPass/{id}")
-    public ResponseEntity resetPass(@PathVariable String id) {
-        List<Long> ids = Stream.of(id.split(",")).map(s -> Long.parseLong(s.trim()))
-                .collect(Collectors.toList());
-        for (Long userId : ids) {
-            userService.initPassword(userId);
-        }
-        return new ResponseEntity(HttpStatus.OK);
-    }
-
-    @ApiOperation(value = "启用用户", notes = "启用用户")
-    @PutMapping("/enable/{ids}")
-    public ResponseEntity enableUser(@PathVariable String ids) {
-        List<Long> userIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
-                .collect(Collectors.toList());
-        for (Long userId : userIds) {
-            User user = userRepo.findOne(userId);
-            user.setEnable(true);
-            user.setUpdateTime(new Date());
-            userRepo.save(user);
-        }
-        return new ResponseEntity(HttpStatus.OK);
-    }
-
-    @ApiOperation(value = "禁用用户", notes = "禁用用户")
-    @PutMapping("/disable/{ids}")
-    public ResponseEntity disableUser(@PathVariable String ids) {
-        List<Long> userIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
-                .collect(Collectors.toList());
-        for (Long userId : userIds) {
-            User user = userRepo.findOne(userId);
-            user.setEnable(false);
-            user.setUpdateTime(new Date());
-            userRepo.save(user);
-        }
-        return new ResponseEntity(HttpStatus.OK);
-    }
-
-    @ApiOperation(value = "修改用户密码", notes = "修改密码")
-    @PutMapping("/password")
-    public ResponseEntity updatePass(@RequestParam long userId, @RequestParam String password) {
-        String realPassword = StringEscapeUtils.unescapeJavaScript(password);
-        userRepo.updatePasswordById(userId, realPassword);
-        return new ResponseEntity(HttpStatus.OK);
-    }
-
-    @ApiOperation(value = "修改用户密码", notes = "修改密码")
-    @PutMapping("/stu-password")
-    @Uac(roles = {RoleMeta.STUDENT}, policy = UacPolicy.IN)
-    public ResponseEntity stuPassword(@RequestParam("oldPassword") String oldPassword,
-                                      @RequestParam("newPassword") String newPassword,
-                                      HttpServletRequest request) {
-        AccessUser accessUser = (AccessUser) request.getAttribute("accessUser");
-        if (StringUtils.isEmpty(oldPassword) || StringUtils.isEmpty(newPassword)) {
-            return new ResponseEntity(new ErrorMsg("原密码不正确"), HttpStatus.BAD_REQUEST);
-        } else {
-            Long userId = accessUser.getUserId();
-            User user = userRepo.findOne(userId);
-            if (!oldPassword.equals(user.getPassword())) {
-                return new ResponseEntity(new ErrorMsg("原密码不正确"), HttpStatus.BAD_REQUEST);
-            }
-            userRepo.updatePasswordById(userId, newPassword);
-            return new ResponseEntity(HttpStatus.OK);
-        }
-    }
-
-    @ApiOperation(value = "按id删除用户", notes = "删除")
-    @DeleteMapping("/{ids}")
-    @Uac(roles = {RoleMeta.SUPER_ADMIN}, policy = UacPolicy.IN)
-    public ResponseEntity deleteUser(@PathVariable String ids) {
-        List<Long> userIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
-                .collect(Collectors.toList());
-        for (Long userId : userIds) {
-            userRepo.delete(userId);
-        }
-        return new ResponseEntity(HttpStatus.OK);
-    }
-
-    @ApiOperation(value = "一般登录", notes = "登录")
-    @PostMapping("/login")
-    public ResponseEntity login(@RequestParam String loginName,
-                                @RequestParam String password) {
-        try {
-            UserInfo userInfo = userService.login(loginName, password);
-            return new ResponseEntity(userInfo, HttpStatus.OK);
-        } catch (Exception e) {
-            return new ResponseEntity(new ErrorMsg(e.getMessage()), HttpStatus.INTERNAL_SERVER_ERROR);
-        }
-    }
-
-    @ApiOperation(value = "二级登录", notes = "二级登录")
-    @PostMapping("/login/{orgId}")
-    public ResponseEntity login(@PathVariable long orgId,
-                                @RequestParam String loginName,
-                                @RequestParam String password) {
-        try {
-            UserInfo userInfo = userService.login(orgId, loginName, password);
-            return new ResponseEntity(userInfo, HttpStatus.OK);
-        } catch (Exception e) {
-            return new ResponseEntity(new ErrorMsg(e.getMessage()), HttpStatus.INTERNAL_SERVER_ERROR);
-        }
-    }
-
-    @ApiOperation(value = "登出", notes = "登出")
-    @PostMapping("/logout")
-    public ResponseEntity logout(HttpServletRequest request) {
-        AccessUser accessUser = (AccessUser) request.getAttribute("accessUser");
-        userService.logout(accessUser);
-        return new ResponseEntity(HttpStatus.OK);
-    }
-
-    @ApiOperation(value = "查询评卷员", notes = "查询")
-    @GetMapping("/marker")
-    public ResponseEntity getMarker(HttpServletRequest request) {
-        AccessUser accessUser = (AccessUser) request.getAttribute("accessUser");
-        return new ResponseEntity(userService.getMarker(accessUser.getRootOrgId()), HttpStatus.OK);
-    }
-    
-    @ApiOperation(value = "新增评卷员", notes = "新增")
-    @PostMapping("/marker")
-    public ResponseEntity saveMarker(@RequestParam String loginName,@RequestParam String name,HttpServletRequest request) {
-        AccessUser accessUser = (AccessUser) request.getAttribute("accessUser");
-        return new ResponseEntity(userService.saveMarker(accessUser.getRootOrgId(),loginName,name), HttpStatus.OK);
-    }
-
-    @ApiOperation(value="查询评卷员带分页",notes="查询评卷员带分页")
-    @GetMapping("/all/marker/{curPage}/{pageSize}")
-    public ResponseEntity getAllMark(@ModelAttribute User user,
-    								 @PathVariable Integer curPage,
-    								 @PathVariable Integer pageSize,
-    								 HttpServletRequest request){
-    	AccessUser accessUser = (AccessUser)request.getAttribute("accessUser");
-    	if(accessUser != null){
-    		user.setRootOrgId(accessUser.getRootOrgId());
-    		return new ResponseEntity(userService.getAllMaker(user,new PageRequest(curPage-1, pageSize)),HttpStatus.OK);
-    	}else{
-    	    return new ResponseEntity(new PageImpl<User>(new ArrayList<User>()),HttpStatus.OK);
-        }
-    }
-
-    @ApiOperation(value="查询印刷项目经理",notes="查询印刷项目经理")
-    @GetMapping("/allPrintPm")
-    public ResponseEntity getAllPrintPm(){
-        return new ResponseEntity(userRepo.findPrintPm(),HttpStatus.OK);
-    }
-}
+package cn.com.qmth.examcloud.service.core.api;
+
+import io.swagger.annotations.ApiOperation;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.commons.lang.StringEscapeUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.PageImpl;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import cn.com.qmth.examcloud.common.uac.annotation.Uac;
+import cn.com.qmth.examcloud.common.uac.entity.AccessUser;
+import cn.com.qmth.examcloud.common.uac.enums.RoleMeta;
+import cn.com.qmth.examcloud.common.uac.enums.UacPolicy;
+import cn.com.qmth.examcloud.common.util.ErrorMsg;
+import cn.com.qmth.examcloud.service.core.dto.UserInfo;
+import cn.com.qmth.examcloud.service.core.entity.User;
+import cn.com.qmth.examcloud.service.core.enums.UserType;
+import cn.com.qmth.examcloud.service.core.repo.UserRepo;
+import cn.com.qmth.examcloud.service.core.service.UserService;
+
+/**
+ * 用户服务API
+ * Created by songyue on 17/1/13.
+ */
+@RestController
+@RequestMapping("${app.api.root}/user")
+public class UserApi {
+
+    @Autowired
+    UserService userService;
+
+    @Autowired
+    UserRepo userRepo;
+
+
+    @ApiOperation(value = "查询所有用户", notes = "分页带查询")
+    @GetMapping("/all/{curPage}/{pageSize}")
+    public ResponseEntity getAllUser(@ModelAttribute User userCriteria,
+                                     @PathVariable Integer curPage,
+                                     @PathVariable Integer pageSize,
+                                     HttpServletRequest request) {
+        AccessUser accessUser = (AccessUser) request.getAttribute("accessUser");
+        if (accessUser != null) {
+            if (accessUser.getRootOrgId() == 0) {
+                return new ResponseEntity(userService.findOrgUser(userCriteria,
+                        new PageRequest(curPage - 1, pageSize)), HttpStatus.OK);
+            } else {
+                userCriteria.setRootOrgId(accessUser.getRootOrgId());
+            }
+        } else {
+            return new ResponseEntity(HttpStatus.NOT_FOUND);
+        }
+        return new ResponseEntity(userService.findAll(userCriteria,
+                new PageRequest(curPage - 1, pageSize)), HttpStatus.OK);
+    }
+
+    @ApiOperation(value = "按id查询用户", notes = "id查询")
+    @GetMapping("/{id}")
+    public ResponseEntity getUserById(@PathVariable long id) {
+        return new ResponseEntity(userRepo.findOne(id), HttpStatus.OK);
+    }
+
+    @ApiOperation(value = "按orgId查询用户", notes = "机构id查询机构用户")
+    @GetMapping("/org/{orgId}")
+    public ResponseEntity getUserByOrgId(@PathVariable long orgId) {
+        List<User> userList = userRepo.findByOrgIdAndType(orgId, UserType.NOT_STUDENT.name());
+        return new ResponseEntity(userList, HttpStatus.OK);
+    }
+
+    @ApiOperation(value = "按rootOrgId查询用户", notes = "根机构id查询机构用户")
+    @GetMapping("/rootOrg/{rootOrgId}")
+    public ResponseEntity getUserByRootOrgId(@PathVariable long rootOrgId) {
+        List<User> userList = userRepo.findByRootOrgIdAndType(rootOrgId, UserType.NOT_STUDENT.name());
+        return new ResponseEntity(userList, HttpStatus.OK);
+    }
+
+    @ApiOperation(value = "新增用户", notes = "新增")
+    @PostMapping
+    public ResponseEntity addUser(@RequestBody User user, HttpServletRequest request) {
+        AccessUser accessUser = (AccessUser) request.getAttribute("accessUser");
+        if (accessUser != null) {
+            if (accessUser.getRootOrgId() != 0) {
+                user.setRootOrgId(accessUser.getRootOrgId());
+            } else {
+                user.setRootOrgId(user.getOrgId());
+            }
+        } else {
+            return new ResponseEntity(HttpStatus.NOT_FOUND);
+        }
+        try {
+            return new ResponseEntity(userService.save(user), HttpStatus.CREATED);
+        } catch (Exception e) {
+            return new ResponseEntity(new ErrorMsg(e.getMessage()), HttpStatus.INTERNAL_SERVER_ERROR);
+        }
+    }
+
+    @ApiOperation(value = "更新用户", notes = "更新")
+    @PutMapping
+    public ResponseEntity updateUser(@RequestBody User user, HttpServletRequest request) {
+        AccessUser accessUser = (AccessUser) request.getAttribute("accessUser");
+        if (accessUser != null) {
+            if (accessUser.getRootOrgId() != 0) {
+                user.setRootOrgId(accessUser.getRootOrgId());
+            } else {
+                user.setRootOrgId(user.getOrgId());
+            }
+        } else {
+            return new ResponseEntity(HttpStatus.NOT_FOUND);
+        }
+        try {
+            return new ResponseEntity(userService.update(user.getId(), user), HttpStatus.OK);
+        } catch (Exception e) {
+            return new ResponseEntity(new ErrorMsg(e.getMessage()), HttpStatus.INTERNAL_SERVER_ERROR);
+        }
+    }
+
+    @ApiOperation(value = "重置用户密码", notes = "重置密码")
+    @PutMapping("/resetPass/{id}")
+    public ResponseEntity resetPass(@PathVariable String id) {
+        List<Long> ids = Stream.of(id.split(",")).map(s -> Long.parseLong(s.trim()))
+                .collect(Collectors.toList());
+        for (Long userId : ids) {
+            userService.initPassword(userId);
+        }
+        return new ResponseEntity(HttpStatus.OK);
+    }
+
+    @ApiOperation(value = "启用用户", notes = "启用用户")
+    @PutMapping("/enable/{ids}")
+    public ResponseEntity enableUser(@PathVariable String ids) {
+        List<Long> userIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
+                .collect(Collectors.toList());
+        for (Long userId : userIds) {
+            User user = userRepo.findOne(userId);
+            user.setEnable(true);
+            user.setUpdateTime(new Date());
+            userRepo.save(user);
+        }
+        return new ResponseEntity(HttpStatus.OK);
+    }
+
+    @ApiOperation(value = "禁用用户", notes = "禁用用户")
+    @PutMapping("/disable/{ids}")
+    public ResponseEntity disableUser(@PathVariable String ids) {
+        List<Long> userIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
+                .collect(Collectors.toList());
+        for (Long userId : userIds) {
+            User user = userRepo.findOne(userId);
+            user.setEnable(false);
+            user.setUpdateTime(new Date());
+            userRepo.save(user);
+        }
+        return new ResponseEntity(HttpStatus.OK);
+    }
+
+    @ApiOperation(value = "修改用户密码", notes = "修改密码")
+    @PutMapping("/password")
+    public ResponseEntity updatePass(@RequestParam long userId, @RequestParam String password) {
+        String realPassword = StringEscapeUtils.unescapeJavaScript(password);
+        userRepo.updatePasswordById(userId, realPassword);
+        return new ResponseEntity(HttpStatus.OK);
+    }
+
+    @ApiOperation(value = "修改用户密码", notes = "修改密码")
+    @PutMapping("/stu-password")
+    @Uac(roles = {RoleMeta.STUDENT}, policy = UacPolicy.IN)
+    public ResponseEntity stuPassword(@RequestParam("oldPassword") String oldPassword,
+                                      @RequestParam("newPassword") String newPassword,
+                                      HttpServletRequest request) {
+        AccessUser accessUser = (AccessUser) request.getAttribute("accessUser");
+        if (StringUtils.isEmpty(oldPassword) || StringUtils.isEmpty(newPassword)) {
+            return new ResponseEntity(new ErrorMsg("原密码不正确"), HttpStatus.BAD_REQUEST);
+        } else {
+            Long userId = accessUser.getUserId();
+            User user = userRepo.findOne(userId);
+            if (!oldPassword.equals(user.getPassword())) {
+                return new ResponseEntity(new ErrorMsg("原密码不正确"), HttpStatus.BAD_REQUEST);
+            }
+            userRepo.updatePasswordById(userId, newPassword);
+            return new ResponseEntity(HttpStatus.OK);
+        }
+    }
+
+    @ApiOperation(value = "按id删除用户", notes = "删除")
+    @DeleteMapping("/{ids}")
+    @Uac(roles = {RoleMeta.SUPER_ADMIN}, policy = UacPolicy.IN)
+    public ResponseEntity deleteUser(@PathVariable String ids) {
+        List<Long> userIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
+                .collect(Collectors.toList());
+        for (Long userId : userIds) {
+            userRepo.delete(userId);
+        }
+        return new ResponseEntity(HttpStatus.OK);
+    }
+
+    @ApiOperation(value = "一般登录", notes = "登录")
+    @PostMapping("/login")
+    public ResponseEntity login(@RequestParam String loginName,
+                                @RequestParam String password) {
+        try {
+            UserInfo userInfo = userService.login(loginName, password);
+            return new ResponseEntity(userInfo, HttpStatus.OK);
+        } catch (Exception e) {
+            return new ResponseEntity(new ErrorMsg(e.getMessage()), HttpStatus.INTERNAL_SERVER_ERROR);
+        }
+    }
+
+    @ApiOperation(value = "二级登录", notes = "二级登录")
+    @PostMapping("/login/{orgId}")
+    public ResponseEntity login(@PathVariable long orgId,
+                                @RequestParam String loginName,
+                                @RequestParam String password) {
+        try {
+            UserInfo userInfo = userService.login(orgId, loginName, password);
+            return new ResponseEntity(userInfo, HttpStatus.OK);
+        } catch (Exception e) {
+            return new ResponseEntity(new ErrorMsg(e.getMessage()), HttpStatus.INTERNAL_SERVER_ERROR);
+        }
+    }
+
+    @ApiOperation(value = "登出", notes = "登出")
+    @PostMapping("/logout")
+    public ResponseEntity logout(HttpServletRequest request) {
+        AccessUser accessUser = (AccessUser) request.getAttribute("accessUser");
+        userService.logout(accessUser);
+        return new ResponseEntity(HttpStatus.OK);
+    }
+
+    @ApiOperation(value = "查询评卷员", notes = "查询")
+    @GetMapping("/marker")
+    public ResponseEntity getMarker(HttpServletRequest request) {
+        AccessUser accessUser = (AccessUser) request.getAttribute("accessUser");
+        return new ResponseEntity(userService.getMarker(accessUser.getRootOrgId()), HttpStatus.OK);
+    }
+    
+    @ApiOperation(value = "新增评卷员", notes = "新增")
+    @PostMapping("/marker")
+    public ResponseEntity saveMarker(@RequestParam String loginName,@RequestParam String name,HttpServletRequest request) {
+        AccessUser accessUser = (AccessUser) request.getAttribute("accessUser");
+        return new ResponseEntity(userService.saveMarker(accessUser.getRootOrgId(),loginName,name), HttpStatus.OK);
+    }
+
+    @ApiOperation(value="查询评卷员带分页",notes="查询评卷员带分页")
+    @GetMapping("/all/marker/{curPage}/{pageSize}")
+    public ResponseEntity getAllMark(@ModelAttribute User user,
+    								 @PathVariable Integer curPage,
+    								 @PathVariable Integer pageSize,
+    								 HttpServletRequest request){
+    	AccessUser accessUser = (AccessUser)request.getAttribute("accessUser");
+    	if(accessUser != null){
+    		user.setRootOrgId(accessUser.getRootOrgId());
+    		return new ResponseEntity(userService.getAllMaker(user,new PageRequest(curPage-1, pageSize)),HttpStatus.OK);
+    	}else{
+    	    return new ResponseEntity(new PageImpl<User>(new ArrayList<User>()),HttpStatus.OK);
+        }
+    }
+
+    @ApiOperation(value="查询印刷项目经理",notes="查询印刷项目经理")
+    @GetMapping("/allPrintPm")
+    public ResponseEntity getAllPrintPm(){
+        return new ResponseEntity(userRepo.findPrintPm(),HttpStatus.OK);
+    }
+}

+ 85 - 85
core-api/src/main/java/cn/com/qmth/examcloud/service/core/api/UserRoleApi.java → examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/api/UserRoleApi.java

@@ -1,85 +1,85 @@
-package cn.com.qmth.examcloud.service.core.api;
-
-import cn.com.qmth.examcloud.service.core.entity.User;
-import cn.com.qmth.examcloud.service.core.entity.UserRole;
-import cn.com.qmth.examcloud.service.core.repo.UserRepo;
-import cn.com.qmth.examcloud.service.core.repo.UserRoleRepo;
-import cn.com.qmth.examcloud.service.core.service.UserRoleService;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.*;
-
-/**
- * 用户角色服务API
- * Created by songyue on 17/1/13.
- */
-@RestController
-@RequestMapping("${app.api.root}/userRole")
-public class UserRoleApi {
-
-    @Autowired
-    UserRoleService userRoleService;
-
-    @Autowired
-    UserRoleRepo userRoleRepo;
-
-    @Autowired
-    UserRepo userRepo;
-
-    @ApiOperation(value="获取全部角色",notes="获取全部角色")
-    @GetMapping("/all")
-    public ResponseEntity getAllRoles(){
-        return new ResponseEntity(userRoleService.findAllRoles(), HttpStatus.OK);
-    }
-
-    @ApiOperation(value="获取评卷角色",notes="获取评卷角色")
-    @GetMapping("/marker")
-    public ResponseEntity getMarkerRoles(){
-        return new ResponseEntity(userRoleService.findMarkerRoles(), HttpStatus.OK);
-    }
-
-    @ApiOperation(value="获取非评卷角色",notes="获取非评卷角色")
-    @GetMapping("/nonMarker")
-    public ResponseEntity getNonMarkerRoles(){
-        return new ResponseEntity(userRoleService.findNonMarkerRoles(), HttpStatus.OK);
-    }
-
-    @ApiOperation(value="获取管理员角色",notes="获取管理员角色")
-    @GetMapping("/admin")
-    public ResponseEntity getAdminRoles(){
-        return new ResponseEntity(userRoleService.findAdminRoles(), HttpStatus.OK);
-    }
-
-    @ApiOperation(value="新增用户角色",notes="新增角色")
-    @PostMapping
-    public ResponseEntity addUserRole(@RequestBody UserRole userRole){
-        return new ResponseEntity(userRoleRepo.save(userRole), HttpStatus.CREATED);
-    }
-
-    @ApiOperation(value="更新用户角色",notes="更新角色")
-    @PutMapping
-    public ResponseEntity updateUserRole(@RequestBody UserRole userRole){
-        return new ResponseEntity(userRoleRepo.save(userRole), HttpStatus.OK);
-    }
-
-    @ApiOperation(value="按id删除用户",notes="删除")
-    @DeleteMapping("/{id}")
-    public ResponseEntity deleteUserRole(@PathVariable Long id){
-        userRoleRepo.delete(id);
-        return new ResponseEntity(HttpStatus.OK);
-    }
-    
-    @ApiOperation(value="获取印刷阅卷角色",notes="获取印刷阅卷角色")
-    @GetMapping("/qmther")
-    public ResponseEntity getPrinterRoles(){
-        return new ResponseEntity(userRoleService.findQmthRoles(), HttpStatus.OK);
-    }
-    
-    @ApiOperation(value="获取学校机构角色",notes="获取学校机构角色")
-    @GetMapping("/school")
-    public ResponseEntity<Object> getSchoolRoles(){
-    	return new ResponseEntity<Object>(userRoleService.findSchoolRoles(),HttpStatus.OK);
-    }
-}
+package cn.com.qmth.examcloud.service.core.api;
+
+import cn.com.qmth.examcloud.service.core.entity.User;
+import cn.com.qmth.examcloud.service.core.entity.UserRole;
+import cn.com.qmth.examcloud.service.core.repo.UserRepo;
+import cn.com.qmth.examcloud.service.core.repo.UserRoleRepo;
+import cn.com.qmth.examcloud.service.core.service.UserRoleService;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 用户角色服务API
+ * Created by songyue on 17/1/13.
+ */
+@RestController
+@RequestMapping("${app.api.root}/userRole")
+public class UserRoleApi {
+
+    @Autowired
+    UserRoleService userRoleService;
+
+    @Autowired
+    UserRoleRepo userRoleRepo;
+
+    @Autowired
+    UserRepo userRepo;
+
+    @ApiOperation(value="获取全部角色",notes="获取全部角色")
+    @GetMapping("/all")
+    public ResponseEntity getAllRoles(){
+        return new ResponseEntity(userRoleService.findAllRoles(), HttpStatus.OK);
+    }
+
+    @ApiOperation(value="获取评卷角色",notes="获取评卷角色")
+    @GetMapping("/marker")
+    public ResponseEntity getMarkerRoles(){
+        return new ResponseEntity(userRoleService.findMarkerRoles(), HttpStatus.OK);
+    }
+
+    @ApiOperation(value="获取非评卷角色",notes="获取非评卷角色")
+    @GetMapping("/nonMarker")
+    public ResponseEntity getNonMarkerRoles(){
+        return new ResponseEntity(userRoleService.findNonMarkerRoles(), HttpStatus.OK);
+    }
+
+    @ApiOperation(value="获取管理员角色",notes="获取管理员角色")
+    @GetMapping("/admin")
+    public ResponseEntity getAdminRoles(){
+        return new ResponseEntity(userRoleService.findAdminRoles(), HttpStatus.OK);
+    }
+
+    @ApiOperation(value="新增用户角色",notes="新增角色")
+    @PostMapping
+    public ResponseEntity addUserRole(@RequestBody UserRole userRole){
+        return new ResponseEntity(userRoleRepo.save(userRole), HttpStatus.CREATED);
+    }
+
+    @ApiOperation(value="更新用户角色",notes="更新角色")
+    @PutMapping
+    public ResponseEntity updateUserRole(@RequestBody UserRole userRole){
+        return new ResponseEntity(userRoleRepo.save(userRole), HttpStatus.OK);
+    }
+
+    @ApiOperation(value="按id删除用户",notes="删除")
+    @DeleteMapping("/{id}")
+    public ResponseEntity deleteUserRole(@PathVariable Long id){
+        userRoleRepo.delete(id);
+        return new ResponseEntity(HttpStatus.OK);
+    }
+    
+    @ApiOperation(value="获取印刷阅卷角色",notes="获取印刷阅卷角色")
+    @GetMapping("/qmther")
+    public ResponseEntity getPrinterRoles(){
+        return new ResponseEntity(userRoleService.findQmthRoles(), HttpStatus.OK);
+    }
+    
+    @ApiOperation(value="获取学校机构角色",notes="获取学校机构角色")
+    @GetMapping("/school")
+    public ResponseEntity<Object> getSchoolRoles(){
+    	return new ResponseEntity<Object>(userRoleService.findSchoolRoles(),HttpStatus.OK);
+    }
+}

+ 0 - 0
core-api/src/main/java/cn/com/qmth/examcloud/service/core/service/CourseService.java → examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/CourseService.java


+ 0 - 0
core-api/src/main/java/cn/com/qmth/examcloud/service/core/service/CourseSpeciatlyService.java → examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/CourseSpeciatlyService.java


+ 0 - 0
core-api/src/main/java/cn/com/qmth/examcloud/service/core/service/ExamSiteService.java → examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/ExamSiteService.java


+ 0 - 0
core-api/src/main/java/cn/com/qmth/examcloud/service/core/service/FaceSetTokenService.java → examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/FaceSetTokenService.java


+ 48 - 48
core-api/src/main/java/cn/com/qmth/examcloud/service/core/service/OrgConfigService.java → examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/OrgConfigService.java

@@ -1,48 +1,48 @@
-package cn.com.qmth.examcloud.service.core.service;
-
-import java.util.List;
-import java.util.Map;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.jdbc.core.JdbcTemplate;
-import org.springframework.stereotype.Service;
-import org.springframework.web.bind.annotation.PathVariable;
-
-@Service
-public class OrgConfigService {
-
-	@Autowired
-	private JdbcTemplate jdbcTemplate;
-
-	/**
-	 * @param id
-	 * @param key
-	 * @return
-	 */
-	public String getOrgConfig(@PathVariable Long id, @PathVariable String key) {
-
-		List<Map<String, Object>> dataList = jdbcTemplate
-				.queryForList(" SELECT t.value from ecs_core_org_config t where t.org_id=? and t.key=?", id, key);
-
-		String value = "";
-		if (1 == dataList.size()) {
-			Map<String, Object> map = dataList.get(0);
-			value = (String) map.get("value");
-		}
-
-		return value;
-	}
-
-	/**
-	 * @param orgId
-	 * @param key
-	 * @param value
-	 */
-	public void setOrgConfig(Long orgId, String key, String value) {
-
-		jdbcTemplate.update(
-				"INSERT INTO ecs_core_org_config (org_id,`key`,`value`) VALUES (?,?,?) ON DUPLICATE KEY UPDATE `value`=?", orgId,
-				key, value, value);
-	}
-
-}
+package cn.com.qmth.examcloud.service.core.service;
+
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.stereotype.Service;
+import org.springframework.web.bind.annotation.PathVariable;
+
+@Service
+public class OrgConfigService {
+
+	@Autowired
+	private JdbcTemplate jdbcTemplate;
+
+	/**
+	 * @param id
+	 * @param key
+	 * @return
+	 */
+	public String getOrgConfig(@PathVariable Long id, @PathVariable String key) {
+
+		List<Map<String, Object>> dataList = jdbcTemplate
+				.queryForList(" SELECT t.value from ecs_core_org_config t where t.org_id=? and t.key=?", id, key);
+
+		String value = "";
+		if (1 == dataList.size()) {
+			Map<String, Object> map = dataList.get(0);
+			value = (String) map.get("value");
+		}
+
+		return value;
+	}
+
+	/**
+	 * @param orgId
+	 * @param key
+	 * @param value
+	 */
+	public void setOrgConfig(Long orgId, String key, String value) {
+
+		jdbcTemplate.update(
+				"INSERT INTO ecs_core_org_config (org_id,`key`,`value`) VALUES (?,?,?) ON DUPLICATE KEY UPDATE `value`=?", orgId,
+				key, value, value);
+	}
+
+}

+ 0 - 0
core-api/src/main/java/cn/com/qmth/examcloud/service/core/service/OrgService.java → examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/OrgService.java


+ 0 - 0
core-api/src/main/java/cn/com/qmth/examcloud/service/core/service/PermissionService.java → examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/PermissionService.java


+ 0 - 0
core-api/src/main/java/cn/com/qmth/examcloud/service/core/service/PermissionServiceImpl.java → examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/PermissionServiceImpl.java


+ 0 - 0
core-api/src/main/java/cn/com/qmth/examcloud/service/core/service/RolePermissionRelationService.java → examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/RolePermissionRelationService.java


+ 0 - 0
core-api/src/main/java/cn/com/qmth/examcloud/service/core/service/RolePermissionRelationServiceImpl.java → examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/RolePermissionRelationServiceImpl.java


+ 0 - 0
core-api/src/main/java/cn/com/qmth/examcloud/service/core/service/SpecialtyService.java → examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/SpecialtyService.java


+ 0 - 0
core-api/src/main/java/cn/com/qmth/examcloud/service/core/service/StudentFaceInfoService.java → examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/StudentFaceInfoService.java


+ 0 - 0
core-api/src/main/java/cn/com/qmth/examcloud/service/core/service/StudentService.java → examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/StudentService.java


+ 92 - 92
core-api/src/main/java/cn/com/qmth/examcloud/service/core/service/UserRoleService.java → examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/UserRoleService.java

@@ -1,92 +1,92 @@
-package cn.com.qmth.examcloud.service.core.service;
-
-import cn.com.qmth.examcloud.common.uac.entity.Role;
-import cn.com.qmth.examcloud.common.uac.entity.RolesService;
-import cn.com.qmth.examcloud.common.uac.enums.RoleMeta;
-import cn.com.qmth.examcloud.service.core.repo.UserRoleRepo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * 用户角色服务类
- * Created by songyue on 17/2/22.
- */
-@Service
-public class UserRoleService{
-
-    @Autowired
-    UserRoleRepo userRoleRepo;
-
-
-    /**
-     * 获取全部角色
-     * @return
-     */
-    public List<Role> findAllRoles(){
-        return RolesService.ROLE_LIST;
-    }
-
-    public List<Role> findMarkerRoles(){
-        List<Role> tempRoles = new ArrayList<>(RolesService.ROLE_LIST);
-        tempRoles = tempRoles.stream()
-                .filter(role -> role.getCode().equals(RoleMeta.MARKER.name()))
-                .collect(Collectors.toList());
-        return tempRoles;
-    }
-    
-    public List<Role> findNonMarkerRoles(){
-        List<Role> tempRoles = new ArrayList<>(RolesService.ROLE_LIST);
-        tempRoles = tempRoles.stream()
-                .filter(role -> !role.getCode().equals(RoleMeta.MARKER.name()))
-                .filter(role -> !role.getCode().equals(RoleMeta.STUDENT.name()))
-                .filter(role -> !role.getCode().equals(RoleMeta.SALES_MANAGER.name()))
-                .filter(role -> !role.getCode().equals(RoleMeta.IMPLEMENTERS_MANAGER.name()))
-                .filter(role -> !role.getCode().equals(RoleMeta.PROJECT_MANAGER.name()))
-                .filter(role -> !role.getCode().equals(RoleMeta.PRINT_MANAGER.name()))
-                .collect(Collectors.toList());
-        return tempRoles;
-    }
-
-    public List<Role> findAdminRoles(){
-        List<Role> tempRoles = new ArrayList<>(RolesService.ROLE_LIST);
-        tempRoles = tempRoles.stream()
-                .filter(role -> !role.getCode().equals(RoleMeta.MARKER.name()))
-                .filter(role -> !role.getCode().equals(RoleMeta.STUDENT.name()))
-                .filter(role -> !role.getCode().equals(RoleMeta.LC_USER.name()))
-                .collect(Collectors.toList());
-        return tempRoles;
-    }
-    
-    public List<Role> findQmthRoles(){
-        List<Role> tempRoles = new ArrayList<>(RolesService.ROLE_LIST);
-        tempRoles = tempRoles.stream()
-                .filter(role -> !role.getCode().equals(RoleMeta.LC_USER.name()))
-                .filter(role -> !role.getCode().equals(RoleMeta.MARKING_ADMIN.name()))
-                .filter(role -> !role.getCode().equals(RoleMeta.MARKER.name()))
-                .filter(role -> !role.getCode().equals(RoleMeta.QUESTION_ADMIN.name()))
-                .filter(role -> !role.getCode().equals(RoleMeta.STUDENT.name()))
-                .filter(role -> !role.getCode().equals(RoleMeta.OE_ADMIN.name()))
-                .filter(role -> !role.getCode().equals(RoleMeta.PRINT_MANAGER.name()))
-                .collect(Collectors.toList());
-        return tempRoles;
-    }
-    
-    public List<Role> findSchoolRoles(){
-    	List<Role> tempRoles = new ArrayList<>(RolesService.ROLE_LIST);
-        tempRoles = tempRoles.stream()
-                .filter(role -> !role.getCode().equals(RoleMeta.MARKER.name()))
-                .filter(role -> !role.getCode().equals(RoleMeta.STUDENT.name()))
-                .filter(role -> !role.getCode().equals(RoleMeta.LC_USER.name()))
-                .filter(role -> !role.getCode().equals(RoleMeta.SALES_MANAGER.name()))
-                .filter(role -> !role.getCode().equals(RoleMeta.IMPLEMENTERS_MANAGER.name()))
-                .filter(role -> !role.getCode().equals(RoleMeta.PROJECT_MANAGER.name()))
-                .filter(role -> !role.getCode().equals(RoleMeta.PRINT_MANAGER.name()))
-                .collect(Collectors.toList());
-        return tempRoles;
-    }
-
-}
+package cn.com.qmth.examcloud.service.core.service;
+
+import cn.com.qmth.examcloud.common.uac.entity.Role;
+import cn.com.qmth.examcloud.common.uac.entity.RolesService;
+import cn.com.qmth.examcloud.common.uac.enums.RoleMeta;
+import cn.com.qmth.examcloud.service.core.repo.UserRoleRepo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 用户角色服务类
+ * Created by songyue on 17/2/22.
+ */
+@Service
+public class UserRoleService{
+
+    @Autowired
+    UserRoleRepo userRoleRepo;
+
+
+    /**
+     * 获取全部角色
+     * @return
+     */
+    public List<Role> findAllRoles(){
+        return RolesService.ROLE_LIST;
+    }
+
+    public List<Role> findMarkerRoles(){
+        List<Role> tempRoles = new ArrayList<>(RolesService.ROLE_LIST);
+        tempRoles = tempRoles.stream()
+                .filter(role -> role.getCode().equals(RoleMeta.MARKER.name()))
+                .collect(Collectors.toList());
+        return tempRoles;
+    }
+    
+    public List<Role> findNonMarkerRoles(){
+        List<Role> tempRoles = new ArrayList<>(RolesService.ROLE_LIST);
+        tempRoles = tempRoles.stream()
+                .filter(role -> !role.getCode().equals(RoleMeta.MARKER.name()))
+                .filter(role -> !role.getCode().equals(RoleMeta.STUDENT.name()))
+                .filter(role -> !role.getCode().equals(RoleMeta.SALES_MANAGER.name()))
+                .filter(role -> !role.getCode().equals(RoleMeta.IMPLEMENTERS_MANAGER.name()))
+                .filter(role -> !role.getCode().equals(RoleMeta.PROJECT_MANAGER.name()))
+                .filter(role -> !role.getCode().equals(RoleMeta.PRINT_MANAGER.name()))
+                .collect(Collectors.toList());
+        return tempRoles;
+    }
+
+    public List<Role> findAdminRoles(){
+        List<Role> tempRoles = new ArrayList<>(RolesService.ROLE_LIST);
+        tempRoles = tempRoles.stream()
+                .filter(role -> !role.getCode().equals(RoleMeta.MARKER.name()))
+                .filter(role -> !role.getCode().equals(RoleMeta.STUDENT.name()))
+                .filter(role -> !role.getCode().equals(RoleMeta.LC_USER.name()))
+                .collect(Collectors.toList());
+        return tempRoles;
+    }
+    
+    public List<Role> findQmthRoles(){
+        List<Role> tempRoles = new ArrayList<>(RolesService.ROLE_LIST);
+        tempRoles = tempRoles.stream()
+                .filter(role -> !role.getCode().equals(RoleMeta.LC_USER.name()))
+                .filter(role -> !role.getCode().equals(RoleMeta.MARKING_ADMIN.name()))
+                .filter(role -> !role.getCode().equals(RoleMeta.MARKER.name()))
+                .filter(role -> !role.getCode().equals(RoleMeta.QUESTION_ADMIN.name()))
+                .filter(role -> !role.getCode().equals(RoleMeta.STUDENT.name()))
+                .filter(role -> !role.getCode().equals(RoleMeta.OE_ADMIN.name()))
+                .filter(role -> !role.getCode().equals(RoleMeta.PRINT_MANAGER.name()))
+                .collect(Collectors.toList());
+        return tempRoles;
+    }
+    
+    public List<Role> findSchoolRoles(){
+    	List<Role> tempRoles = new ArrayList<>(RolesService.ROLE_LIST);
+        tempRoles = tempRoles.stream()
+                .filter(role -> !role.getCode().equals(RoleMeta.MARKER.name()))
+                .filter(role -> !role.getCode().equals(RoleMeta.STUDENT.name()))
+                .filter(role -> !role.getCode().equals(RoleMeta.LC_USER.name()))
+                .filter(role -> !role.getCode().equals(RoleMeta.SALES_MANAGER.name()))
+                .filter(role -> !role.getCode().equals(RoleMeta.IMPLEMENTERS_MANAGER.name()))
+                .filter(role -> !role.getCode().equals(RoleMeta.PROJECT_MANAGER.name()))
+                .filter(role -> !role.getCode().equals(RoleMeta.PRINT_MANAGER.name()))
+                .collect(Collectors.toList());
+        return tempRoles;
+    }
+
+}

+ 0 - 0
core-api/src/main/java/cn/com/qmth/examcloud/service/core/service/UserService.java → examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/UserService.java


+ 0 - 0
core-api/src/main/java/cn/com/qmth/examcloud/service/core/service/sync/DataReceiveService.java → examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/sync/DataReceiveService.java


+ 0 - 0
core-api/src/main/java/cn/com/qmth/examcloud/service/core/service/sync/DataSendService.java → examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/service/sync/DataSendService.java


+ 0 - 0
core-api/src/main/java/cn/com/qmth/examcloud/service/core/util/ExportUtils.java → examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/service/core/util/ExportUtils.java


+ 44 - 0
examcloud-core-basic-domain/pom.xml

@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>cn.com.qmth.examcloud.core.basic</groupId>
+		<artifactId>examcloud-core-basic</artifactId>
+		<version>0.1.0</version>
+	</parent>
+
+	<artifactId>examcloud-core-basic-domain</artifactId>
+	<packaging>jar</packaging>
+
+	<dependencies>
+		<dependency>
+			<groupId>mysql</groupId>
+			<artifactId>mysql-connector-java</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-data-jpa</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.hibernate</groupId>
+			<artifactId>hibernate-validator</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>cn.com.qmth.examcloud.commons</groupId>
+			<artifactId>examcloud-commons-util</artifactId>
+			<version>${examcloud.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>cn.com.qmth.examcloud.commons</groupId>
+			<artifactId>examcloud-commons-support</artifactId>
+			<version>${examcloud.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>cn.com.qmth.examcloud.commons</groupId>
+			<artifactId>examcloud-commons-dto</artifactId>
+			<version>${examcloud.version}</version>
+		</dependency>
+	</dependencies>
+</project>

+ 23 - 23
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/assemble/CourseAssembler.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/assemble/CourseAssembler.java

@@ -1,23 +1,23 @@
-package cn.com.qmth.examcloud.service.core.assemble;
-
-import org.springframework.stereotype.Component;
-
-import cn.com.qmth.examcloud.service.core.dto.CourseDto;
-import cn.com.qmth.examcloud.service.core.entity.Course;
-
-@Component
-public class CourseAssembler {
-	
-	public CourseDto toDTO(Course course){
-		CourseDto dto = null;
-		if(dto == null){
-			dto = new CourseDto();
-			dto.setName(course.getName());
-			dto.setCode(course.getCode());
-			dto.setLevel(course.getLevel().getName());
-//			dto.setEnable(course.getEnable()?"启用":"禁用");
-		}
-		return dto;
-	}
-	
-}
+package cn.com.qmth.examcloud.service.core.assemble;
+
+import org.springframework.stereotype.Component;
+
+import cn.com.qmth.examcloud.service.core.dto.CourseDto;
+import cn.com.qmth.examcloud.service.core.entity.Course;
+
+@Component
+public class CourseAssembler {
+	
+	public CourseDto toDTO(Course course){
+		CourseDto dto = null;
+		if(dto == null){
+			dto = new CourseDto();
+			dto.setName(course.getName());
+			dto.setCode(course.getCode());
+			dto.setLevel(course.getLevel().getName());
+//			dto.setEnable(course.getEnable()?"启用":"禁用");
+		}
+		return dto;
+	}
+	
+}

+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/dto/CourseDto.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/dto/CourseDto.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/dto/OrgDto.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/dto/OrgDto.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/dto/SpecialtyDto.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/dto/SpecialtyDto.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/dto/UserInfo.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/dto/UserInfo.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/Course.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/Course.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/CourseSpeciatly.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/CourseSpeciatly.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/ExamSite.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/ExamSite.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/FaceSetToken.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/FaceSetToken.java


+ 273 - 273
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/Org.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/Org.java

@@ -1,273 +1,273 @@
-package cn.com.qmth.examcloud.service.core.entity;
-
-import org.springframework.format.annotation.DateTimeFormat;
-
-import cn.com.qmth.examcloud.common.util.excel.ExcelProperty;
-import cn.com.qmth.examcloud.service.core.enums.OrgType;
-
-import javax.persistence.*;
-import javax.validation.constraints.NotNull;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * Created by songyue on 17/1/13.
- */
-@Entity
-@Table(name = "ecs_core_org")
-public class Org implements Serializable{
-
-    private static final long serialVersionUID = -592353272256492483L;
-
-    @Id
-    @GeneratedValue
-    private Long id;
-    /**
-     * 顶级机构id,无上级时为0;eg.学校即是顶级
-     */
-    @NotNull
-    private Long rootId;
-    /**
-     * 父级机构id,无上级时为0;eg.学习中心的父级为学校
-     */
-    @NotNull
-    private Long parentId;
-
-    private Integer level;
-    
-    @ExcelProperty(name = "机构名称",index = 0)
-    @NotNull
-    private String name;
-    
-    /**
-     * 学习中心代码
-     */
-    @ExcelProperty(name = "机构代码",index = 1)
-    private String code;
-
-    private String logo;
-
-    private String address;
-
-    /**
-     * 可使用的应用模块
-     */
-    private String apps;
-
-    @NotNull
-    private Boolean enable;
-    
-    /**
-     * 联系电话
-     */
-    @ExcelProperty(name = "联系电话",index = 3)
-    private String telphone;
-    /**
-     * 联系人
-     */
-    @ExcelProperty(name = "联系人",index = 2)
-    private String contacts;
-
-    @Temporal(value = TemporalType.DATE)
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date createTime;
-
-    @Temporal(value = TemporalType.DATE)
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date updateTime;
-    
-    /**
-     * 机构类型:学校,启明,印刷
-     */
-    @NotNull
-    @Enumerated(EnumType.STRING)
-    private OrgType type;
-    
-    /**
-     * 机器数量
-     */
-    private Integer macNumber;
-    
-    /**
-     * 是否提供人员
-     */
-    private Boolean isProvide;
-    
-    /**
-     * 备注
-     */
-    private String remark;
-    
-    /**
-     * 网考端系统名称
-     */
-    private String examSysName;
-    
-    public static long getSerialVersionUID() {
-        return serialVersionUID;
-    }
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public Long getRootId() {
-        return rootId;
-    }
-
-    public void setRootId(Long rootId) {
-        this.rootId = rootId;
-    }
-
-    public Long getParentId() {
-        return parentId;
-    }
-
-    public void setParentId(Long parentId) {
-        this.parentId = parentId;
-    }
-
-    public Integer getLevel() {
-        return level;
-    }
-
-    public void setLevel(Integer level) {
-        this.level = level;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getLogo() {
-        return logo;
-    }
-
-    public void setLogo(String logo) {
-        this.logo = logo;
-    }
-
-    public String getAddress() {
-        return address;
-    }
-
-    public void setAddress(String address) {
-        this.address = address;
-    }
-
-    public String getApps() {
-        return apps;
-    }
-
-    public void setApps(String apps) {
-        this.apps = apps;
-    }
-
-	public Boolean getEnable() {
-		return enable;
-	}
-
-	public void setEnable(Boolean enable) {
-		this.enable = enable;
-	}
-
-	public Date getCreateTime() {
-        return createTime;
-    }
-
-    public void setCreateTime(Date createTime) {
-        this.createTime = createTime;
-    }
-
-    public Date getUpdateTime() {
-        return updateTime;
-    }
-
-    public void setUpdateTime(Date updateTime) {
-        this.updateTime = updateTime;
-    }
-
-    public String getCode() {
-		return code;
-	}
-
-	public void setCode(String code) {
-		this.code = code;
-	}
-
-	public String getTelphone() {
-		return telphone;
-	}
-
-	public void setTelphone(String telphone) {
-		this.telphone = telphone;
-	}
-
-	public String getContacts() {
-		return contacts;
-	}
-
-	public void setContacts(String contacts) {
-		this.contacts = contacts;
-	}
-
-
-	public OrgType getType() {
-		return type;
-	}
-
-	public void setType(OrgType type) {
-		this.type = type;
-	}
-	
-	public Integer getMacNumber() {
-		return macNumber;
-	}
-
-	public void setMacNumber(Integer macNumber) {
-		this.macNumber = macNumber;
-	}
-
-	public Boolean getIsProvide() {
-		return isProvide;
-	}
-
-	public void setIsProvide(Boolean isProvide) {
-		this.isProvide = isProvide;
-	}
-
-	public String getRemark() {
-		return remark;
-	}
-
-	public void setRemark(String remark) {
-		this.remark = remark;
-	}
-	
-	public String getExamSysName() {
-		return examSysName;
-	}
-
-	public void setExamSysName(String examSysName) {
-		this.examSysName = examSysName;
-	}
-
-	public Org(String name, String code, String contacts,String telphone) {
-        this.name = name;
-        this.code = code;
-        this.telphone = telphone;
-        this.contacts = contacts;
-    }
-
-    public Org() {
-    }
-}
+package cn.com.qmth.examcloud.service.core.entity;
+
+import org.springframework.format.annotation.DateTimeFormat;
+
+import cn.com.qmth.examcloud.common.util.excel.ExcelProperty;
+import cn.com.qmth.examcloud.service.core.enums.OrgType;
+
+import javax.persistence.*;
+import javax.validation.constraints.NotNull;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * Created by songyue on 17/1/13.
+ */
+@Entity
+@Table(name = "ecs_core_org")
+public class Org implements Serializable{
+
+    private static final long serialVersionUID = -592353272256492483L;
+
+    @Id
+    @GeneratedValue
+    private Long id;
+    /**
+     * 顶级机构id,无上级时为0;eg.学校即是顶级
+     */
+    @NotNull
+    private Long rootId;
+    /**
+     * 父级机构id,无上级时为0;eg.学习中心的父级为学校
+     */
+    @NotNull
+    private Long parentId;
+
+    private Integer level;
+    
+    @ExcelProperty(name = "机构名称",index = 0)
+    @NotNull
+    private String name;
+    
+    /**
+     * 学习中心代码
+     */
+    @ExcelProperty(name = "机构代码",index = 1)
+    private String code;
+
+    private String logo;
+
+    private String address;
+
+    /**
+     * 可使用的应用模块
+     */
+    private String apps;
+
+    @NotNull
+    private Boolean enable;
+    
+    /**
+     * 联系电话
+     */
+    @ExcelProperty(name = "联系电话",index = 3)
+    private String telphone;
+    /**
+     * 联系人
+     */
+    @ExcelProperty(name = "联系人",index = 2)
+    private String contacts;
+
+    @Temporal(value = TemporalType.DATE)
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
+    @Temporal(value = TemporalType.DATE)
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
+    
+    /**
+     * 机构类型:学校,启明,印刷
+     */
+    @NotNull
+    @Enumerated(EnumType.STRING)
+    private OrgType type;
+    
+    /**
+     * 机器数量
+     */
+    private Integer macNumber;
+    
+    /**
+     * 是否提供人员
+     */
+    private Boolean isProvide;
+    
+    /**
+     * 备注
+     */
+    private String remark;
+    
+    /**
+     * 网考端系统名称
+     */
+    private String examSysName;
+    
+    public static long getSerialVersionUID() {
+        return serialVersionUID;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getRootId() {
+        return rootId;
+    }
+
+    public void setRootId(Long rootId) {
+        this.rootId = rootId;
+    }
+
+    public Long getParentId() {
+        return parentId;
+    }
+
+    public void setParentId(Long parentId) {
+        this.parentId = parentId;
+    }
+
+    public Integer getLevel() {
+        return level;
+    }
+
+    public void setLevel(Integer level) {
+        this.level = level;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getLogo() {
+        return logo;
+    }
+
+    public void setLogo(String logo) {
+        this.logo = logo;
+    }
+
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public String getApps() {
+        return apps;
+    }
+
+    public void setApps(String apps) {
+        this.apps = apps;
+    }
+
+	public Boolean getEnable() {
+		return enable;
+	}
+
+	public void setEnable(Boolean enable) {
+		this.enable = enable;
+	}
+
+	public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getCode() {
+		return code;
+	}
+
+	public void setCode(String code) {
+		this.code = code;
+	}
+
+	public String getTelphone() {
+		return telphone;
+	}
+
+	public void setTelphone(String telphone) {
+		this.telphone = telphone;
+	}
+
+	public String getContacts() {
+		return contacts;
+	}
+
+	public void setContacts(String contacts) {
+		this.contacts = contacts;
+	}
+
+
+	public OrgType getType() {
+		return type;
+	}
+
+	public void setType(OrgType type) {
+		this.type = type;
+	}
+	
+	public Integer getMacNumber() {
+		return macNumber;
+	}
+
+	public void setMacNumber(Integer macNumber) {
+		this.macNumber = macNumber;
+	}
+
+	public Boolean getIsProvide() {
+		return isProvide;
+	}
+
+	public void setIsProvide(Boolean isProvide) {
+		this.isProvide = isProvide;
+	}
+
+	public String getRemark() {
+		return remark;
+	}
+
+	public void setRemark(String remark) {
+		this.remark = remark;
+	}
+	
+	public String getExamSysName() {
+		return examSysName;
+	}
+
+	public void setExamSysName(String examSysName) {
+		this.examSysName = examSysName;
+	}
+
+	public Org(String name, String code, String contacts,String telphone) {
+        this.name = name;
+        this.code = code;
+        this.telphone = telphone;
+        this.contacts = contacts;
+    }
+
+    public Org() {
+    }
+}

+ 140 - 140
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/OrgFunction.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/OrgFunction.java

@@ -1,140 +1,140 @@
-package cn.com.qmth.examcloud.service.core.entity;
-
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.Table;
-import javax.validation.constraints.NotNull;
-
-import cn.com.qmth.examcloud.common.support.tree.TreeNode;
-
-/**
- * 机构功能
- * 
- * @author wang wei
- * @date 2018年4月9日
- */
-@Entity
-@Table(name = "ecs_core_function")
-public class OrgFunction implements Serializable, TreeNode {
-
-	private static final long serialVersionUID = -3894524658332441373L;
-
-	@Id
-	@GeneratedValue
-	@Column(name = "id")
-	private Long funcId;
-
-	/**
-	 * 功能编码
-	 */
-	@NotNull
-	private String funcCode;
-
-	/**
-	 * 父功能id
-	 */
-	@NotNull
-	@Column(name = "parent_id")
-	private Long parentFuncId;
-
-	/**
-	 * 功能名称
-	 */
-	@NotNull
-	private String funcName;
-
-	/**
-	 * 描述
-	 */
-	@NotNull
-	private String description;
-
-	/**
-	 * 权重
-	 */
-	@NotNull
-	private int weigth;
-
-	public Long getFuncId() {
-		return funcId;
-	}
-
-	public void setFuncId(Long funcId) {
-		this.funcId = funcId;
-	}
-
-	public String getFuncCode() {
-		return funcCode;
-	}
-
-	public void setFuncCode(String funcCode) {
-		this.funcCode = funcCode;
-	}
-
-	public Long getParentFuncId() {
-		return parentFuncId;
-	}
-
-	public void setParentFuncId(Long parentFuncId) {
-		this.parentFuncId = parentFuncId;
-	}
-
-	public String getFuncName() {
-		return funcName;
-	}
-
-	public void setFuncName(String funcName) {
-		this.funcName = funcName;
-	}
-
-	public String getDescription() {
-		return description;
-	}
-
-	public void setDescription(String description) {
-		this.description = description;
-	}
-
-	public int getWeigth() {
-		return weigth;
-	}
-
-	public void setWeigth(int weigth) {
-		this.weigth = weigth;
-	}
-
-	@Override
-	public String getId() {
-		return String.valueOf(this.funcId);
-	}
-
-	@Override
-	public void setId(String id) {
-		this.funcId = Long.parseLong(id);
-	}
-
-	@Override
-	public String getName() {
-		return this.funcName;
-	}
-
-	@Override
-	public void setName(String name) {
-		this.funcName = name;
-	}
-
-	@Override
-	public String getParentId() {
-		return String.valueOf(this.parentFuncId);
-	}
-
-	@Override
-	public void setParentId(String parentId) {
-		this.parentFuncId = Long.parseLong(parentId);
-	}
-
-}
+package cn.com.qmth.examcloud.service.core.entity;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import javax.validation.constraints.NotNull;
+
+import cn.com.qmth.examcloud.common.support.tree.TreeNode;
+
+/**
+ * 机构功能
+ * 
+ * @author wang wei
+ * @date 2018年4月9日
+ */
+@Entity
+@Table(name = "ecs_core_function")
+public class OrgFunction implements Serializable, TreeNode {
+
+	private static final long serialVersionUID = -3894524658332441373L;
+
+	@Id
+	@GeneratedValue
+	@Column(name = "id")
+	private Long funcId;
+
+	/**
+	 * 功能编码
+	 */
+	@NotNull
+	private String funcCode;
+
+	/**
+	 * 父功能id
+	 */
+	@NotNull
+	@Column(name = "parent_id")
+	private Long parentFuncId;
+
+	/**
+	 * 功能名称
+	 */
+	@NotNull
+	private String funcName;
+
+	/**
+	 * 描述
+	 */
+	@NotNull
+	private String description;
+
+	/**
+	 * 权重
+	 */
+	@NotNull
+	private int weigth;
+
+	public Long getFuncId() {
+		return funcId;
+	}
+
+	public void setFuncId(Long funcId) {
+		this.funcId = funcId;
+	}
+
+	public String getFuncCode() {
+		return funcCode;
+	}
+
+	public void setFuncCode(String funcCode) {
+		this.funcCode = funcCode;
+	}
+
+	public Long getParentFuncId() {
+		return parentFuncId;
+	}
+
+	public void setParentFuncId(Long parentFuncId) {
+		this.parentFuncId = parentFuncId;
+	}
+
+	public String getFuncName() {
+		return funcName;
+	}
+
+	public void setFuncName(String funcName) {
+		this.funcName = funcName;
+	}
+
+	public String getDescription() {
+		return description;
+	}
+
+	public void setDescription(String description) {
+		this.description = description;
+	}
+
+	public int getWeigth() {
+		return weigth;
+	}
+
+	public void setWeigth(int weigth) {
+		this.weigth = weigth;
+	}
+
+	@Override
+	public String getId() {
+		return String.valueOf(this.funcId);
+	}
+
+	@Override
+	public void setId(String id) {
+		this.funcId = Long.parseLong(id);
+	}
+
+	@Override
+	public String getName() {
+		return this.funcName;
+	}
+
+	@Override
+	public void setName(String name) {
+		this.funcName = name;
+	}
+
+	@Override
+	public String getParentId() {
+		return String.valueOf(this.parentFuncId);
+	}
+
+	@Override
+	public void setParentId(String parentId) {
+		this.parentFuncId = Long.parseLong(parentId);
+	}
+
+}

+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/Permission.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/Permission.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/RolePermissionRelation.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/RolePermissionRelation.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/Specialty.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/Specialty.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/Student.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/Student.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/StudentFaceInfo.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/StudentFaceInfo.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/User.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/User.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/UserLogin.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/UserLogin.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/UserOpsLog.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/UserOpsLog.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/UserRole.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/entity/UserRole.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/enums/CourseLevel.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/enums/CourseLevel.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/enums/Gender.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/enums/Gender.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/enums/LoginType.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/enums/LoginType.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/enums/OrgType.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/enums/OrgType.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/enums/PermissionType.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/enums/PermissionType.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/enums/UserScope.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/enums/UserScope.java


+ 8 - 8
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/enums/UserType.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/enums/UserType.java

@@ -1,8 +1,8 @@
-package cn.com.qmth.examcloud.service.core.enums;
-
-/**
- * Created by songyue on 17/2/22.
- */
-public enum UserType {
-    NOT_STUDENT,STUDENT,PRINT
-}
+package cn.com.qmth.examcloud.service.core.enums;
+
+/**
+ * Created by songyue on 17/2/22.
+ */
+public enum UserType {
+    NOT_STUDENT,STUDENT,PRINT
+}

+ 11 - 11
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/params/OrgProperties.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/params/OrgProperties.java

@@ -1,11 +1,11 @@
-package cn.com.qmth.examcloud.service.core.params;
-
-/**
- * 机构属性
- * 
- * @author wang wei
- * @date 2018年4月11日
- */
-public interface OrgProperties {
-
-}
+package cn.com.qmth.examcloud.service.core.params;
+
+/**
+ * 机构属性
+ * 
+ * @author wang wei
+ * @date 2018年4月11日
+ */
+public interface OrgProperties {
+
+}

+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/params/UserParam.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/params/UserParam.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/BaseMemRepository.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/BaseMemRepository.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/CourseRepo.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/CourseRepo.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/CourseSpeciatlyRepo.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/CourseSpeciatlyRepo.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/ExamSiteRepo.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/ExamSiteRepo.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/FaceSetTokenRepo.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/FaceSetTokenRepo.java


+ 29 - 29
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/OrgFunctionRepo.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/OrgFunctionRepo.java

@@ -1,29 +1,29 @@
-package cn.com.qmth.examcloud.service.core.repo;
-
-import java.util.List;
-
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.Modifying;
-import org.springframework.data.jpa.repository.Query;
-import org.springframework.data.repository.query.Param;
-import org.springframework.data.repository.query.QueryByExampleExecutor;
-import org.springframework.transaction.annotation.Transactional;
-
-import cn.com.qmth.examcloud.service.core.entity.OrgFunction;
-
-public interface OrgFunctionRepo extends JpaRepository<OrgFunction, Long>, QueryByExampleExecutor<OrgFunction> {
-
-	@Query(nativeQuery = true, value = "SELECT * from ecs_core_function x,ecs_core_org_function y where x.id=y.function_id and y.org_id = :orgId")
-	List<OrgFunction> getOrgFunctions(@Param("orgId") long orgId);
-
-	@Transactional
-	@Modifying
-	@Query(value = "delete from ecs_core_org_function  where org_id =?1", nativeQuery = true)
-	void deleteAllOrgFunctions(Long orgId);
-
-	@Transactional
-	@Modifying
-	@Query(value = "insert into ecs_core_org_function (org_id,function_id) values(?1,?2)", nativeQuery = true)
-	void addOrgFunction(Long orgId, Long funcId);
-
-}
+package cn.com.qmth.examcloud.service.core.repo;
+
+import java.util.List;
+
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Modifying;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.data.repository.query.Param;
+import org.springframework.data.repository.query.QueryByExampleExecutor;
+import org.springframework.transaction.annotation.Transactional;
+
+import cn.com.qmth.examcloud.service.core.entity.OrgFunction;
+
+public interface OrgFunctionRepo extends JpaRepository<OrgFunction, Long>, QueryByExampleExecutor<OrgFunction> {
+
+	@Query(nativeQuery = true, value = "SELECT * from ecs_core_function x,ecs_core_org_function y where x.id=y.function_id and y.org_id = :orgId")
+	List<OrgFunction> getOrgFunctions(@Param("orgId") long orgId);
+
+	@Transactional
+	@Modifying
+	@Query(value = "delete from ecs_core_org_function  where org_id =?1", nativeQuery = true)
+	void deleteAllOrgFunctions(Long orgId);
+
+	@Transactional
+	@Modifying
+	@Query(value = "insert into ecs_core_org_function (org_id,function_id) values(?1,?2)", nativeQuery = true)
+	void addOrgFunction(Long orgId, Long funcId);
+
+}

+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/OrgRepo.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/OrgRepo.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/PermissionRepo.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/PermissionRepo.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/RolePermissionRelationRepo.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/RolePermissionRelationRepo.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/SpecialtyRepo.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/SpecialtyRepo.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/StudentFaceInfoRepo.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/StudentFaceInfoRepo.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/StudentRepo.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/StudentRepo.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/UserLoginRepo.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/UserLoginRepo.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/UserOpsLogRepo.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/UserOpsLogRepo.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/UserRepo.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/UserRepo.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/UserRoleRepo.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/UserRoleRepo.java


+ 0 - 0
core-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/memory/OrgMemRepo.java → examcloud-core-basic-domain/src/main/java/cn/com/qmth/examcloud/service/core/repo/memory/OrgMemRepo.java


+ 54 - 0
examcloud-core-basic-main/pom.xml

@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>cn.com.qmth.examcloud.core.basic</groupId>
+		<artifactId>examcloud-core-basic</artifactId>
+		<version>0.1.0</version>
+	</parent>
+
+	<artifactId>examcloud-core-basic-main</artifactId>
+	<packaging>jar</packaging>
+
+	<dependencies>
+		<dependency>
+			<groupId>cn.com.qmth.examcloud.core.basic</groupId>
+			<artifactId>examcloud-core-basic-api</artifactId>
+			<version>${examcloud.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-test</artifactId>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-autoconfigure</artifactId>
+		</dependency>
+	</dependencies>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.springframework.boot</groupId>
+				<artifactId>spring-boot-maven-plugin</artifactId>
+				<configuration><!-- 指定该Main Class为全局的唯一入口 -->
+					<mainClass>cn.com.qmth.examcloud.service.core.Application</mainClass>
+					<layout>ZIP</layout>
+					<includeSystemScope>true</includeSystemScope>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<configuration>
+					<source>1.8</source>
+					<target>1.8</target>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
+</project>

+ 41 - 41
core-main/src/main/java/cn/com/qmth/examcloud/service/core/AccessControlConfig.java → examcloud-core-basic-main/src/main/java/cn/com/qmth/examcloud/service/core/AccessControlConfig.java

@@ -1,41 +1,41 @@
-package cn.com.qmth.examcloud.service.core;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.data.redis.core.RedisTemplate;
-import org.springframework.web.servlet.config.annotation.CorsRegistry;
-import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
-
-import cn.com.qmth.examcloud.common.uac.AccessCtrlInterceptor;
-
-/**
- * prod环境开启权限验证
- * @author ting.yin
- */
-@Configuration
-//@Profile("prod")
-public class AccessControlConfig extends WebMvcConfigurerAdapter {
-
-	@SuppressWarnings("rawtypes")
-	@Autowired
-	RedisTemplate redisTemplate;
-
-	@Bean
-	public AccessCtrlInterceptor getInterceptor() {
-		return new AccessCtrlInterceptor(redisTemplate);
-	}
-
-    @Override
-	public void addInterceptors(InterceptorRegistry registry) {
-		registry.addInterceptor(getInterceptor()).addPathPatterns("/**").excludePathPatterns("/**/swagger-ui.html#/**");
-	}
-	@Override
-	public void addCorsMappings(CorsRegistry registry) {
-		registry.addMapping("/**")
-				.allowedOrigins("*")
-				.allowedMethods("GET", "HEAD", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "TRACE")
-				.allowedHeaders("*");
-	}
-}
+package cn.com.qmth.examcloud.service.core;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.web.servlet.config.annotation.CorsRegistry;
+import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
+
+import cn.com.qmth.examcloud.common.uac.AccessCtrlInterceptor;
+
+/**
+ * prod环境开启权限验证
+ * @author ting.yin
+ */
+@Configuration
+//@Profile("prod")
+public class AccessControlConfig extends WebMvcConfigurerAdapter {
+
+	@SuppressWarnings("rawtypes")
+	@Autowired
+	RedisTemplate redisTemplate;
+
+	@Bean
+	public AccessCtrlInterceptor getInterceptor() {
+		return new AccessCtrlInterceptor(redisTemplate);
+	}
+
+    @Override
+	public void addInterceptors(InterceptorRegistry registry) {
+		registry.addInterceptor(getInterceptor()).addPathPatterns("/**").excludePathPatterns("/**/swagger-ui.html#/**");
+	}
+	@Override
+	public void addCorsMappings(CorsRegistry registry) {
+		registry.addMapping("/**")
+				.allowedOrigins("*")
+				.allowedMethods("GET", "HEAD", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "TRACE")
+				.allowedHeaders("*");
+	}
+}

+ 0 - 0
core-main/src/main/java/cn/com/qmth/examcloud/service/core/Application.java → examcloud-core-basic-main/src/main/java/cn/com/qmth/examcloud/service/core/Application.java


+ 0 - 0
core-main/src/main/java/cn/com/qmth/examcloud/service/core/Swagger2.java → examcloud-core-basic-main/src/main/java/cn/com/qmth/examcloud/service/core/Swagger2.java


+ 0 - 0
core-main/src/main/resources/application-dev.properties → examcloud-core-basic-main/src/main/resources/application-dev.properties


+ 0 - 0
core-main/src/main/resources/application-prac.properties → examcloud-core-basic-main/src/main/resources/application-prac.properties


+ 0 - 0
core-main/src/main/resources/application-prod.properties → examcloud-core-basic-main/src/main/resources/application-prod.properties


+ 0 - 0
core-main/src/main/resources/application-prodvpc.properties → examcloud-core-basic-main/src/main/resources/application-prodvpc.properties


+ 0 - 0
core-main/src/main/resources/application-test.properties → examcloud-core-basic-main/src/main/resources/application-test.properties


+ 0 - 0
core-main/src/main/resources/application.properties → examcloud-core-basic-main/src/main/resources/application.properties


+ 0 - 0
core-main/src/main/resources/logback-spring.xml → examcloud-core-basic-main/src/main/resources/logback-spring.xml


+ 7 - 7
pom.xml

@@ -1,20 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 	<modelVersion>4.0.0</modelVersion>
 	<parent>
 		<groupId>cn.com.qmth.examcloud</groupId>
 		<artifactId>examcloud-parent</artifactId>
 		<version>0.1.0</version>
 	</parent>
-	<groupId>cn.com.qmth.examcloud.service</groupId>
-	<artifactId>core</artifactId>
-	<name>ExamCloud-service-core</name>
+	<groupId>cn.com.qmth.examcloud.core.basic</groupId>
+	<artifactId>examcloud-core-basic</artifactId>
 	<packaging>pom</packaging>
 
 	<modules>
-		<module>core-domain</module>
-		<module>core-api</module>
-		<module>core-main</module>
+		<module>examcloud-core-basic-domain</module>
+		<module>examcloud-core-basic-api</module>
+		<module>examcloud-core-basic-main</module>
 	</modules>
 
 </project>