mirror of
https://gitee.com/orangeform/orange-admin.git
synced 2026-01-17 18:46:36 +08:00
commit:支持app的纯后台服务
This commit is contained in:
@@ -0,0 +1,259 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="Spring" name="Spring">
|
||||
<configuration />
|
||||
</facet>
|
||||
<facet type="web" name="Web">
|
||||
<configuration>
|
||||
<webroots />
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="common-core" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.31" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.31" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.31" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-validation:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.18.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.1.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:guava:28.2-android" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:failureaccess:1.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.checkerframework:checker-compat-qual:2.5.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.3.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.j2objc:j2objc-annotations:1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-io:commons-io:2.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.3.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: joda-time:joda-time:2.10.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-csv:1.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.4.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.jsonwebtoken:jjwt:0.9.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.74" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.ben-manes.caffeine:caffeine:2.8.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.checkerframework:checker-qual:3.1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.jimmyshi:bean-query:1.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest-all:1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:3.17" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.poi:poi:3.17" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:3.17" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:2.6.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: stax:stax-api:1.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.04" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: mysql:mysql-connector-java:8.0.19" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:druid-spring-boot-starter:1.1.22" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:druid:1.1.22" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-spring-boot-starter:2.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.4.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:1.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-core:1.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.persistence:persistence-api:1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-base:1.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-weekend:1.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-spring:1.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-extra:1.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-spring-boot-autoconfigure:2.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-starter:1.2.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:2.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:2.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.2.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-client:1.2.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-common:1.2.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-api:1.2.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.prometheus:simpleclient:0.5.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.spring:spring-context-support:1.0.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-ribbon:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon:2.3.0" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.ribbon:ribbon-transport:2.3.0" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-contexts:0.4.9" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-servo:0.4.9" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: javax.inject:javax.inject:1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty:0.4.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-core:2.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-httpclient:2.3.0" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-client:1.19.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-core:1.19.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: javax.ws.rs:jsr311-api:1.1.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey.contribs:jersey-apache-client4:1.19.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.servo:servo-core:0.12.21" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-commons-util:0.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-loadbalancer:2.3.0" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-statistics:0.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.reactivex:rxjava:1.3.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-sentinel:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-transport-simple-http:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-transport-common:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-annotation-aspectj:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-core:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.aspectj:aspectjrt:1.9.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-circuitbreaker-sentinel:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-reactor-adapter:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-spring-webflux-adapter:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-spring-webmvc-adapter:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-parameter-flow-control:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-cluster-server-default:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-cluster-common-default:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-common:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-cluster-client-default:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-alibaba-sentinel-datasource:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.codehaus.woodstox:stax2-api:4.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.woodstox:woodstox-core:5.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-datasource-nacos:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-datasource-extension:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-freemarker:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.freemarker:freemarker:2.3.29" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-log4j2:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-slf4j-impl:2.12.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.12.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-core:2.12.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-jul:2.12.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-cache:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-configuration-processor:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-actuator:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator-autoconfigure:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.micrometer:micrometer-core:1.3.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.latencyutils:LatencyUtils:2.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: de.codecentric:spring-boot-admin-starter-client:2.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: de.codecentric:spring-boot-admin-client:2.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-config:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-openfeign:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.59" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.59" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-openfeign-core:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form-spring:3.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form:3.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-core:10.7.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-slf4j:10.7.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-hystrix:10.7.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.archaius:archaius-core:0.7.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-httpclient:10.7.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-hystrix:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-hystrix:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-ribbon:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-archaius:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-archaius:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-core:1.5.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-serialization:1.5.18" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.fasterxml.jackson.module:jackson-module-afterburner:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-metrics-event-stream:1.5.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-javanica:1.5.18" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.reactivex:rxjava-reactive-streams:1.2.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.3.1.Final" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.mapstruct:mapstruct-processor:1.3.1.Final" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.projectlombok:lombok:1.18.12" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.curator:curator-recipes:4.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.curator:curator-framework:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.curator:curator-client:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.zookeeper:zookeeper:3.5.3-beta" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-cli:commons-cli:1.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.kafka:kafka-clients:2.4.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.luben:zstd-jni:1.4.3-1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.lz4:lz4-java:1.6.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.xerial.snappy:snappy-java:1.1.7.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.scala-lang:scala-library:2.12.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.lmax:disruptor:3.4.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.activation:jakarta.activation-api:1.2.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.vintage:junit-vintage-engine:5.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-junit-jupiter:3.1.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.13.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest:2.1" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:3.1.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy:1.10.8" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.10.8" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.6.3" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -0,0 +1,24 @@
|
||||
<?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>
|
||||
<groupId>com.orange.demo</groupId>
|
||||
<artifactId>application</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>application-common</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<name>application-common</name>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.orange.demo</groupId>
|
||||
<artifactId>common-core</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.orange.demo.application.common.constant;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 设备类型常量字典对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
public final class DeviceType {
|
||||
|
||||
/**
|
||||
* iOS。
|
||||
*/
|
||||
public static final int IOS = 0;
|
||||
/**
|
||||
* Android。
|
||||
*/
|
||||
public static final int ANDROID = 1;
|
||||
/**
|
||||
* PC。
|
||||
*/
|
||||
public static final int PC = 2;
|
||||
|
||||
private static final Map<Object, String> DICT_MAP = new HashMap<>(3);
|
||||
static {
|
||||
DICT_MAP.put(IOS, "iOS");
|
||||
DICT_MAP.put(ANDROID, "Android");
|
||||
DICT_MAP.put(PC, "PC");
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断参数是否为当前常量字典的合法值。
|
||||
*
|
||||
* @param value 待验证的参数值。
|
||||
* @return 合法返回true,否则false。
|
||||
*/
|
||||
public static boolean isValid(Integer value) {
|
||||
return value != null && DICT_MAP.containsKey(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 私有构造函数,明确标识该常量类的作用。
|
||||
*/
|
||||
private DeviceType() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.orange.demo.application.common.constant;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 经验等级常量字典对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
public final class ExpLevel {
|
||||
|
||||
/**
|
||||
* 初级学员。
|
||||
*/
|
||||
public static final int LOWER = 0;
|
||||
/**
|
||||
* 中级学员。
|
||||
*/
|
||||
public static final int MIDDLE = 1;
|
||||
/**
|
||||
* 高级学员。
|
||||
*/
|
||||
public static final int HIGH = 2;
|
||||
|
||||
private static final Map<Object, String> DICT_MAP = new HashMap<>(3);
|
||||
static {
|
||||
DICT_MAP.put(LOWER, "初级学员");
|
||||
DICT_MAP.put(MIDDLE, "中级学员");
|
||||
DICT_MAP.put(HIGH, "高级学员");
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断参数是否为当前常量字典的合法值。
|
||||
*
|
||||
* @param value 待验证的参数值。
|
||||
* @return 合法返回true,否则false。
|
||||
*/
|
||||
public static boolean isValid(Integer value) {
|
||||
return value != null && DICT_MAP.containsKey(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 私有构造函数,明确标识该常量类的作用。
|
||||
*/
|
||||
private ExpLevel() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.orange.demo.application.common.constant;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 性别常量字典对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
public final class Gender {
|
||||
|
||||
/**
|
||||
* 男。
|
||||
*/
|
||||
public static final int MALE = 1;
|
||||
/**
|
||||
* 女。
|
||||
*/
|
||||
public static final int FEMALE = 0;
|
||||
|
||||
private static final Map<Object, String> DICT_MAP = new HashMap<>(2);
|
||||
static {
|
||||
DICT_MAP.put(MALE, "男");
|
||||
DICT_MAP.put(FEMALE, "女");
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断参数是否为当前常量字典的合法值。
|
||||
*
|
||||
* @param value 待验证的参数值。
|
||||
* @return 合法返回true,否则false。
|
||||
*/
|
||||
public static boolean isValid(Integer value) {
|
||||
return value != null && DICT_MAP.containsKey(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 私有构造函数,明确标识该常量类的作用。
|
||||
*/
|
||||
private Gender() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.orange.demo.application.common.constant;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 学生行为常量字典对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
public final class StudentActionType {
|
||||
|
||||
/**
|
||||
* 充值。
|
||||
*/
|
||||
public static final int RECHARGE = 0;
|
||||
/**
|
||||
* 购课。
|
||||
*/
|
||||
public static final int BUY_COURSE = 1;
|
||||
/**
|
||||
* 上课签到。
|
||||
*/
|
||||
public static final int SIGNIN_COURSE = 2;
|
||||
/**
|
||||
* 上课签退。
|
||||
*/
|
||||
public static final int SIGNOUT_COURSE = 3;
|
||||
/**
|
||||
* 看视频课。
|
||||
*/
|
||||
public static final int WATCH_VIDEO = 4;
|
||||
/**
|
||||
* 做作业。
|
||||
*/
|
||||
public static final int DO_PAPER = 5;
|
||||
/**
|
||||
* 刷题。
|
||||
*/
|
||||
public static final int REFRESH_EXERCISE = 6;
|
||||
/**
|
||||
* 献花。
|
||||
*/
|
||||
public static final int PRESENT_FLOWER = 7;
|
||||
/**
|
||||
* 购买视频课。
|
||||
*/
|
||||
public static final int BUY_VIDEO_COURSE = 8;
|
||||
/**
|
||||
* 购买鲜花。
|
||||
*/
|
||||
public static final int BUY_FLOWER = 9;
|
||||
/**
|
||||
* 购买作业。
|
||||
*/
|
||||
public static final int BUY_PAPER = 10;
|
||||
|
||||
private static final Map<Object, String> DICT_MAP = new HashMap<>(11);
|
||||
static {
|
||||
DICT_MAP.put(RECHARGE, "充值");
|
||||
DICT_MAP.put(BUY_COURSE, "购课");
|
||||
DICT_MAP.put(SIGNIN_COURSE, "上课签到");
|
||||
DICT_MAP.put(SIGNOUT_COURSE, "上课签退");
|
||||
DICT_MAP.put(WATCH_VIDEO, "看视频课");
|
||||
DICT_MAP.put(DO_PAPER, "做作业");
|
||||
DICT_MAP.put(REFRESH_EXERCISE, "刷题");
|
||||
DICT_MAP.put(PRESENT_FLOWER, "献花");
|
||||
DICT_MAP.put(BUY_VIDEO_COURSE, "购买视频课");
|
||||
DICT_MAP.put(BUY_FLOWER, "购买鲜花");
|
||||
DICT_MAP.put(BUY_PAPER, "购买作业");
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断参数是否为当前常量字典的合法值。
|
||||
*
|
||||
* @param value 待验证的参数值。
|
||||
* @return 合法返回true,否则false。
|
||||
*/
|
||||
public static boolean isValid(Integer value) {
|
||||
return value != null && DICT_MAP.containsKey(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 私有构造函数,明确标识该常量类的作用。
|
||||
*/
|
||||
private StudentActionType() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.orange.demo.application.common.constant;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 学生状态常量字典对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
public final class StudentStatus {
|
||||
|
||||
/**
|
||||
* 正常。
|
||||
*/
|
||||
public static final int NORMAL = 0;
|
||||
/**
|
||||
* 锁定。
|
||||
*/
|
||||
public static final int LOCKED = 1;
|
||||
/**
|
||||
* 注销。
|
||||
*/
|
||||
public static final int DELETED = 2;
|
||||
|
||||
private static final Map<Object, String> DICT_MAP = new HashMap<>(3);
|
||||
static {
|
||||
DICT_MAP.put(NORMAL, "正常");
|
||||
DICT_MAP.put(LOCKED, "锁定");
|
||||
DICT_MAP.put(DELETED, "注销");
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断参数是否为当前常量字典的合法值。
|
||||
*
|
||||
* @param value 待验证的参数值。
|
||||
* @return 合法返回true,否则false。
|
||||
*/
|
||||
public static boolean isValid(Integer value) {
|
||||
return value != null && DICT_MAP.containsKey(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 私有构造函数,明确标识该常量类的作用。
|
||||
*/
|
||||
private StudentStatus() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.orange.demo.application.common.constant;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 学科常量字典对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
public final class Subject {
|
||||
|
||||
/**
|
||||
* 语文。
|
||||
*/
|
||||
public static final int CHINESE = 0;
|
||||
/**
|
||||
* 数学。
|
||||
*/
|
||||
public static final int MATCH = 1;
|
||||
/**
|
||||
* 英语。
|
||||
*/
|
||||
public static final int ENGLISH = 2;
|
||||
|
||||
private static final Map<Object, String> DICT_MAP = new HashMap<>(3);
|
||||
static {
|
||||
DICT_MAP.put(CHINESE, "语文");
|
||||
DICT_MAP.put(MATCH, "数学");
|
||||
DICT_MAP.put(ENGLISH, "英语");
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断参数是否为当前常量字典的合法值。
|
||||
*
|
||||
* @param value 待验证的参数值。
|
||||
* @return 合法返回true,否则false。
|
||||
*/
|
||||
public static boolean isValid(Integer value) {
|
||||
return value != null && DICT_MAP.containsKey(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 私有构造函数,明确标识该常量类的作用。
|
||||
*/
|
||||
private Subject() {
|
||||
}
|
||||
}
|
||||
193
orange-demo-multi-service-for-app/application/application.iml
Normal file
193
orange-demo-multi-service-for-app/application/application.iml
Normal file
@@ -0,0 +1,193 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-client:1.2.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-common:1.2.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-io:commons-io:2.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-api:1.2.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.58" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:guava:28.2-android" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:failureaccess:1.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.checkerframework:checker-compat-qual:2.5.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.3.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.j2objc:j2objc-annotations:1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.prometheus:simpleclient:0.5.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.spring:spring-context-support:1.0.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-ribbon:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon:2.3.0" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.ribbon:ribbon-transport:2.3.0" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-contexts:0.4.9" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-servo:0.4.9" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: javax.inject:javax.inject:1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty:0.4.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-core:2.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-httpclient:2.3.0" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-client:1.19.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-core:1.19.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: javax.ws.rs:jsr311-api:1.1.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey.contribs:jersey-apache-client4:1.19.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.servo:servo-core:0.12.21" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-commons-util:0.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-loadbalancer:2.3.0" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-statistics:0.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.reactivex:rxjava:1.3.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-sentinel:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-transport-simple-http:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-transport-common:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-annotation-aspectj:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-core:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.aspectj:aspectjrt:1.9.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-circuitbreaker-sentinel:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-reactor-adapter:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-spring-webflux-adapter:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-spring-webmvc-adapter:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-parameter-flow-control:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-cluster-server-default:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-cluster-common-default:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-common:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-cluster-client-default:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-alibaba-sentinel-datasource:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.codehaus.woodstox:stax2-api:4.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.woodstox:woodstox-core:5.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-datasource-nacos:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-datasource-extension:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-freemarker:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.freemarker:freemarker:2.3.29" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-log4j2:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-slf4j-impl:2.12.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.12.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-core:2.12.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-jul:2.12.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-cache:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-configuration-processor:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-actuator:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator-autoconfigure:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.micrometer:micrometer-core:1.3.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.latencyutils:LatencyUtils:2.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: de.codecentric:spring-boot-admin-starter-client:2.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: de.codecentric:spring-boot-admin-client:2.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-config:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-openfeign:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.59" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.59" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-openfeign-core:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form-spring:3.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form:3.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.3.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-core:10.7.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-slf4j:10.7.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-hystrix:10.7.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.archaius:archaius-core:0.7.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-httpclient:10.7.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-hystrix:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-hystrix:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-ribbon:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-archaius:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-archaius:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-core:1.5.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-serialization:1.5.18" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.fasterxml.jackson.module:jackson-module-afterburner:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-metrics-event-stream:1.5.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-javanica:1.5.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.9" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.reactivex:rxjava-reactive-streams:1.2.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.3.1.Final" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.mapstruct:mapstruct-processor:1.3.1.Final" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.projectlombok:lombok:1.18.12" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.curator:curator-recipes:4.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.curator:curator-framework:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.curator:curator-client:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.zookeeper:zookeeper:3.5.3-beta" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-cli:commons-cli:1.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.kafka:kafka-clients:2.4.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.luben:zstd-jni:1.4.3-1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.lz4:lz4-java:1.6.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.xerial.snappy:snappy-java:1.1.7.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.scala-lang:scala-library:2.12.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.lmax:disruptor:3.4.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.activation:jakarta.activation-api:1.2.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.vintage:junit-vintage-engine:5.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-junit-jupiter:3.1.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.13.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest:2.1" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:3.1.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy:1.10.8" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.10.8" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.6.3" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -0,0 +1,278 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="Spring" name="Spring">
|
||||
<configuration />
|
||||
</facet>
|
||||
<facet type="web" name="Web">
|
||||
<configuration>
|
||||
<webroots />
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="application-common" />
|
||||
<orderEntry type="module" module-name="common-core" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.31" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.31" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.31" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-validation:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.18.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.1.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:guava:28.2-android" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:failureaccess:1.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.checkerframework:checker-compat-qual:2.5.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.3.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.j2objc:j2objc-annotations:1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-io:commons-io:2.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.3.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: joda-time:joda-time:2.10.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-csv:1.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.4.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.jsonwebtoken:jjwt:0.9.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.74" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.ben-manes.caffeine:caffeine:2.8.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.checkerframework:checker-qual:3.1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.jimmyshi:bean-query:1.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest-all:1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:3.17" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.poi:poi:3.17" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:3.17" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:2.6.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: stax:stax-api:1.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.04" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: mysql:mysql-connector-java:8.0.19" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:druid-spring-boot-starter:1.1.22" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:druid:1.1.22" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-spring-boot-starter:2.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.4.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:1.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-core:1.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.persistence:persistence-api:1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-base:1.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-weekend:1.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-spring:1.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-extra:1.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-spring-boot-autoconfigure:2.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-starter:1.2.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:2.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:2.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.2.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:2.0" level="project" />
|
||||
<orderEntry type="module" module-name="common-swagger" />
|
||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-micro-spring-boot-starter:2.0.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-spring-boot-autoconfigure:2.0.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-spring:2.0.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-annotations:2.0.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-core:2.0.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.25.0-GA" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.22" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.22" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-core:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-bean-validators:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-client:1.2.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-common:1.2.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-api:1.2.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.prometheus:simpleclient:0.5.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.spring:spring-context-support:1.0.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-ribbon:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon:2.3.0" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.ribbon:ribbon-transport:2.3.0" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-contexts:0.4.9" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-servo:0.4.9" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: javax.inject:javax.inject:1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty:0.4.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-core:2.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-httpclient:2.3.0" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-client:1.19.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-core:1.19.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: javax.ws.rs:jsr311-api:1.1.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey.contribs:jersey-apache-client4:1.19.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.servo:servo-core:0.12.21" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-commons-util:0.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-loadbalancer:2.3.0" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-statistics:0.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.reactivex:rxjava:1.3.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-sentinel:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-transport-simple-http:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-transport-common:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-annotation-aspectj:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-core:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.aspectj:aspectjrt:1.9.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-circuitbreaker-sentinel:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-reactor-adapter:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-spring-webflux-adapter:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-spring-webmvc-adapter:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-parameter-flow-control:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-cluster-server-default:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-cluster-common-default:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-common:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-cluster-client-default:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-alibaba-sentinel-datasource:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.codehaus.woodstox:stax2-api:4.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.woodstox:woodstox-core:5.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-datasource-nacos:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-datasource-extension:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-freemarker:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.freemarker:freemarker:2.3.29" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-log4j2:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-slf4j-impl:2.12.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.12.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-core:2.12.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-jul:2.12.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-cache:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-configuration-processor:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-actuator:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator-autoconfigure:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.micrometer:micrometer-core:1.3.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.latencyutils:LatencyUtils:2.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: de.codecentric:spring-boot-admin-starter-client:2.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: de.codecentric:spring-boot-admin-client:2.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-config:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-openfeign:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.59" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.59" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-openfeign-core:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form-spring:3.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form:3.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-core:10.7.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-slf4j:10.7.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-hystrix:10.7.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.archaius:archaius-core:0.7.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-httpclient:10.7.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-hystrix:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-hystrix:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-ribbon:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-archaius:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-archaius:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-core:1.5.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-serialization:1.5.18" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.fasterxml.jackson.module:jackson-module-afterburner:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-metrics-event-stream:1.5.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-javanica:1.5.18" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.reactivex:rxjava-reactive-streams:1.2.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.3.1.Final" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.mapstruct:mapstruct-processor:1.3.1.Final" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.projectlombok:lombok:1.18.12" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.curator:curator-recipes:4.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.curator:curator-framework:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.curator:curator-client:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.zookeeper:zookeeper:3.5.3-beta" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-cli:commons-cli:1.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.kafka:kafka-clients:2.4.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.luben:zstd-jni:1.4.3-1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.lz4:lz4-java:1.6.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.xerial.snappy:snappy-java:1.1.7.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.scala-lang:scala-library:2.12.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.lmax:disruptor:3.4.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.activation:jakarta.activation-api:1.2.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.vintage:junit-vintage-engine:5.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-junit-jupiter:3.1.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.13.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest:2.1" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:3.1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.10.8" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.10.8" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.6.3" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -0,0 +1,36 @@
|
||||
<?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>
|
||||
<groupId>com.orange.demo</groupId>
|
||||
<artifactId>course-class</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>course-class-interface</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<name>course-class-interface</name>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
<!-- 通用业务依赖 -->
|
||||
<dependency>
|
||||
<groupId>com.orange.demo</groupId>
|
||||
<artifactId>application-common</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
<!-- 通用组件依赖 -->
|
||||
<dependency>
|
||||
<groupId>com.orange.demo</groupId>
|
||||
<artifactId>common-core</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
<!-- knife4j 接口文档框架 -->
|
||||
<dependency>
|
||||
<groupId>com.orange.demo</groupId>
|
||||
<artifactId>common-swagger</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,158 @@
|
||||
package com.orange.demo.courseclassinterface.client;
|
||||
|
||||
import com.orange.demo.common.core.base.client.BaseClient;
|
||||
import com.orange.demo.common.core.constant.ErrorCodeEnum;
|
||||
import com.orange.demo.common.core.object.MyQueryParam;
|
||||
import com.orange.demo.common.core.object.ResponseResult;
|
||||
import com.orange.demo.courseclassinterface.dto.AreaCodeDto;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 行政区划远程访问接口类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@FeignClient(name = "system-service", fallbackFactory = AreaCodeClient.AreaCodeClientFallbackFactory.class)
|
||||
public interface AreaCodeClient extends BaseClient<AreaCodeDto, Long> {
|
||||
|
||||
/**
|
||||
* 根据主键Id集合,返回给定的数据集合。
|
||||
*
|
||||
* @param areaCodeIds 待获取的主键Id列表。
|
||||
* @param withDict 是否包含字典关联。
|
||||
* @return 获取的对象列表。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/areaCode/listByIds")
|
||||
ResponseResult<List<AreaCodeDto>> listByIds(
|
||||
@RequestParam("areaCodeIds") Set<Long> areaCodeIds,
|
||||
@RequestParam("withDict") Boolean withDict);
|
||||
|
||||
/**
|
||||
* 根据主键Id返回给定的数据。
|
||||
*
|
||||
* @param areaId 待获取的主键Id。
|
||||
* @param withDict 是否获取表实体关联的字典数据。
|
||||
* @return 获取的对象。
|
||||
*/
|
||||
@Override
|
||||
@GetMapping("/areaCode/getById")
|
||||
ResponseResult<AreaCodeDto> getById(
|
||||
@RequestParam("areaId") Long areaId,
|
||||
@RequestParam("withDict") Boolean withDict);
|
||||
|
||||
/**
|
||||
* 判断参数列表中指定的主键Id,是否全部存在。
|
||||
*
|
||||
* @param areaIds 主键Id。
|
||||
* @return 应答结果对象,包含true全部存在,否则false。
|
||||
*/
|
||||
@Override
|
||||
@GetMapping("/areaCode/existIds")
|
||||
ResponseResult<Boolean> existIds(@RequestParam("areaIds") Set<Long> areaIds);
|
||||
|
||||
/**
|
||||
* 给定主键Id是否存在。
|
||||
*
|
||||
* @param areaId 参数主键Id。
|
||||
* @return 应答结果对象,包含true,否则false。
|
||||
*/
|
||||
@Override
|
||||
@GetMapping("/areaCode/existId")
|
||||
ResponseResult<Boolean> existId(@RequestParam("areaId") Long areaId);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据列表。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含实体对象集合。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/areaCode/listBy")
|
||||
ResponseResult<List<AreaCodeDto>> listBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的单条数据对象。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含实体对象。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/areaCode/getBy")
|
||||
ResponseResult<AreaCodeDto> getBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 以id、name的形式返回所有字典数据的列表。
|
||||
*
|
||||
* @return 字典数据列表,返回形式为 List<Map<String, Object>>,map中包含两条记录,分别是id和name。
|
||||
*/
|
||||
@PostMapping("/areaCode/listDictAreaCode")
|
||||
ResponseResult<List<Map<String, Object>>> listDictAreaCode();
|
||||
|
||||
/**
|
||||
* 以id、name的形式返回所有字典数据的列表。
|
||||
*
|
||||
* @param parentId 主键的ParentId,用于对主键数据进行过滤。
|
||||
* @return 字典数据列表,返回形式为 List<Map<String, Object>>,map中包含两条记录,分别是id和name。
|
||||
*/
|
||||
@PostMapping("/areaCode/listDictAreaCodeByParentId")
|
||||
ResponseResult<List<Map<String, Object>>> listDictAreaCodeByParentId(@RequestParam("parentId") Long parentId);
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
class AreaCodeClientFallbackFactory implements FallbackFactory<AreaCodeClient>, AreaCodeClient {
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<AreaCodeDto>> listByIds(Set<Long> areaCodeIds, Boolean withDict) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<AreaCodeDto> getById(Long areaId, Boolean withDict) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<Boolean> existIds(Set<Long> areaIds) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<Boolean> existId(Long areaId) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<AreaCodeDto>> listBy(MyQueryParam queryParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<AreaCodeDto> getBy(MyQueryParam queryParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<Map<String, Object>>> listDictAreaCode() {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<Map<String, Object>>> listDictAreaCodeByParentId(Long parentId) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AreaCodeClient create(Throwable throwable) {
|
||||
log.error("Exception For Feign Remote Call.", throwable);
|
||||
return new AreaCodeClientFallbackFactory();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,182 @@
|
||||
package com.orange.demo.courseclassinterface.client;
|
||||
|
||||
import com.orange.demo.common.core.config.FeignConfig;
|
||||
import com.orange.demo.common.core.base.client.BaseClient;
|
||||
import com.orange.demo.common.core.constant.ErrorCodeEnum;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.courseclassinterface.dto.CourseDto;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 课程数据服务远程数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@FeignClient(
|
||||
name = "course-class",
|
||||
configuration = FeignConfig.class,
|
||||
fallbackFactory = CourseClient.CourseClientFallbackFactory.class)
|
||||
public interface CourseClient extends BaseClient<CourseDto, Long> {
|
||||
|
||||
/**
|
||||
* 基于主键的(In-list)条件获取远程数据接口。
|
||||
*
|
||||
* @param courseIds 主键Id集合。
|
||||
* @param withDict 是否包含字典关联。
|
||||
* @return 应答结果对象,包含主对象的数据集合。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/course/listByIds")
|
||||
ResponseResult<List<CourseDto>> listByIds(
|
||||
@RequestParam("courseIds") Set<Long> courseIds,
|
||||
@RequestParam("withDict") Boolean withDict);
|
||||
|
||||
/**
|
||||
* 基于主键Id,获取远程对象。
|
||||
*
|
||||
* @param courseId 主键Id。
|
||||
* @param withDict 是否包含字典关联。
|
||||
* @return 应答结果对象,包含主对象数据。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/course/getById")
|
||||
ResponseResult<CourseDto> getById(
|
||||
@RequestParam("courseId") Long courseId,
|
||||
@RequestParam("withDict") Boolean withDict);
|
||||
|
||||
/**
|
||||
* 判断参数列表中指定的主键Id,是否都存在。
|
||||
*
|
||||
* @param courseIds 主键Id集合。
|
||||
* @return 应答结果对象,包含true全部存在,否则false。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/course/existIds")
|
||||
ResponseResult<Boolean> existIds(@RequestParam("courseIds") Set<Long> courseIds);
|
||||
|
||||
/**
|
||||
* 判断主键Id是否存在。
|
||||
*
|
||||
* @param courseId 参数主键Id。
|
||||
* @return 应答结果对象,包含true表示存在,否则false。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/course/existId")
|
||||
ResponseResult<Boolean> existId(@RequestParam("courseId") Long courseId);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据列表。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含实体对象集合。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/course/listBy")
|
||||
ResponseResult<List<CourseDto>> listBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的单条数据对象。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含实体对象。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/course/getBy")
|
||||
ResponseResult<CourseDto> getBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据列表。
|
||||
* 和listBy接口相比,以Map列表的方式返回的主要目的是,降低服务之间的耦合度。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含主对象集合。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/course/listMapBy")
|
||||
ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据数量。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含结果数量。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/course/countBy")
|
||||
ResponseResult<Integer> countBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程对象中符合查询条件的分组聚合计算Map列表。
|
||||
*
|
||||
* @param aggregationParam 聚合参数。
|
||||
* @return 应该结果对象,包含聚合计算后的分组Map列表。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/course/aggregateBy")
|
||||
ResponseResult<List<Map<String, Object>>> aggregateBy(@RequestBody MyAggregationParam aggregationParam);
|
||||
|
||||
@Component("CourseClassCourseClientFallbackFactory")
|
||||
@Slf4j
|
||||
class CourseClientFallbackFactory implements FallbackFactory<CourseClient>, CourseClient {
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<CourseDto>> listByIds(
|
||||
Set<Long> courseIds, Boolean withDict) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<CourseDto> getById(
|
||||
Long courseId, Boolean withDict) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<Boolean> existIds(Set<Long> courseIds) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<Boolean> existId(Long courseId) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<CourseDto>> listBy(MyQueryParam queryParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<CourseDto> getBy(MyQueryParam queryParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<Map<String, Object>>> listMapBy(MyQueryParam queryParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<Integer> countBy(MyQueryParam queryParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<Map<String, Object>>> aggregateBy(MyAggregationParam aggregationParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CourseClient create(Throwable throwable) {
|
||||
log.error("Exception For Feign Remote Call.", throwable);
|
||||
return new CourseClientFallbackFactory();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
package com.orange.demo.courseclassinterface.client;
|
||||
|
||||
import com.orange.demo.common.core.config.FeignConfig;
|
||||
import com.orange.demo.common.core.base.client.BaseClient;
|
||||
import com.orange.demo.common.core.constant.ErrorCodeEnum;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.courseclassinterface.dto.GradeDto;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 服务远程数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@FeignClient(
|
||||
name = "course-class",
|
||||
configuration = FeignConfig.class,
|
||||
fallbackFactory = GradeClient.GradeClientFallbackFactory.class)
|
||||
public interface GradeClient extends BaseClient<GradeDto, Integer> {
|
||||
|
||||
/**
|
||||
* 基于主键的(in list)条件获取远程数据接口。
|
||||
*
|
||||
* @param gradeIds 主键Id集合。
|
||||
* @param withDict 是否包含字典关联。
|
||||
* @return 应答结果对象,包含主对象的数据集合。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/grade/listByIds")
|
||||
ResponseResult<List<GradeDto>> listByIds(
|
||||
@RequestParam("gradeIds") Set<Integer> gradeIds,
|
||||
@RequestParam("withDict") Boolean withDict);
|
||||
|
||||
/**
|
||||
* 基于主键Id,获取远程对象。
|
||||
*
|
||||
* @param gradeId 主键Id。
|
||||
* @param withDict 是否包含字典关联。
|
||||
* @return 应答结果对象,包含主对象数据。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/grade/getById")
|
||||
ResponseResult<GradeDto> getById(
|
||||
@RequestParam("gradeId") Integer gradeId,
|
||||
@RequestParam("withDict") Boolean withDict);
|
||||
|
||||
/**
|
||||
* 判断参数列表中指定的主键Id,是否全部存在。
|
||||
*
|
||||
* @param gradeIds 主键Id集合。
|
||||
* @return 应答结果对象,包含true全部存在,否则false。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/grade/existIds")
|
||||
ResponseResult<Boolean> existIds(Set<Integer> gradeIds);
|
||||
|
||||
/**
|
||||
* 给定主键Id是否存在。
|
||||
*
|
||||
* @param gradeId 参数主键Id。
|
||||
* @return 应答结果对象,包含true表示存在,否则false。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/grade/existId")
|
||||
ResponseResult<Boolean> existId(@RequestParam("gradeId") Integer gradeId);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据列表。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含实体对象集合。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/grade/listBy")
|
||||
ResponseResult<List<GradeDto>> listBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的单条数据对象。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含实体对象。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/grade/getBy")
|
||||
ResponseResult<GradeDto> getBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
@Component("CourseClassGradeClientFallbackFactory")
|
||||
@Slf4j
|
||||
class GradeClientFallbackFactory implements FallbackFactory<GradeClient>, GradeClient {
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<GradeDto>> listByIds(
|
||||
Set<Integer> gradeIds, Boolean withDict) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<GradeDto> getById(
|
||||
Integer gradeId, Boolean withDict) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<Boolean> existIds(Set<Integer> gradeIds) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<Boolean> existId(Integer gradeId) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<GradeDto>> listBy(MyQueryParam queryParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<GradeDto> getBy(MyQueryParam queryParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GradeClient create(Throwable throwable) {
|
||||
log.error("Exception For Feign Remote Call.", throwable);
|
||||
return new GradeClientFallbackFactory();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,182 @@
|
||||
package com.orange.demo.courseclassinterface.client;
|
||||
|
||||
import com.orange.demo.common.core.config.FeignConfig;
|
||||
import com.orange.demo.common.core.base.client.BaseClient;
|
||||
import com.orange.demo.common.core.constant.ErrorCodeEnum;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.courseclassinterface.dto.SchoolInfoDto;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 校区数据服务远程数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@FeignClient(
|
||||
name = "course-class",
|
||||
configuration = FeignConfig.class,
|
||||
fallbackFactory = SchoolInfoClient.SchoolInfoClientFallbackFactory.class)
|
||||
public interface SchoolInfoClient extends BaseClient<SchoolInfoDto, Long> {
|
||||
|
||||
/**
|
||||
* 基于主键的(In-list)条件获取远程数据接口。
|
||||
*
|
||||
* @param schoolIds 主键Id集合。
|
||||
* @param withDict 是否包含字典关联。
|
||||
* @return 应答结果对象,包含主对象的数据集合。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/schoolInfo/listByIds")
|
||||
ResponseResult<List<SchoolInfoDto>> listByIds(
|
||||
@RequestParam("schoolIds") Set<Long> schoolIds,
|
||||
@RequestParam("withDict") Boolean withDict);
|
||||
|
||||
/**
|
||||
* 基于主键Id,获取远程对象。
|
||||
*
|
||||
* @param schoolId 主键Id。
|
||||
* @param withDict 是否包含字典关联。
|
||||
* @return 应答结果对象,包含主对象数据。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/schoolInfo/getById")
|
||||
ResponseResult<SchoolInfoDto> getById(
|
||||
@RequestParam("schoolId") Long schoolId,
|
||||
@RequestParam("withDict") Boolean withDict);
|
||||
|
||||
/**
|
||||
* 判断参数列表中指定的主键Id,是否都存在。
|
||||
*
|
||||
* @param schoolIds 主键Id集合。
|
||||
* @return 应答结果对象,包含true全部存在,否则false。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/schoolInfo/existIds")
|
||||
ResponseResult<Boolean> existIds(@RequestParam("schoolIds") Set<Long> schoolIds);
|
||||
|
||||
/**
|
||||
* 判断主键Id是否存在。
|
||||
*
|
||||
* @param schoolId 参数主键Id。
|
||||
* @return 应答结果对象,包含true表示存在,否则false。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/schoolInfo/existId")
|
||||
ResponseResult<Boolean> existId(@RequestParam("schoolId") Long schoolId);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据列表。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含实体对象集合。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/schoolInfo/listBy")
|
||||
ResponseResult<List<SchoolInfoDto>> listBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的单条数据对象。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含实体对象。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/schoolInfo/getBy")
|
||||
ResponseResult<SchoolInfoDto> getBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据列表。
|
||||
* 和listBy接口相比,以Map列表的方式返回的主要目的是,降低服务之间的耦合度。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含主对象集合。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/schoolInfo/listMapBy")
|
||||
ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据数量。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含结果数量。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/schoolInfo/countBy")
|
||||
ResponseResult<Integer> countBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程对象中符合查询条件的分组聚合计算Map列表。
|
||||
*
|
||||
* @param aggregationParam 聚合参数。
|
||||
* @return 应该结果对象,包含聚合计算后的分组Map列表。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/schoolInfo/aggregateBy")
|
||||
ResponseResult<List<Map<String, Object>>> aggregateBy(@RequestBody MyAggregationParam aggregationParam);
|
||||
|
||||
@Component("CourseClassSchoolInfoClientFallbackFactory")
|
||||
@Slf4j
|
||||
class SchoolInfoClientFallbackFactory implements FallbackFactory<SchoolInfoClient>, SchoolInfoClient {
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<SchoolInfoDto>> listByIds(
|
||||
Set<Long> schoolIds, Boolean withDict) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<SchoolInfoDto> getById(
|
||||
Long schoolId, Boolean withDict) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<Boolean> existIds(Set<Long> schoolIds) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<Boolean> existId(Long schoolId) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<SchoolInfoDto>> listBy(MyQueryParam queryParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<SchoolInfoDto> getBy(MyQueryParam queryParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<Map<String, Object>>> listMapBy(MyQueryParam queryParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<Integer> countBy(MyQueryParam queryParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<Map<String, Object>>> aggregateBy(MyAggregationParam aggregationParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SchoolInfoClient create(Throwable throwable) {
|
||||
log.error("Exception For Feign Remote Call.", throwable);
|
||||
return new SchoolInfoClientFallbackFactory();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,182 @@
|
||||
package com.orange.demo.courseclassinterface.client;
|
||||
|
||||
import com.orange.demo.common.core.config.FeignConfig;
|
||||
import com.orange.demo.common.core.base.client.BaseClient;
|
||||
import com.orange.demo.common.core.constant.ErrorCodeEnum;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.courseclassinterface.dto.StudentClassDto;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 班级数据服务远程数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@FeignClient(
|
||||
name = "course-class",
|
||||
configuration = FeignConfig.class,
|
||||
fallbackFactory = StudentClassClient.StudentClassClientFallbackFactory.class)
|
||||
public interface StudentClassClient extends BaseClient<StudentClassDto, Long> {
|
||||
|
||||
/**
|
||||
* 基于主键的(In-list)条件获取远程数据接口。
|
||||
*
|
||||
* @param classIds 主键Id集合。
|
||||
* @param withDict 是否包含字典关联。
|
||||
* @return 应答结果对象,包含主对象的数据集合。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentClass/listByIds")
|
||||
ResponseResult<List<StudentClassDto>> listByIds(
|
||||
@RequestParam("classIds") Set<Long> classIds,
|
||||
@RequestParam("withDict") Boolean withDict);
|
||||
|
||||
/**
|
||||
* 基于主键Id,获取远程对象。
|
||||
*
|
||||
* @param classId 主键Id。
|
||||
* @param withDict 是否包含字典关联。
|
||||
* @return 应答结果对象,包含主对象数据。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentClass/getById")
|
||||
ResponseResult<StudentClassDto> getById(
|
||||
@RequestParam("classId") Long classId,
|
||||
@RequestParam("withDict") Boolean withDict);
|
||||
|
||||
/**
|
||||
* 判断参数列表中指定的主键Id,是否都存在。
|
||||
*
|
||||
* @param classIds 主键Id集合。
|
||||
* @return 应答结果对象,包含true全部存在,否则false。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentClass/existIds")
|
||||
ResponseResult<Boolean> existIds(@RequestParam("classIds") Set<Long> classIds);
|
||||
|
||||
/**
|
||||
* 判断主键Id是否存在。
|
||||
*
|
||||
* @param classId 参数主键Id。
|
||||
* @return 应答结果对象,包含true表示存在,否则false。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentClass/existId")
|
||||
ResponseResult<Boolean> existId(@RequestParam("classId") Long classId);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据列表。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含实体对象集合。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentClass/listBy")
|
||||
ResponseResult<List<StudentClassDto>> listBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的单条数据对象。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含实体对象。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentClass/getBy")
|
||||
ResponseResult<StudentClassDto> getBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据列表。
|
||||
* 和listBy接口相比,以Map列表的方式返回的主要目的是,降低服务之间的耦合度。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含主对象集合。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentClass/listMapBy")
|
||||
ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据数量。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含结果数量。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentClass/countBy")
|
||||
ResponseResult<Integer> countBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程对象中符合查询条件的分组聚合计算Map列表。
|
||||
*
|
||||
* @param aggregationParam 聚合参数。
|
||||
* @return 应该结果对象,包含聚合计算后的分组Map列表。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentClass/aggregateBy")
|
||||
ResponseResult<List<Map<String, Object>>> aggregateBy(@RequestBody MyAggregationParam aggregationParam);
|
||||
|
||||
@Component("CourseClassStudentClassClientFallbackFactory")
|
||||
@Slf4j
|
||||
class StudentClassClientFallbackFactory implements FallbackFactory<StudentClassClient>, StudentClassClient {
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<StudentClassDto>> listByIds(
|
||||
Set<Long> classIds, Boolean withDict) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<StudentClassDto> getById(
|
||||
Long classId, Boolean withDict) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<Boolean> existIds(Set<Long> classIds) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<Boolean> existId(Long classId) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<StudentClassDto>> listBy(MyQueryParam queryParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<StudentClassDto> getBy(MyQueryParam queryParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<Map<String, Object>>> listMapBy(MyQueryParam queryParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<Integer> countBy(MyQueryParam queryParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<Map<String, Object>>> aggregateBy(MyAggregationParam aggregationParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StudentClassClient create(Throwable throwable) {
|
||||
log.error("Exception For Feign Remote Call.", throwable);
|
||||
return new StudentClassClientFallbackFactory();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,182 @@
|
||||
package com.orange.demo.courseclassinterface.client;
|
||||
|
||||
import com.orange.demo.common.core.config.FeignConfig;
|
||||
import com.orange.demo.common.core.base.client.BaseClient;
|
||||
import com.orange.demo.common.core.constant.ErrorCodeEnum;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.courseclassinterface.dto.StudentDto;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 学生数据服务远程数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@FeignClient(
|
||||
name = "course-class",
|
||||
configuration = FeignConfig.class,
|
||||
fallbackFactory = StudentClient.StudentClientFallbackFactory.class)
|
||||
public interface StudentClient extends BaseClient<StudentDto, Long> {
|
||||
|
||||
/**
|
||||
* 基于主键的(In-list)条件获取远程数据接口。
|
||||
*
|
||||
* @param studentIds 主键Id集合。
|
||||
* @param withDict 是否包含字典关联。
|
||||
* @return 应答结果对象,包含主对象的数据集合。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/student/listByIds")
|
||||
ResponseResult<List<StudentDto>> listByIds(
|
||||
@RequestParam("studentIds") Set<Long> studentIds,
|
||||
@RequestParam("withDict") Boolean withDict);
|
||||
|
||||
/**
|
||||
* 基于主键Id,获取远程对象。
|
||||
*
|
||||
* @param studentId 主键Id。
|
||||
* @param withDict 是否包含字典关联。
|
||||
* @return 应答结果对象,包含主对象数据。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/student/getById")
|
||||
ResponseResult<StudentDto> getById(
|
||||
@RequestParam("studentId") Long studentId,
|
||||
@RequestParam("withDict") Boolean withDict);
|
||||
|
||||
/**
|
||||
* 判断参数列表中指定的主键Id,是否都存在。
|
||||
*
|
||||
* @param studentIds 主键Id集合。
|
||||
* @return 应答结果对象,包含true全部存在,否则false。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/student/existIds")
|
||||
ResponseResult<Boolean> existIds(@RequestParam("studentIds") Set<Long> studentIds);
|
||||
|
||||
/**
|
||||
* 判断主键Id是否存在。
|
||||
*
|
||||
* @param studentId 参数主键Id。
|
||||
* @return 应答结果对象,包含true表示存在,否则false。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/student/existId")
|
||||
ResponseResult<Boolean> existId(@RequestParam("studentId") Long studentId);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据列表。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含实体对象集合。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/student/listBy")
|
||||
ResponseResult<List<StudentDto>> listBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的单条数据对象。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含实体对象。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/student/getBy")
|
||||
ResponseResult<StudentDto> getBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据列表。
|
||||
* 和listBy接口相比,以Map列表的方式返回的主要目的是,降低服务之间的耦合度。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含主对象集合。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/student/listMapBy")
|
||||
ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据数量。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含结果数量。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/student/countBy")
|
||||
ResponseResult<Integer> countBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程对象中符合查询条件的分组聚合计算Map列表。
|
||||
*
|
||||
* @param aggregationParam 聚合参数。
|
||||
* @return 应该结果对象,包含聚合计算后的分组Map列表。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/student/aggregateBy")
|
||||
ResponseResult<List<Map<String, Object>>> aggregateBy(@RequestBody MyAggregationParam aggregationParam);
|
||||
|
||||
@Component("CourseClassStudentClientFallbackFactory")
|
||||
@Slf4j
|
||||
class StudentClientFallbackFactory implements FallbackFactory<StudentClient>, StudentClient {
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<StudentDto>> listByIds(
|
||||
Set<Long> studentIds, Boolean withDict) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<StudentDto> getById(
|
||||
Long studentId, Boolean withDict) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<Boolean> existIds(Set<Long> studentIds) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<Boolean> existId(Long studentId) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<StudentDto>> listBy(MyQueryParam queryParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<StudentDto> getBy(MyQueryParam queryParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<Map<String, Object>>> listMapBy(MyQueryParam queryParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<Integer> countBy(MyQueryParam queryParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<Map<String, Object>>> aggregateBy(MyAggregationParam aggregationParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StudentClient create(Throwable throwable) {
|
||||
log.error("Exception For Feign Remote Call.", throwable);
|
||||
return new StudentClientFallbackFactory();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.orange.demo.courseclassinterface.constant;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 班级级别常量字典对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
public final class ClassLevel {
|
||||
|
||||
/**
|
||||
* 初级班。
|
||||
*/
|
||||
public static final int NORMAL = 0;
|
||||
/**
|
||||
* 中级班。
|
||||
*/
|
||||
public static final int MIDDLE = 1;
|
||||
/**
|
||||
* 高级班。
|
||||
*/
|
||||
public static final int HIGH = 2;
|
||||
|
||||
private static final Map<Object, String> DICT_MAP = new HashMap<>(3);
|
||||
static {
|
||||
DICT_MAP.put(NORMAL, "初级班");
|
||||
DICT_MAP.put(MIDDLE, "中级班");
|
||||
DICT_MAP.put(HIGH, "高级班");
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断参数是否为当前常量字典的合法值。
|
||||
*
|
||||
* @param value 待验证的参数值。
|
||||
* @return 合法返回true,否则false。
|
||||
*/
|
||||
public static boolean isValid(Integer value) {
|
||||
return value != null && DICT_MAP.containsKey(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 私有构造函数,明确标识该常量类的作用。
|
||||
*/
|
||||
private ClassLevel() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.orange.demo.courseclassinterface.constant;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 班级状态常量字典对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
public final class ClassStatus {
|
||||
|
||||
/**
|
||||
* 正常。
|
||||
*/
|
||||
public static final int NORAML = 1;
|
||||
/**
|
||||
* 解散。
|
||||
*/
|
||||
public static final int DELETED = -1;
|
||||
|
||||
private static final Map<Object, String> DICT_MAP = new HashMap<>(2);
|
||||
static {
|
||||
DICT_MAP.put(NORAML, "正常");
|
||||
DICT_MAP.put(DELETED, "解散");
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断参数是否为当前常量字典的合法值。
|
||||
*
|
||||
* @param value 待验证的参数值。
|
||||
* @return 合法返回true,否则false。
|
||||
*/
|
||||
public static boolean isValid(Integer value) {
|
||||
return value != null && DICT_MAP.containsKey(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 私有构造函数,明确标识该常量类的作用。
|
||||
*/
|
||||
private ClassStatus() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.orange.demo.courseclassinterface.constant;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 课程难度常量字典对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
public final class CourseDifficult {
|
||||
|
||||
/**
|
||||
* 容易。
|
||||
*/
|
||||
public static final int NORMAL = 0;
|
||||
/**
|
||||
* 普通。
|
||||
*/
|
||||
public static final int MIDDLE = 1;
|
||||
/**
|
||||
* 困难。
|
||||
*/
|
||||
public static final int HIGH = 2;
|
||||
|
||||
private static final Map<Object, String> DICT_MAP = new HashMap<>(3);
|
||||
static {
|
||||
DICT_MAP.put(NORMAL, "容易");
|
||||
DICT_MAP.put(MIDDLE, "普通");
|
||||
DICT_MAP.put(HIGH, "困难");
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断参数是否为当前常量字典的合法值。
|
||||
*
|
||||
* @param value 待验证的参数值。
|
||||
* @return 合法返回true,否则false。
|
||||
*/
|
||||
public static boolean isValid(Integer value) {
|
||||
return value != null && DICT_MAP.containsKey(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 私有构造函数,明确标识该常量类的作用。
|
||||
*/
|
||||
private CourseDifficult() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.orange.demo.courseclassinterface.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 行政区划Dto。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@ApiModel("行政区划实体对象")
|
||||
@Data
|
||||
public class AreaCodeDto {
|
||||
|
||||
/**
|
||||
* 行政区划主键Id
|
||||
*/
|
||||
@ApiModelProperty(value = "行政区划主键Id", required = true)
|
||||
private Long areaId;
|
||||
|
||||
/**
|
||||
* 行政区划名称
|
||||
*/
|
||||
@ApiModelProperty(value = "行政区划名称")
|
||||
private String areaName;
|
||||
|
||||
/**
|
||||
* 行政区划级别 (1: 省级别 2: 市级别 3: 区级别)
|
||||
*/
|
||||
@ApiModelProperty(value = "行政区划级别")
|
||||
private Integer areaLevel;
|
||||
|
||||
/**
|
||||
* 父级行政区划Id
|
||||
*/
|
||||
@ApiModelProperty(value = "父级行政区划Id")
|
||||
private Long parentId;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.orange.demo.courseclassinterface.dto;
|
||||
|
||||
import com.orange.demo.common.core.validator.UpdateGroup;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* ClassCourseDto对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Data
|
||||
public class ClassCourseDto {
|
||||
|
||||
/**
|
||||
* 班级Id。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,班级Id不能为空!", groups = {UpdateGroup.class})
|
||||
private Long classId;
|
||||
|
||||
/**
|
||||
* 课程Id。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,课程Id不能为空!", groups = {UpdateGroup.class})
|
||||
private Long courseId;
|
||||
|
||||
/**
|
||||
* 课程顺序(数值越小越靠前)。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,课程顺序(数值越小越靠前)不能为空!", groups = {UpdateGroup.class})
|
||||
private Integer courseOrder;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.orange.demo.courseclassinterface.dto;
|
||||
|
||||
import com.orange.demo.common.core.validator.UpdateGroup;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* ClassStudentDto对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Data
|
||||
public class ClassStudentDto {
|
||||
|
||||
/**
|
||||
* 班级Id。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,班级Id不能为空!", groups = {UpdateGroup.class})
|
||||
private Long classId;
|
||||
|
||||
/**
|
||||
* 学生Id。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,学生Id不能为空!", groups = {UpdateGroup.class})
|
||||
private Long studentId;
|
||||
}
|
||||
@@ -0,0 +1,169 @@
|
||||
package com.orange.demo.courseclassinterface.dto;
|
||||
|
||||
import com.orange.demo.common.core.validator.UpdateGroup;
|
||||
import com.orange.demo.common.core.validator.ConstDictRef;
|
||||
import com.orange.demo.courseclassinterface.constant.CourseDifficult;
|
||||
import com.orange.demo.application.common.constant.Subject;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* CourseDto对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@ApiModel("CourseDto实体对象")
|
||||
@Data
|
||||
public class CourseDto {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id", required = true)
|
||||
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
|
||||
private Long courseId;
|
||||
|
||||
/**
|
||||
* 课程名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "课程名称", required = true)
|
||||
@NotBlank(message = "数据验证失败,课程名称不能为空!")
|
||||
private String courseName;
|
||||
|
||||
/**
|
||||
* 课程价格。
|
||||
*/
|
||||
@ApiModelProperty(value = "课程价格", required = true)
|
||||
@NotNull(message = "数据验证失败,课程价格不能为空!")
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 课程描述。
|
||||
*/
|
||||
@ApiModelProperty(value = "课程描述")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 课程难度(0: 容易 1: 普通 2: 很难)。
|
||||
*/
|
||||
@ApiModelProperty(value = "课程难度(0: 容易 1: 普通 2: 很难)", required = true)
|
||||
@NotNull(message = "数据验证失败,课程难度不能为空!")
|
||||
@ConstDictRef(constDictClass = CourseDifficult.class, message = "数据验证失败,课程难度为无效值!")
|
||||
private Integer difficulty;
|
||||
|
||||
/**
|
||||
* 年级Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "年级Id", required = true)
|
||||
@NotNull(message = "数据验证失败,所属年级不能为空!")
|
||||
private Integer gradeId;
|
||||
|
||||
/**
|
||||
* 学科Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "学科Id", required = true)
|
||||
@NotNull(message = "数据验证失败,所属学科不能为空!")
|
||||
@ConstDictRef(constDictClass = Subject.class, message = "数据验证失败,所属学科为无效值!")
|
||||
private Integer subjectId;
|
||||
|
||||
/**
|
||||
* 课时数量。
|
||||
*/
|
||||
@ApiModelProperty(value = "课时数量", required = true)
|
||||
@NotNull(message = "数据验证失败,课时数量不能为空!")
|
||||
private Integer classHour;
|
||||
|
||||
/**
|
||||
* 多张课程图片地址。
|
||||
*/
|
||||
@ApiModelProperty(value = "多张课程图片地址", required = true)
|
||||
@NotBlank(message = "数据验证失败,课程图片不能为空!")
|
||||
private String pictureUrl;
|
||||
|
||||
/**
|
||||
* 创建用户Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "创建用户Id")
|
||||
private Long createUserId;
|
||||
|
||||
/**
|
||||
* 创建时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 最后修改时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "最后修改时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* price 范围过滤起始值(>=)。
|
||||
*/
|
||||
@ApiModelProperty(value = "price 范围过滤起始值(>=)")
|
||||
private BigDecimal priceStart;
|
||||
|
||||
/**
|
||||
* price 范围过滤结束值(<=)。
|
||||
*/
|
||||
@ApiModelProperty(value = "price 范围过滤结束值(<=)")
|
||||
private BigDecimal priceEnd;
|
||||
|
||||
/**
|
||||
* classHour 范围过滤起始值(>=)。
|
||||
*/
|
||||
@ApiModelProperty(value = "classHour 范围过滤起始值(>=)")
|
||||
private Integer classHourStart;
|
||||
|
||||
/**
|
||||
* classHour 范围过滤结束值(<=)。
|
||||
*/
|
||||
@ApiModelProperty(value = "classHour 范围过滤结束值(<=)")
|
||||
private Integer classHourEnd;
|
||||
|
||||
/**
|
||||
* updateTime 范围过滤起始值(>=)。
|
||||
*/
|
||||
@ApiModelProperty(value = "updateTime 范围过滤起始值(>=)")
|
||||
private String updateTimeStart;
|
||||
|
||||
/**
|
||||
* updateTime 范围过滤结束值(<=)。
|
||||
*/
|
||||
@ApiModelProperty(value = "updateTime 范围过滤结束值(<=)")
|
||||
private String updateTimeEnd;
|
||||
|
||||
/**
|
||||
* courseId 的多对多关联表数据对象,数据对应类型为ClassCourseDto。
|
||||
*/
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Map<String, Object> classCourse;
|
||||
|
||||
/**
|
||||
* gradeId 字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Map<String, Object> gradeIdDictMap;
|
||||
|
||||
/**
|
||||
* difficulty 常量字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Map<String, Object> difficultyDictMap;
|
||||
|
||||
/**
|
||||
* subjectId 常量字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Map<String, Object> subjectIdDictMap;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.orange.demo.courseclassinterface.dto;
|
||||
|
||||
import com.orange.demo.common.core.validator.UpdateGroup;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* GradeDto对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@ApiModel("GradeDto实体对象")
|
||||
@Data
|
||||
public class GradeDto {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id", required = true)
|
||||
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
|
||||
private Integer gradeId;
|
||||
|
||||
/**
|
||||
* 年级名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "年级名称", required = true)
|
||||
@NotBlank(message = "数据验证失败,年级名称不能为空!")
|
||||
private String gradeName;
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.orange.demo.courseclassinterface.dto;
|
||||
|
||||
import com.orange.demo.common.core.validator.UpdateGroup;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* SchoolInfoDto对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@ApiModel("SchoolInfoDto实体对象")
|
||||
@Data
|
||||
public class SchoolInfoDto {
|
||||
|
||||
/**
|
||||
* 学校Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "学校Id", required = true)
|
||||
@NotNull(message = "数据验证失败,学校Id不能为空!", groups = {UpdateGroup.class})
|
||||
private Long schoolId;
|
||||
|
||||
/**
|
||||
* 学校名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "学校名称", required = true)
|
||||
@NotBlank(message = "数据验证失败,学校名称不能为空!")
|
||||
private String schoolName;
|
||||
|
||||
/**
|
||||
* 所在省Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "所在省Id", required = true)
|
||||
@NotNull(message = "数据验证失败,所在省份不能为空!")
|
||||
private Long provinceId;
|
||||
|
||||
/**
|
||||
* 所在城市Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "所在城市Id", required = true)
|
||||
@NotNull(message = "数据验证失败,所在城市不能为空!")
|
||||
private Long cityId;
|
||||
|
||||
/**
|
||||
* provinceId 字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Map<String, Object> provinceIdDictMap;
|
||||
|
||||
/**
|
||||
* cityId 字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Map<String, Object> cityIdDictMap;
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.orange.demo.courseclassinterface.dto;
|
||||
|
||||
import com.orange.demo.common.core.validator.UpdateGroup;
|
||||
import com.orange.demo.common.core.validator.ConstDictRef;
|
||||
import com.orange.demo.courseclassinterface.constant.ClassLevel;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* StudentClassDto对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@ApiModel("StudentClassDto实体对象")
|
||||
@Data
|
||||
public class StudentClassDto {
|
||||
|
||||
/**
|
||||
* 班级Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "班级Id", required = true)
|
||||
@NotNull(message = "数据验证失败,班级Id不能为空!", groups = {UpdateGroup.class})
|
||||
private Long classId;
|
||||
|
||||
/**
|
||||
* 班级名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "班级名称", required = true)
|
||||
@NotBlank(message = "数据验证失败,班级名称不能为空!")
|
||||
private String className;
|
||||
|
||||
/**
|
||||
* 学校Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "学校Id", required = true)
|
||||
@NotNull(message = "数据验证失败,所属校区不能为空!")
|
||||
private Long schoolId;
|
||||
|
||||
/**
|
||||
* 学生班长Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "学生班长Id", required = true)
|
||||
@NotNull(message = "数据验证失败,班长不能为空!")
|
||||
private Long leaderId;
|
||||
|
||||
/**
|
||||
* 已完成课时数量。
|
||||
*/
|
||||
@ApiModelProperty(value = "已完成课时数量", required = true)
|
||||
@NotNull(message = "数据验证失败,已完成课时不能为空!")
|
||||
private Integer finishClassHour;
|
||||
|
||||
/**
|
||||
* 班级级别(0: 初级班 1: 培优班 2: 冲刺提分班 3: 竞赛班)。
|
||||
*/
|
||||
@ApiModelProperty(value = "班级级别(0: 初级班 1: 培优班 2: 冲刺提分班 3: 竞赛班)", required = true)
|
||||
@NotNull(message = "数据验证失败,班级级别不能为空!")
|
||||
@ConstDictRef(constDictClass = ClassLevel.class, message = "数据验证失败,班级级别为无效值!")
|
||||
private Integer classLevel;
|
||||
|
||||
/**
|
||||
* 创建用户。
|
||||
*/
|
||||
@ApiModelProperty(value = "创建用户")
|
||||
private Long createUserId;
|
||||
|
||||
/**
|
||||
* 班级创建时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "班级创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* schoolId 字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Map<String, Object> schoolIdDictMap;
|
||||
|
||||
/**
|
||||
* leaderId 字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Map<String, Object> leaderIdDictMap;
|
||||
|
||||
/**
|
||||
* classLevel 常量字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Map<String, Object> classLevelDictMap;
|
||||
}
|
||||
@@ -0,0 +1,212 @@
|
||||
package com.orange.demo.courseclassinterface.dto;
|
||||
|
||||
import com.orange.demo.common.core.validator.UpdateGroup;
|
||||
import com.orange.demo.common.core.validator.ConstDictRef;
|
||||
import com.orange.demo.application.common.constant.Gender;
|
||||
import com.orange.demo.application.common.constant.ExpLevel;
|
||||
import com.orange.demo.application.common.constant.StudentStatus;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* StudentDto对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@ApiModel("StudentDto实体对象")
|
||||
@Data
|
||||
public class StudentDto {
|
||||
|
||||
/**
|
||||
* 学生Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "学生Id", required = true)
|
||||
@NotNull(message = "数据验证失败,学生Id不能为空!", groups = {UpdateGroup.class})
|
||||
private Long studentId;
|
||||
|
||||
/**
|
||||
* 登录手机。
|
||||
*/
|
||||
@ApiModelProperty(value = "登录手机", required = true)
|
||||
@NotBlank(message = "数据验证失败,手机号码不能为空!")
|
||||
private String loginMobile;
|
||||
|
||||
/**
|
||||
* 学生姓名。
|
||||
*/
|
||||
@ApiModelProperty(value = "学生姓名", required = true)
|
||||
@NotBlank(message = "数据验证失败,姓名不能为空!")
|
||||
private String studentName;
|
||||
|
||||
/**
|
||||
* 所在省份Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "所在省份Id", required = true)
|
||||
@NotNull(message = "数据验证失败,所在省份不能为空!")
|
||||
private Long provinceId;
|
||||
|
||||
/**
|
||||
* 所在城市Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "所在城市Id", required = true)
|
||||
@NotNull(message = "数据验证失败,所在城市不能为空!")
|
||||
private Long cityId;
|
||||
|
||||
/**
|
||||
* 区县Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "区县Id", required = true)
|
||||
@NotNull(message = "数据验证失败,所在区县不能为空!")
|
||||
private Long districtId;
|
||||
|
||||
/**
|
||||
* 学生性别 (0: 女生 1: 男生)。
|
||||
*/
|
||||
@ApiModelProperty(value = "学生性别 (0: 女生 1: 男生)", required = true)
|
||||
@NotNull(message = "数据验证失败,性别不能为空!")
|
||||
@ConstDictRef(constDictClass = Gender.class, message = "数据验证失败,性别为无效值!")
|
||||
private Integer gender;
|
||||
|
||||
/**
|
||||
* 生日。
|
||||
*/
|
||||
@ApiModelProperty(value = "生日", required = true)
|
||||
@NotNull(message = "数据验证失败,生日不能为空!")
|
||||
private Date birthday;
|
||||
|
||||
/**
|
||||
* 经验等级 (0: 初级 1: 中级 2: 高级 3: 资深)。
|
||||
*/
|
||||
@ApiModelProperty(value = "经验等级 (0: 初级 1: 中级 2: 高级 3: 资深)", required = true)
|
||||
@NotNull(message = "数据验证失败,经验等级不能为空!")
|
||||
@ConstDictRef(constDictClass = ExpLevel.class, message = "数据验证失败,经验等级为无效值!")
|
||||
private Integer experienceLevel;
|
||||
|
||||
/**
|
||||
* 总共充值学币数量。
|
||||
*/
|
||||
@ApiModelProperty(value = "总共充值学币数量", required = true)
|
||||
@NotNull(message = "数据验证失败,充值学币不能为空!", groups = {UpdateGroup.class})
|
||||
private Integer totalCoin;
|
||||
|
||||
/**
|
||||
* 可用学币数量。
|
||||
*/
|
||||
@ApiModelProperty(value = "可用学币数量", required = true)
|
||||
@NotNull(message = "数据验证失败,剩余学币不能为空!", groups = {UpdateGroup.class})
|
||||
private Integer leftCoin;
|
||||
|
||||
/**
|
||||
* 年级Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "年级Id", required = true)
|
||||
@NotNull(message = "数据验证失败,年级不能为空!")
|
||||
private Integer gradeId;
|
||||
|
||||
/**
|
||||
* 校区Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "校区Id", required = true)
|
||||
@NotNull(message = "数据验证失败,所属校区不能为空!")
|
||||
private Long schoolId;
|
||||
|
||||
/**
|
||||
* 注册时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "注册时间")
|
||||
private Date registerTime;
|
||||
|
||||
/**
|
||||
* 学生状态 (0: 正常 1: 锁定 2: 注销)。
|
||||
*/
|
||||
@ApiModelProperty(value = "学生状态 (0: 正常 1: 锁定 2: 注销)", required = true)
|
||||
@NotNull(message = "数据验证失败,状态 不能为空!", groups = {UpdateGroup.class})
|
||||
@ConstDictRef(constDictClass = StudentStatus.class, message = "数据验证失败,状态 为无效值!")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* birthday 范围过滤起始值(>=)。
|
||||
*/
|
||||
@ApiModelProperty(value = "birthday 范围过滤起始值(>=)")
|
||||
private String birthdayStart;
|
||||
|
||||
/**
|
||||
* birthday 范围过滤结束值(<=)。
|
||||
*/
|
||||
@ApiModelProperty(value = "birthday 范围过滤结束值(<=)")
|
||||
private String birthdayEnd;
|
||||
|
||||
/**
|
||||
* registerTime 范围过滤起始值(>=)。
|
||||
*/
|
||||
@ApiModelProperty(value = "registerTime 范围过滤起始值(>=)")
|
||||
private String registerTimeStart;
|
||||
|
||||
/**
|
||||
* registerTime 范围过滤结束值(<=)。
|
||||
*/
|
||||
@ApiModelProperty(value = "registerTime 范围过滤结束值(<=)")
|
||||
private String registerTimeEnd;
|
||||
|
||||
/**
|
||||
* true LIKE搜索字符串。
|
||||
*/
|
||||
@ApiModelProperty(value = "LIKE模糊搜索字符串")
|
||||
private String searchString;
|
||||
|
||||
/**
|
||||
* provinceId 字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Map<String, Object> provinceIdDictMap;
|
||||
|
||||
/**
|
||||
* cityId 字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Map<String, Object> cityIdDictMap;
|
||||
|
||||
/**
|
||||
* districtId 字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Map<String, Object> districtIdDictMap;
|
||||
|
||||
/**
|
||||
* gradeId 字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Map<String, Object> gradeIdDictMap;
|
||||
|
||||
/**
|
||||
* schoolId 字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Map<String, Object> schoolIdDictMap;
|
||||
|
||||
/**
|
||||
* gender 常量字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Map<String, Object> genderDictMap;
|
||||
|
||||
/**
|
||||
* experienceLevel 常量字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Map<String, Object> experienceLevelDictMap;
|
||||
|
||||
/**
|
||||
* status 常量字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Map<String, Object> statusDictMap;
|
||||
}
|
||||
@@ -0,0 +1,304 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="Spring" name="Spring">
|
||||
<configuration />
|
||||
</facet>
|
||||
<facet type="web" name="Web">
|
||||
<configuration>
|
||||
<webroots />
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/target/generated-sources/annotations" isTestSource="false" generated="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="course-class-interface" />
|
||||
<orderEntry type="module" module-name="application-common" />
|
||||
<orderEntry type="module" module-name="common-core" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.31" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.31" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.31" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-validation:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.18.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.1.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:guava:28.2-android" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:failureaccess:1.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.checkerframework:checker-compat-qual:2.5.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.3.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.j2objc:j2objc-annotations:1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-io:commons-io:2.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.3.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: joda-time:joda-time:2.10.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-csv:1.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.4.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.jsonwebtoken:jjwt:0.9.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.74" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.ben-manes.caffeine:caffeine:2.8.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.checkerframework:checker-qual:3.1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.jimmyshi:bean-query:1.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest-all:1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:3.17" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.poi:poi:3.17" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:3.17" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:2.6.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.04" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: mysql:mysql-connector-java:8.0.19" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:druid-spring-boot-starter:1.1.22" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:druid:1.1.22" level="project" />
|
||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-spring-boot-starter:2.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.4.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:1.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-core:1.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.persistence:persistence-api:1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-base:1.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-weekend:1.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-spring:1.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-extra:1.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-spring-boot-autoconfigure:2.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-starter:1.2.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:2.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:2.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.2.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:2.0" level="project" />
|
||||
<orderEntry type="module" module-name="common-swagger" />
|
||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-micro-spring-boot-starter:2.0.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-spring-boot-autoconfigure:2.0.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-spring:2.0.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-annotations:2.0.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-core:2.0.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.22" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.22" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-core:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-bean-validators:2.9.2" level="project" />
|
||||
<orderEntry type="module" module-name="common-redis" />
|
||||
<orderEntry type="library" name="Maven: redis.clients:jedis:3.1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.redisson:redisson:3.12.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-common:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-resolver-dns:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-codec-dns:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.cache:cache-api:1.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.3.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.reactivex.rxjava2:rxjava:2.2.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: de.ruedigermoeller:fst:2.57" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.10.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jodd:jodd-bean:5.0.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jodd:jodd-core:5.0.13" level="project" />
|
||||
<orderEntry type="module" module-name="common-minio" />
|
||||
<orderEntry type="library" name="Maven: io.minio:minio:7.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.simpleframework:simple-xml:2.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: stax:stax-api:1.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: stax:stax:1.2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: xpp3:xpp3:1.1.3.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp:3.12.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.squareup.okio:okio:1.17.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.spotbugs:spotbugs-annotations:4.0.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.jcip:jcip-annotations:1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" />
|
||||
<orderEntry type="module" module-name="common-sequence" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-client:1.2.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-common:1.2.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-api:1.2.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.prometheus:simpleclient:0.5.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.spring:spring-context-support:1.0.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-ribbon:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon:2.3.0" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.ribbon:ribbon-transport:2.3.0" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-contexts:0.4.9" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-servo:0.4.9" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: javax.inject:javax.inject:1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty:0.4.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-core:2.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-httpclient:2.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-client:1.19.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-core:1.19.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: javax.ws.rs:jsr311-api:1.1.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey.contribs:jersey-apache-client4:1.19.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.servo:servo-core:0.12.21" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-commons-util:0.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-loadbalancer:2.3.0" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-statistics:0.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.reactivex:rxjava:1.3.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-sentinel:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-transport-simple-http:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-transport-common:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-annotation-aspectj:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-core:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.aspectj:aspectjrt:1.9.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-circuitbreaker-sentinel:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-reactor-adapter:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-spring-webflux-adapter:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-spring-webmvc-adapter:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-parameter-flow-control:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-cluster-server-default:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-cluster-common-default:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-cluster-client-default:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-alibaba-sentinel-datasource:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.codehaus.woodstox:stax2-api:4.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.woodstox:woodstox-core:5.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-datasource-nacos:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-datasource-extension:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-freemarker:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.freemarker:freemarker:2.3.29" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-log4j2:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-slf4j-impl:2.12.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.12.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-core:2.12.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-jul:2.12.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-cache:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-configuration-processor:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-actuator:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator-autoconfigure:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.micrometer:micrometer-core:1.3.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.latencyutils:LatencyUtils:2.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: de.codecentric:spring-boot-admin-starter-client:2.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: de.codecentric:spring-boot-admin-client:2.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-config:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-openfeign:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.59" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.59" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-openfeign-core:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form-spring:3.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form:3.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-core:10.7.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-slf4j:10.7.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-hystrix:10.7.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.archaius:archaius-core:0.7.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-httpclient:10.7.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-hystrix:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-hystrix:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-ribbon:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-archaius:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-archaius:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-core:1.5.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-serialization:1.5.18" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.fasterxml.jackson.module:jackson-module-afterburner:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-metrics-event-stream:1.5.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-javanica:1.5.18" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.reactivex:rxjava-reactive-streams:1.2.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.3.1.Final" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.mapstruct:mapstruct-processor:1.3.1.Final" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.projectlombok:lombok:1.18.12" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.curator:curator-recipes:4.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.curator:curator-framework:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.curator:curator-client:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.zookeeper:zookeeper:3.5.3-beta" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-cli:commons-cli:1.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.kafka:kafka-clients:2.4.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.luben:zstd-jni:1.4.3-1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.lz4:lz4-java:1.6.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.xerial.snappy:snappy-java:1.1.7.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.scala-lang:scala-library:2.12.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.lmax:disruptor:3.4.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.activation:jakarta.activation-api:1.2.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.vintage:junit-vintage-engine:5.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-junit-jupiter:3.1.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.13.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest:2.1" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:3.1.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.10.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.objenesis:objenesis:2.6" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.6.3" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -0,0 +1,65 @@
|
||||
<?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>
|
||||
<groupId>com.orange.demo</groupId>
|
||||
<artifactId>course-class</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>course-class-service</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<name>course-class-service</name>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
<!-- 业务组件依赖 -->
|
||||
<dependency>
|
||||
<groupId>com.orange.demo</groupId>
|
||||
<artifactId>course-class-interface</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.orange.demo</groupId>
|
||||
<artifactId>common-redis</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.orange.demo</groupId>
|
||||
<artifactId>common-minio</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.orange.demo</groupId>
|
||||
<artifactId>common-sequence</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*.*</include>
|
||||
</includes>
|
||||
<filtering>false</filtering>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
</includes>
|
||||
<filtering>false</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.orange.demo.courseclassservice;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.cloud.client.SpringCloudApplication;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
|
||||
/**
|
||||
* course-class服务启动类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@SpringCloudApplication
|
||||
@EnableFeignClients(basePackages = "com.orange.demo")
|
||||
@ComponentScan("com.orange.demo")
|
||||
public class CourseClassApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(CourseClassApplication.class, args);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.orange.demo.courseclassservice.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* 应用程序自定义的程序属性配置文件。
|
||||
* 在yml格式的配置文件中,配置application开头应用配置信息,如:
|
||||
*
|
||||
* application:
|
||||
* uploadFileBaseDir: /user/xxx/fileRoot/
|
||||
* defaultSomething: defaultValue
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Data
|
||||
@RefreshScope
|
||||
@Configuration
|
||||
@ConfigurationProperties(prefix = "application")
|
||||
public class ApplicationConfig {
|
||||
/**
|
||||
* 上传文件的基础目录
|
||||
*/
|
||||
private String uploadFileBaseDir;
|
||||
/**
|
||||
* 每个微服务的url目录上下文,如(/admin/upms),通常和网关的路由目录一致。
|
||||
*/
|
||||
private String serviceContextPath;
|
||||
/**
|
||||
* 是否忽略远程调用中出现的任何错误,包括逻辑异常和系统异常。
|
||||
* 通常在调试和测试阶段设置为false,以便及时发现问题。
|
||||
*/
|
||||
private Boolean ignoreRpcError;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.orange.demo.courseclassservice.config;
|
||||
|
||||
import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
import tk.mybatis.spring.annotation.MapperScan;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
/**
|
||||
* 数据源配置Bean对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Configuration
|
||||
@EnableTransactionManagement
|
||||
@MapperScan(value = {"com.orange.demo.*.dao"})
|
||||
public class DataSourceConfig {
|
||||
|
||||
@Bean(initMethod = "init", destroyMethod = "close")
|
||||
@Primary
|
||||
@ConfigurationProperties(prefix = "spring.datasource.druid")
|
||||
public DataSource druidDataSource() {
|
||||
return DruidDataSourceBuilder.create().build();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
package com.orange.demo.courseclassservice.controller;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import cn.jimmyshi.beanquery.BeanQuery;
|
||||
import com.orange.demo.common.core.base.controller.BaseController;
|
||||
import com.orange.demo.common.core.base.service.BaseService;
|
||||
import com.orange.demo.common.core.util.MyModelUtil;
|
||||
import com.orange.demo.common.core.object.MyQueryParam;
|
||||
import com.orange.demo.common.core.object.ResponseResult;
|
||||
import com.orange.demo.courseclassinterface.dto.AreaCodeDto;
|
||||
import com.orange.demo.courseclassservice.model.AreaCode;
|
||||
import com.orange.demo.courseclassservice.service.AreaCodeService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 行政区划数据访问接口类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Api(tags = "行政区划数据访问接口")
|
||||
@RestController
|
||||
@RequestMapping("/areaCode")
|
||||
public class AreaCodeController extends BaseController<AreaCode, AreaCodeDto, Long> {
|
||||
|
||||
@Autowired
|
||||
private AreaCodeService areaCodeService;
|
||||
|
||||
@Override
|
||||
protected BaseService<AreaCode, AreaCodeDto, Long> service() {
|
||||
return areaCodeService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 按照字典的形式返回行政区划列表。
|
||||
*
|
||||
* @return 字典形式的行政区划列表。
|
||||
*/
|
||||
@GetMapping("/listDictAreaCode")
|
||||
public ResponseResult<List<Map<String, Object>>> listDictAreaCode() {
|
||||
List<AreaCode> resultList = areaCodeService.getAllList();
|
||||
return ResponseResult.success(BeanQuery.select(
|
||||
"parentId as parentId", "areaId as id", "areaName as name").executeFrom(resultList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据上级行政区划Id获取其下级行政区划列表。
|
||||
*
|
||||
* @param parentId 上级行政区划Id。
|
||||
* @return 按照字典的形式返回下级行政区划列表。
|
||||
*/
|
||||
@GetMapping("/listDictAreaCodeByParentId")
|
||||
public ResponseResult<List<Map<String, Object>>> listDictAreaCodeByParentId(@RequestParam(required = false) Long parentId) {
|
||||
Collection<AreaCode> resultList = areaCodeService.getListByParentId(parentId);
|
||||
if (CollectionUtils.isEmpty(resultList)) {
|
||||
return ResponseResult.success(new LinkedList<>());
|
||||
}
|
||||
return ResponseResult.success(BeanQuery.select(
|
||||
"parentId as parentId", "areaId as id", "areaName as name").executeFrom(resultList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看单条记录的详情信息,如果当前主对象包含字典和一对一关联,也都同时返回。
|
||||
*
|
||||
* @param areaId 行政区划Id。
|
||||
* @return 应答结果的Data对象中,将包含行政区划对象。
|
||||
*/
|
||||
@GetMapping("/view")
|
||||
public ResponseResult<AreaCodeDto> view(@RequestParam Long areaId) {
|
||||
AreaCode areaCode = areaCodeService.getById(areaId);
|
||||
return ResponseResult.success(MyModelUtil.copyTo(areaCode, AreaCodeDto.class));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取存在于主键Id列表的数据集合,该方法主要用于微服务间远程数据调用。
|
||||
*
|
||||
* @param areaCodeIds 主键Id列表。
|
||||
* @param withDict 该字段只是为了保证和其他对象接口一致,在这里没有实际用处。
|
||||
* @return 符合主键(in list)的数据集合。
|
||||
*/
|
||||
@PostMapping("/listByIds")
|
||||
public ResponseResult<List<AreaCodeDto>> listByIds(
|
||||
@RequestParam Set<Long> areaCodeIds, @RequestParam Boolean withDict) {
|
||||
return super.baseListByIds(areaCodeIds, withDict, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 基于主键Id,获取远程对象,该方法主要用于微服务间远程数据调用。
|
||||
*
|
||||
* @param areaId 主键Id。
|
||||
* @param withDict 该字段只是为了保证和其他对象接口一致,在这里没有实际用处。
|
||||
* @return 应答结果对象,包含主对象数据。
|
||||
*/
|
||||
@GetMapping("/getById")
|
||||
public ResponseResult<AreaCodeDto> getById(@RequestParam Long areaId, @RequestParam Boolean withDict) {
|
||||
return super.baseGetById(areaId, withDict, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断参数列表中指定的主键Id集合,是否全部存在。仅限于微服务间远程接口调用。
|
||||
*
|
||||
* @param areaCodeIds 主键Id集合。
|
||||
* @return 应答结果对象,包含true全部存在,否则false。
|
||||
*/
|
||||
@GetMapping("/existIds")
|
||||
public ResponseResult<Boolean> existIds(@RequestParam Set<Long> areaCodeIds) {
|
||||
return super.baseExistIds(areaCodeIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断指定主键Id的对象是否存在,该方法主要用于微服务间远程数据调用。
|
||||
*
|
||||
* @param areaId 主键Id。
|
||||
* @return 存在返回true,否则false。
|
||||
*/
|
||||
@GetMapping("/existId")
|
||||
public ResponseResult<Boolean> existId(@RequestParam Long areaId) {
|
||||
return super.baseExistId(areaId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||
*/
|
||||
@PostMapping("/listBy")
|
||||
public ResponseResult<List<AreaCodeDto>> listBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseListBy(queryParam, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 复杂的查询调用,仅返回单体记录。主要用于微服务间远程过程调用。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||
*/
|
||||
@PostMapping("/getBy")
|
||||
public ResponseResult<AreaCodeDto> getBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseGetBy(queryParam, null);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,424 @@
|
||||
package com.orange.demo.courseclassservice.controller;
|
||||
|
||||
import cn.jimmyshi.beanquery.BeanQuery;
|
||||
import cn.hutool.core.util.ReflectUtil;
|
||||
import com.orange.demo.common.core.upload.BaseUpDownloader;
|
||||
import com.orange.demo.common.core.upload.UpDownloaderFactory;
|
||||
import com.orange.demo.common.core.upload.UploadResponseInfo;
|
||||
import com.orange.demo.common.core.upload.UploadStoreInfo;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.page.PageMethod;
|
||||
import com.orange.demo.courseclassservice.model.*;
|
||||
import com.orange.demo.courseclassservice.service.*;
|
||||
import com.orange.demo.courseclassinterface.dto.*;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.common.core.util.*;
|
||||
import com.orange.demo.common.core.constant.*;
|
||||
import com.orange.demo.common.core.base.controller.BaseController;
|
||||
import com.orange.demo.common.core.base.service.BaseService;
|
||||
import com.orange.demo.common.core.annotation.MyRequestBody;
|
||||
import com.orange.demo.common.core.validator.UpdateGroup;
|
||||
import com.orange.demo.common.redis.cache.SessionCacheHelper;
|
||||
import com.orange.demo.courseclassservice.config.ApplicationConfig;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.groups.Default;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 课程数据操作控制器类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Api(tags = "课程数据管理接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/course")
|
||||
public class CourseController extends BaseController<Course, CourseDto, Long> {
|
||||
|
||||
@Autowired
|
||||
private CourseService courseService;
|
||||
@Autowired
|
||||
private ApplicationConfig appConfig;
|
||||
@Autowired
|
||||
private SessionCacheHelper cacheHelper;
|
||||
@Autowired
|
||||
private UpDownloaderFactory upDownloaderFactory;
|
||||
|
||||
@Override
|
||||
protected BaseService<Course, CourseDto, Long> service() {
|
||||
return courseService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增课程数据数据。
|
||||
*
|
||||
* @param courseDto 新增对象。
|
||||
* @return 应答结果对象,包含新增对象主键Id。
|
||||
*/
|
||||
@ApiOperationSupport(ignoreParameters = {
|
||||
"course.courseId",
|
||||
"course.priceStart",
|
||||
"course.priceEnd",
|
||||
"course.classHourStart",
|
||||
"course.classHourEnd",
|
||||
"course.updateTimeStart",
|
||||
"course.updateTimeEnd"})
|
||||
@PostMapping("/add")
|
||||
public ResponseResult<Long> add(@MyRequestBody("course") CourseDto courseDto) {
|
||||
String errorMessage = MyCommonUtil.getModelValidationError(courseDto);
|
||||
if (errorMessage != null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
|
||||
}
|
||||
Course course = Course.INSTANCE.toModel(courseDto);
|
||||
// 验证关联Id的数据合法性
|
||||
CallResult callResult = courseService.verifyRelatedData(course, null);
|
||||
if (!callResult.isSuccess()) {
|
||||
errorMessage = callResult.getErrorMessage();
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
|
||||
}
|
||||
course = courseService.saveNew(course);
|
||||
return ResponseResult.success(course.getCourseId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新课程数据数据。
|
||||
*
|
||||
* @param courseDto 更新对象。
|
||||
* @return 应答结果对象。
|
||||
*/
|
||||
@ApiOperationSupport(ignoreParameters = {
|
||||
"course.priceStart",
|
||||
"course.priceEnd",
|
||||
"course.classHourStart",
|
||||
"course.classHourEnd",
|
||||
"course.updateTimeStart",
|
||||
"course.updateTimeEnd"})
|
||||
@PostMapping("/update")
|
||||
public ResponseResult<Void> update(@MyRequestBody("course") CourseDto courseDto) {
|
||||
String errorMessage = MyCommonUtil.getModelValidationError(courseDto, Default.class, UpdateGroup.class);
|
||||
if (errorMessage != null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
|
||||
}
|
||||
Course course = Course.INSTANCE.toModel(courseDto);
|
||||
Course originalCourse = courseService.getById(course.getCourseId());
|
||||
if (originalCourse == null) {
|
||||
// NOTE: 修改下面方括号中的话述
|
||||
errorMessage = "数据验证失败,当前 [数据] 并不存在,请刷新后重试!";
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
|
||||
}
|
||||
// 验证关联Id的数据合法性
|
||||
CallResult callResult = courseService.verifyRelatedData(course, originalCourse);
|
||||
if (!callResult.isSuccess()) {
|
||||
errorMessage = callResult.getErrorMessage();
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
|
||||
}
|
||||
if (!courseService.update(course, originalCourse)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
||||
}
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除课程数据数据。
|
||||
*
|
||||
* @param courseId 删除对象主键Id。
|
||||
* @return 应答结果对象。
|
||||
*/
|
||||
@PostMapping("/delete")
|
||||
public ResponseResult<Void> delete(@MyRequestBody Long courseId) {
|
||||
String errorMessage;
|
||||
if (MyCommonUtil.existBlankArgument(courseId)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||
}
|
||||
// 验证关联Id的数据合法性
|
||||
Course originalCourse = courseService.getById(courseId);
|
||||
if (originalCourse == null) {
|
||||
//NOTE: 修改下面方括号中的话述
|
||||
errorMessage = "数据验证失败,当前 [对象] 并不存在,请刷新后重试!";
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
|
||||
}
|
||||
if (!courseService.remove(courseId)) {
|
||||
errorMessage = "数据操作失败,删除的对象不存在,请刷新后重试!";
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
|
||||
}
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 列出符合过滤条件的课程数据列表。
|
||||
*
|
||||
* @param courseDtoFilter 过滤对象。
|
||||
* @param orderParam 排序参数。
|
||||
* @param pageParam 分页参数。
|
||||
* @return 应答结果对象,包含查询结果集。
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
public ResponseResult<MyPageData<CourseDto>> list(
|
||||
@MyRequestBody("courseFilter") CourseDto courseDtoFilter,
|
||||
@MyRequestBody MyOrderParam orderParam,
|
||||
@MyRequestBody MyPageParam pageParam) {
|
||||
if (pageParam != null) {
|
||||
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
||||
}
|
||||
Course courseFilter = Course.INSTANCE.toModel(courseDtoFilter);
|
||||
String orderBy = MyOrderParam.buildOrderBy(orderParam, Course.class);
|
||||
List<Course> courseList =
|
||||
courseService.getCourseListWithRelation(courseFilter, orderBy);
|
||||
long totalCount = 0L;
|
||||
if (courseList instanceof Page) {
|
||||
totalCount = ((Page<Course>) courseList).getTotal();
|
||||
}
|
||||
// 分页连同对象数据转换copy工作,下面的方法一并完成。
|
||||
Tuple2<List<CourseDto>, Long> responseData =
|
||||
new Tuple2<>(Course.INSTANCE.fromModelList(courseList), totalCount);
|
||||
return ResponseResult.success(MyPageUtil.makeResponseData(responseData));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看指定课程数据对象详情。
|
||||
*
|
||||
* @param courseId 指定对象主键Id。
|
||||
* @return 应答结果对象,包含对象详情。
|
||||
*/
|
||||
@GetMapping("/view")
|
||||
public ResponseResult<CourseDto> view(@RequestParam Long courseId) {
|
||||
if (MyCommonUtil.existBlankArgument(courseId)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||
}
|
||||
Course course =
|
||||
courseService.getByIdWithRelation(courseId, MyRelationParam.full());
|
||||
if (course == null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
||||
}
|
||||
CourseDto courseDto = Course.INSTANCE.fromModel(course);
|
||||
return ResponseResult.success(courseDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 附件文件下载。
|
||||
* 这里将图片和其他类型的附件文件放到不同的父目录下,主要为了便于今后图片文件的迁移。
|
||||
*
|
||||
* @param courseId 附件所在记录的主键Id。
|
||||
* @param fieldName 附件所属的字段名。
|
||||
* @param filename 文件名。如果没有提供该参数,就从当前记录的指定字段中读取。
|
||||
* @param asImage 下载文件是否为图片。
|
||||
* @param response Http 应答对象。
|
||||
*/
|
||||
@GetMapping("/download")
|
||||
public void download(
|
||||
@RequestParam(required = false) Long courseId,
|
||||
@RequestParam String fieldName,
|
||||
@RequestParam String filename,
|
||||
@RequestParam Boolean asImage,
|
||||
HttpServletResponse response) {
|
||||
if (MyCommonUtil.existBlankArgument(fieldName, filename, asImage)) {
|
||||
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
|
||||
return;
|
||||
}
|
||||
// 使用try来捕获异常,是为了保证一旦出现异常可以返回500的错误状态,便于调试。
|
||||
// 否则有可能给前端返回的是200的错误码。
|
||||
try {
|
||||
// 如果请求参数中没有包含主键Id,就判断该文件是否为当前session上传的。
|
||||
if (courseId == null) {
|
||||
if (!cacheHelper.existSessionUploadFile(filename)) {
|
||||
ResponseResult.output(HttpServletResponse.SC_FORBIDDEN);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
Course course = courseService.getById(courseId);
|
||||
if (course == null) {
|
||||
ResponseResult.output(HttpServletResponse.SC_NOT_FOUND);
|
||||
return;
|
||||
}
|
||||
String fieldJsonData = (String) ReflectUtil.getFieldValue(course, fieldName);
|
||||
if (fieldJsonData == null) {
|
||||
ResponseResult.output(HttpServletResponse.SC_BAD_REQUEST);
|
||||
return;
|
||||
}
|
||||
if (!BaseUpDownloader.containFile(fieldJsonData, filename)) {
|
||||
ResponseResult.output(HttpServletResponse.SC_FORBIDDEN);
|
||||
return;
|
||||
}
|
||||
}
|
||||
UploadStoreInfo storeInfo = MyModelUtil.getUploadStoreInfo(Course.class, fieldName);
|
||||
if (!storeInfo.isSupportUpload()) {
|
||||
ResponseResult.output(HttpServletResponse.SC_NOT_IMPLEMENTED,
|
||||
ResponseResult.error(ErrorCodeEnum.INVALID_UPLOAD_FIELD));
|
||||
return;
|
||||
}
|
||||
BaseUpDownloader upDownloader = upDownloaderFactory.get(storeInfo.getStoreType());
|
||||
upDownloader.doDownload(appConfig.getUploadFileBaseDir(),
|
||||
Course.class.getSimpleName(), fieldName, filename, asImage, response);
|
||||
} catch (Exception e) {
|
||||
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 文件上传操作。
|
||||
*
|
||||
* @param fieldName 上传文件名。
|
||||
* @param asImage 是否作为图片上传。如果是图片,今后下载的时候无需权限验证。否则就是附件上传,下载时需要权限验证。
|
||||
* @param uploadFile 上传文件对象。
|
||||
*/
|
||||
@PostMapping("/upload")
|
||||
public void upload(
|
||||
@RequestParam String fieldName,
|
||||
@RequestParam Boolean asImage,
|
||||
@RequestParam("uploadFile") MultipartFile uploadFile) throws Exception {
|
||||
UploadStoreInfo storeInfo = MyModelUtil.getUploadStoreInfo(Course.class, fieldName);
|
||||
// 这里就会判断参数中指定的字段,是否支持上传操作。
|
||||
if (!storeInfo.isSupportUpload()) {
|
||||
ResponseResult.output(HttpServletResponse.SC_FORBIDDEN,
|
||||
ResponseResult.error(ErrorCodeEnum.INVALID_UPLOAD_FIELD));
|
||||
return;
|
||||
}
|
||||
// 根据字段注解中的存储类型,通过工厂方法获取匹配的上传下载实现类,从而解耦。
|
||||
BaseUpDownloader upDownloader = upDownloaderFactory.get(storeInfo.getStoreType());
|
||||
UploadResponseInfo responseInfo = upDownloader.doUpload(appConfig.getServiceContextPath(),
|
||||
appConfig.getUploadFileBaseDir(), Course.class.getSimpleName(), fieldName, asImage, uploadFile);
|
||||
if (responseInfo.getUploadFailed()) {
|
||||
ResponseResult.output(HttpServletResponse.SC_FORBIDDEN,
|
||||
ResponseResult.error(ErrorCodeEnum.UPLOAD_FAILED, responseInfo.getErrorMessage()));
|
||||
return;
|
||||
}
|
||||
cacheHelper.putSessionUploadFile(responseInfo.getFilename());
|
||||
ResponseResult.output(ResponseResult.success(responseInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 以字典形式返回全部课程数据数据集合。字典的键值为[courseId, courseName]。
|
||||
* 白名单接口,登录用户均可访问。
|
||||
*
|
||||
* @param filter 过滤对象。
|
||||
* @return 应答结果对象,包含字典形式的数据集合。
|
||||
*/
|
||||
@GetMapping("/listDictCourse")
|
||||
public ResponseResult<List<Map<String, Object>>> listDictCourse(Course filter) {
|
||||
List<Course> resultList = courseService.getListByFilter(filter, null);
|
||||
return ResponseResult.success(
|
||||
BeanQuery.select("courseId as id", "courseName as name").executeFrom(resultList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据主键Id集合,获取数据对象集合。仅限于微服务间远程接口调用。
|
||||
*
|
||||
* @param courseIds 主键Id集合。
|
||||
* @param withDict 是否包含字典关联。
|
||||
* @return 应答结果对象,包含主对象集合。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "listByIds")
|
||||
@PostMapping("/listByIds")
|
||||
public ResponseResult<List<CourseDto>> listByIds(
|
||||
@RequestParam Set<Long> courseIds, @RequestParam Boolean withDict) {
|
||||
return super.baseListByIds(courseIds, withDict, Course.INSTANCE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据主键Id,获取数据对象。仅限于微服务间远程接口调用。
|
||||
*
|
||||
* @param courseId 主键Id。
|
||||
* @param withDict 是否包含字典关联。
|
||||
* @return 应答结果对象,包含主对象数据。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "getById")
|
||||
@PostMapping("/getById")
|
||||
public ResponseResult<CourseDto> getById(
|
||||
@RequestParam Long courseId, @RequestParam Boolean withDict) {
|
||||
return super.baseGetById(courseId, withDict, Course.INSTANCE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断参数列表中指定的主键Id集合,是否全部存在。仅限于微服务间远程接口调用。
|
||||
*
|
||||
* @param courseIds 主键Id集合。
|
||||
* @return 应答结果对象,包含true全部存在,否则false。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "existIds")
|
||||
@PostMapping("/existIds")
|
||||
public ResponseResult<Boolean> existIds(@RequestParam Set<Long> courseIds) {
|
||||
return super.baseExistIds(courseIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断参数列表中指定的主键Id是否存在。仅限于微服务间远程接口调用。
|
||||
*
|
||||
* @param courseId 主键Id。
|
||||
* @return 应答结果对象,包含true表示存在,否则false。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "existId")
|
||||
@PostMapping("/existId")
|
||||
public ResponseResult<Boolean> existId(@RequestParam Long courseId) {
|
||||
return super.baseExistId(courseId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "listBy")
|
||||
@PostMapping("/listBy")
|
||||
public ResponseResult<List<CourseDto>> listBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseListBy(queryParam, Course.INSTANCE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "listMapBy")
|
||||
@PostMapping("/listMapBy")
|
||||
public ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseListMapBy(queryParam, Course.INSTANCE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 复杂的查询调用,仅返回单体记录。主要用于微服务间远程过程调用。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "getBy")
|
||||
@PostMapping("/getBy")
|
||||
public ResponseResult<CourseDto> getBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseGetBy(queryParam, Course.INSTANCE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据数量。主要用于微服务间远程过程调用。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含结果数量。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "countBy")
|
||||
@PostMapping("/countBy")
|
||||
public ResponseResult<Integer> countBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseCountBy(queryParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取远程对象中符合查询条件的分组聚合计算Map列表。
|
||||
*
|
||||
* @param aggregationParam 聚合参数。
|
||||
* @return 应该结果对象,包含聚合计算后的分组Map列表。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "aggregateBy")
|
||||
@PostMapping("/aggregateBy")
|
||||
public ResponseResult<List<Map<String, Object>>> aggregateBy(@RequestBody MyAggregationParam aggregationParam) {
|
||||
return super.baseAggregateBy(aggregationParam);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,223 @@
|
||||
package com.orange.demo.courseclassservice.controller;
|
||||
|
||||
import cn.jimmyshi.beanquery.BeanQuery;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.orange.demo.common.core.base.controller.BaseController;
|
||||
import com.orange.demo.common.core.base.service.BaseDictService;
|
||||
import com.orange.demo.common.core.constant.ErrorCodeEnum;
|
||||
import com.orange.demo.common.core.object.MyQueryParam;
|
||||
import com.orange.demo.common.core.object.ResponseResult;
|
||||
import com.orange.demo.common.core.util.MyModelUtil;
|
||||
import com.orange.demo.common.core.util.MyCommonUtil;
|
||||
import com.orange.demo.common.core.validator.UpdateGroup;
|
||||
import com.orange.demo.common.core.annotation.MyRequestBody;
|
||||
import com.orange.demo.courseclassinterface.dto.GradeDto;
|
||||
import com.orange.demo.courseclassservice.model.Grade;
|
||||
import com.orange.demo.courseclassservice.service.GradeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.groups.Default;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 年级操作控制器类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Api(tags = "年级管理接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/grade")
|
||||
public class GradeController extends BaseController<Grade, GradeDto, Integer> {
|
||||
|
||||
@Autowired
|
||||
private GradeService gradeService;
|
||||
|
||||
@Override
|
||||
protected BaseDictService<Grade, GradeDto, Integer> service() {
|
||||
return gradeService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增年级数据。
|
||||
*
|
||||
* @param gradeDto 新增对象。
|
||||
* @return 应答结果对象,包含新增对象主键Id。
|
||||
*/
|
||||
@ApiOperationSupport(ignoreParameters = {"grade.gradeId"})
|
||||
@PostMapping("/add")
|
||||
public ResponseResult<Integer> add(@MyRequestBody("grade") GradeDto gradeDto) {
|
||||
String errorMessage = MyCommonUtil.getModelValidationError(gradeDto);
|
||||
if (errorMessage != null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
|
||||
}
|
||||
Grade grade = MyModelUtil.copyTo(gradeDto, Grade.class);
|
||||
grade = gradeService.saveNew(grade);
|
||||
return ResponseResult.success(grade.getGradeId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新年级数据。
|
||||
*
|
||||
* @param gradeDto 更新对象。
|
||||
* @return 应答结果对象。
|
||||
*/
|
||||
@PostMapping("/update")
|
||||
public ResponseResult<Void> update(@MyRequestBody("grade") GradeDto gradeDto) {
|
||||
String errorMessage = MyCommonUtil.getModelValidationError(gradeDto, Default.class, UpdateGroup.class);
|
||||
if (errorMessage != null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
|
||||
}
|
||||
Grade grade = MyModelUtil.copyTo(gradeDto, Grade.class);
|
||||
Grade originalGrade = gradeService.getById(grade.getGradeId());
|
||||
if (originalGrade == null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
||||
}
|
||||
if (!gradeService.update(grade, originalGrade)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
||||
}
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除年级数据。
|
||||
*
|
||||
* @param gradeId 删除对象主键Id。
|
||||
* @return 应答结果对象。
|
||||
*/
|
||||
@PostMapping("/delete")
|
||||
public ResponseResult<Void> delete(@MyRequestBody Integer gradeId) {
|
||||
if (MyCommonUtil.existBlankArgument(gradeId)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||
}
|
||||
if (!gradeService.remove(gradeId)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
||||
}
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看指定年级对象详情。
|
||||
*
|
||||
* @param gradeId 指定对象主键Id。
|
||||
* @return 应答结果对象,包含对象详情。
|
||||
*/
|
||||
@GetMapping("/view")
|
||||
public ResponseResult<GradeDto> view(@RequestParam Integer gradeId) {
|
||||
if (MyCommonUtil.existBlankArgument(gradeId)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||
}
|
||||
Grade grade = gradeService.getById(gradeId);
|
||||
if (grade == null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
||||
}
|
||||
GradeDto gradeDto = MyModelUtil.copyTo(grade, GradeDto.class);
|
||||
return ResponseResult.success(gradeDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 以字典形式返回全部年级数据集合。
|
||||
* 白名单接口,登录用户均可访问。
|
||||
*
|
||||
* @return 应答结果对象,包含字典形式的数据集合。
|
||||
*/
|
||||
@GetMapping("/listDictGrade")
|
||||
public ResponseResult<List<Map<String, Object>>> listDictGrade() {
|
||||
List<Grade> resultList = gradeService.getAllList();
|
||||
return ResponseResult.success(BeanQuery.select(
|
||||
"gradeId as id", "gradeName as name").executeFrom(resultList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据主键Id集合,获取数据对象集合。仅限于微服务间远程接口调用。
|
||||
*
|
||||
* @param gradeIds 主键Id集合。
|
||||
* @param withDict 是否包含字典关联。
|
||||
* @return 应答结果对象,包含主对象集合。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "listByIds")
|
||||
@PostMapping("/listByIds")
|
||||
public ResponseResult<List<GradeDto>> listByIds(
|
||||
@RequestParam Set<Integer> gradeIds, @RequestParam Boolean withDict) {
|
||||
return super.baseListByIds(gradeIds, withDict, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据主键Id,获取数据对象。仅限于微服务间远程接口调用。
|
||||
*
|
||||
* @param gradeId 主键Id。
|
||||
* @param withDict 是否包含字典关联。
|
||||
* @return 应答结果对象,包含主对象数据。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "getById")
|
||||
@PostMapping("/getById")
|
||||
public ResponseResult<GradeDto> getById(
|
||||
@RequestParam Integer gradeId, @RequestParam Boolean withDict) {
|
||||
return super.baseGetById(gradeId, withDict, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断参数列表中指定的主键Id集合,是否全部存在。主要用于微服务间远程过程调用。
|
||||
*
|
||||
* @param gradeIds 主键Id集合。
|
||||
* @return 应答结果对象,包含true全部存在,否则false。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "existIds")
|
||||
@PostMapping("/existIds")
|
||||
public ResponseResult<Boolean> existIds(@RequestParam Set<Integer> gradeIds) {
|
||||
return super.baseExistIds(gradeIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断参数列表中指定的主键Id集合,是否全部存在。主要用于微服务间远程过程调用。
|
||||
*
|
||||
* @param gradeId 主键Id。
|
||||
* @return 应答结果对象,包含true全部存在,否则false。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "existId")
|
||||
@PostMapping("/existId")
|
||||
public ResponseResult<Boolean> existId(@RequestParam Integer gradeId) {
|
||||
return super.baseExistId(gradeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "listBy")
|
||||
@PostMapping("/listBy")
|
||||
public ResponseResult<List<GradeDto>> listBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseListBy(queryParam, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 复杂的查询调用,仅返回单体记录。主要用于微服务间远程过程调用。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "getBy")
|
||||
@PostMapping("/getBy")
|
||||
public ResponseResult<GradeDto> getBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseGetBy(queryParam, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 将当前字典表的数据重新加载到缓存中。
|
||||
* 由于缓存的数据更新,在add/update/delete等接口均有同步处理。因此该接口仅当同步过程中出现问题时,
|
||||
* 可手工调用,或者每天晚上定时同步一次。
|
||||
*/
|
||||
@GetMapping("/reloadCachedData")
|
||||
public ResponseResult<Boolean> reloadCachedData() {
|
||||
gradeService.reloadCachedData(true);
|
||||
return ResponseResult.success(true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,302 @@
|
||||
package com.orange.demo.courseclassservice.controller;
|
||||
|
||||
import cn.jimmyshi.beanquery.BeanQuery;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.page.PageMethod;
|
||||
import com.orange.demo.courseclassservice.model.*;
|
||||
import com.orange.demo.courseclassservice.service.*;
|
||||
import com.orange.demo.courseclassinterface.dto.*;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.common.core.util.*;
|
||||
import com.orange.demo.common.core.constant.*;
|
||||
import com.orange.demo.common.core.base.controller.BaseController;
|
||||
import com.orange.demo.common.core.base.service.BaseService;
|
||||
import com.orange.demo.common.core.annotation.MyRequestBody;
|
||||
import com.orange.demo.common.core.validator.UpdateGroup;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.groups.Default;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 校区数据操作控制器类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Api(tags = "校区数据管理接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/schoolInfo")
|
||||
public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoDto, Long> {
|
||||
|
||||
@Autowired
|
||||
private SchoolInfoService schoolInfoService;
|
||||
|
||||
@Override
|
||||
protected BaseService<SchoolInfo, SchoolInfoDto, Long> service() {
|
||||
return schoolInfoService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增校区数据数据。
|
||||
*
|
||||
* @param schoolInfoDto 新增对象。
|
||||
* @return 应答结果对象,包含新增对象主键Id。
|
||||
*/
|
||||
@ApiOperationSupport(ignoreParameters = {"schoolInfo.userId"})
|
||||
@PostMapping("/add")
|
||||
public ResponseResult<Long> add(@MyRequestBody("schoolInfo") SchoolInfoDto schoolInfoDto) {
|
||||
String errorMessage = MyCommonUtil.getModelValidationError(schoolInfoDto);
|
||||
if (errorMessage != null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
|
||||
}
|
||||
SchoolInfo schoolInfo = SchoolInfo.INSTANCE.toModel(schoolInfoDto);
|
||||
// 验证关联Id的数据合法性
|
||||
CallResult callResult = schoolInfoService.verifyRelatedData(schoolInfo, null);
|
||||
if (!callResult.isSuccess()) {
|
||||
errorMessage = callResult.getErrorMessage();
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
|
||||
}
|
||||
schoolInfo = schoolInfoService.saveNew(schoolInfo);
|
||||
return ResponseResult.success(schoolInfo.getSchoolId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新校区数据数据。
|
||||
*
|
||||
* @param schoolInfoDto 更新对象。
|
||||
* @return 应答结果对象。
|
||||
*/
|
||||
@PostMapping("/update")
|
||||
public ResponseResult<Void> update(@MyRequestBody("schoolInfo") SchoolInfoDto schoolInfoDto) {
|
||||
String errorMessage = MyCommonUtil.getModelValidationError(schoolInfoDto, Default.class, UpdateGroup.class);
|
||||
if (errorMessage != null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
|
||||
}
|
||||
SchoolInfo schoolInfo = SchoolInfo.INSTANCE.toModel(schoolInfoDto);
|
||||
SchoolInfo originalSchoolInfo = schoolInfoService.getById(schoolInfo.getSchoolId());
|
||||
if (originalSchoolInfo == null) {
|
||||
// NOTE: 修改下面方括号中的话述
|
||||
errorMessage = "数据验证失败,当前 [数据] 并不存在,请刷新后重试!";
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
|
||||
}
|
||||
// 验证关联Id的数据合法性
|
||||
CallResult callResult = schoolInfoService.verifyRelatedData(schoolInfo, originalSchoolInfo);
|
||||
if (!callResult.isSuccess()) {
|
||||
errorMessage = callResult.getErrorMessage();
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
|
||||
}
|
||||
if (!schoolInfoService.update(schoolInfo, originalSchoolInfo)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
||||
}
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除校区数据数据。
|
||||
*
|
||||
* @param schoolId 删除对象主键Id。
|
||||
* @return 应答结果对象。
|
||||
*/
|
||||
@PostMapping("/delete")
|
||||
public ResponseResult<Void> delete(@MyRequestBody Long schoolId) {
|
||||
String errorMessage;
|
||||
if (MyCommonUtil.existBlankArgument(schoolId)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||
}
|
||||
// 验证关联Id的数据合法性
|
||||
SchoolInfo originalSchoolInfo = schoolInfoService.getById(schoolId);
|
||||
if (originalSchoolInfo == null) {
|
||||
//NOTE: 修改下面方括号中的话述
|
||||
errorMessage = "数据验证失败,当前 [对象] 并不存在,请刷新后重试!";
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
|
||||
}
|
||||
if (!schoolInfoService.remove(schoolId)) {
|
||||
errorMessage = "数据操作失败,删除的对象不存在,请刷新后重试!";
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
|
||||
}
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 列出符合过滤条件的校区数据列表。
|
||||
*
|
||||
* @param schoolInfoDtoFilter 过滤对象。
|
||||
* @param orderParam 排序参数。
|
||||
* @param pageParam 分页参数。
|
||||
* @return 应答结果对象,包含查询结果集。
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
public ResponseResult<MyPageData<SchoolInfoDto>> list(
|
||||
@MyRequestBody("schoolInfoFilter") SchoolInfoDto schoolInfoDtoFilter,
|
||||
@MyRequestBody MyOrderParam orderParam,
|
||||
@MyRequestBody MyPageParam pageParam) {
|
||||
if (pageParam != null) {
|
||||
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
||||
}
|
||||
SchoolInfo schoolInfoFilter = SchoolInfo.INSTANCE.toModel(schoolInfoDtoFilter);
|
||||
String orderBy = MyOrderParam.buildOrderBy(orderParam, SchoolInfo.class);
|
||||
List<SchoolInfo> schoolInfoList =
|
||||
schoolInfoService.getSchoolInfoListWithRelation(schoolInfoFilter, orderBy);
|
||||
long totalCount = 0L;
|
||||
if (schoolInfoList instanceof Page) {
|
||||
totalCount = ((Page<SchoolInfo>) schoolInfoList).getTotal();
|
||||
}
|
||||
// 分页连同对象数据转换copy工作,下面的方法一并完成。
|
||||
Tuple2<List<SchoolInfoDto>, Long> responseData =
|
||||
new Tuple2<>(SchoolInfo.INSTANCE.fromModelList(schoolInfoList), totalCount);
|
||||
return ResponseResult.success(MyPageUtil.makeResponseData(responseData));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看指定校区数据对象详情。
|
||||
*
|
||||
* @param schoolId 指定对象主键Id。
|
||||
* @return 应答结果对象,包含对象详情。
|
||||
*/
|
||||
@GetMapping("/view")
|
||||
public ResponseResult<SchoolInfoDto> view(@RequestParam Long schoolId) {
|
||||
if (MyCommonUtil.existBlankArgument(schoolId)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||
}
|
||||
SchoolInfo schoolInfo =
|
||||
schoolInfoService.getByIdWithRelation(schoolId, MyRelationParam.full());
|
||||
if (schoolInfo == null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
||||
}
|
||||
SchoolInfoDto schoolInfoDto = SchoolInfo.INSTANCE.fromModel(schoolInfo);
|
||||
return ResponseResult.success(schoolInfoDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 以字典形式返回全部校区数据数据集合。字典的键值为[schoolId, schoolName]。
|
||||
* 白名单接口,登录用户均可访问。
|
||||
*
|
||||
* @param filter 过滤对象。
|
||||
* @return 应答结果对象,包含字典形式的数据集合。
|
||||
*/
|
||||
@GetMapping("/listDictSchoolInfo")
|
||||
public ResponseResult<List<Map<String, Object>>> listDictSchoolInfo(SchoolInfo filter) {
|
||||
List<SchoolInfo> resultList = schoolInfoService.getListByFilter(filter, null);
|
||||
return ResponseResult.success(
|
||||
BeanQuery.select("schoolId as id", "schoolName as name").executeFrom(resultList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据主键Id集合,获取数据对象集合。仅限于微服务间远程接口调用。
|
||||
*
|
||||
* @param schoolIds 主键Id集合。
|
||||
* @param withDict 是否包含字典关联。
|
||||
* @return 应答结果对象,包含主对象集合。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "listByIds")
|
||||
@PostMapping("/listByIds")
|
||||
public ResponseResult<List<SchoolInfoDto>> listByIds(
|
||||
@RequestParam Set<Long> schoolIds, @RequestParam Boolean withDict) {
|
||||
return super.baseListByIds(schoolIds, withDict, SchoolInfo.INSTANCE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据主键Id,获取数据对象。仅限于微服务间远程接口调用。
|
||||
*
|
||||
* @param schoolId 主键Id。
|
||||
* @param withDict 是否包含字典关联。
|
||||
* @return 应答结果对象,包含主对象数据。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "getById")
|
||||
@PostMapping("/getById")
|
||||
public ResponseResult<SchoolInfoDto> getById(
|
||||
@RequestParam Long schoolId, @RequestParam Boolean withDict) {
|
||||
return super.baseGetById(schoolId, withDict, SchoolInfo.INSTANCE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断参数列表中指定的主键Id集合,是否全部存在。仅限于微服务间远程接口调用。
|
||||
*
|
||||
* @param schoolIds 主键Id集合。
|
||||
* @return 应答结果对象,包含true全部存在,否则false。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "existIds")
|
||||
@PostMapping("/existIds")
|
||||
public ResponseResult<Boolean> existIds(@RequestParam Set<Long> schoolIds) {
|
||||
return super.baseExistIds(schoolIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断参数列表中指定的主键Id是否存在。仅限于微服务间远程接口调用。
|
||||
*
|
||||
* @param schoolId 主键Id。
|
||||
* @return 应答结果对象,包含true表示存在,否则false。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "existId")
|
||||
@PostMapping("/existId")
|
||||
public ResponseResult<Boolean> existId(@RequestParam Long schoolId) {
|
||||
return super.baseExistId(schoolId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "listBy")
|
||||
@PostMapping("/listBy")
|
||||
public ResponseResult<List<SchoolInfoDto>> listBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseListBy(queryParam, SchoolInfo.INSTANCE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "listMapBy")
|
||||
@PostMapping("/listMapBy")
|
||||
public ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseListMapBy(queryParam, SchoolInfo.INSTANCE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 复杂的查询调用,仅返回单体记录。主要用于微服务间远程过程调用。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "getBy")
|
||||
@PostMapping("/getBy")
|
||||
public ResponseResult<SchoolInfoDto> getBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseGetBy(queryParam, SchoolInfo.INSTANCE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据数量。主要用于微服务间远程过程调用。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含结果数量。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "countBy")
|
||||
@PostMapping("/countBy")
|
||||
public ResponseResult<Integer> countBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseCountBy(queryParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取远程对象中符合查询条件的分组聚合计算Map列表。
|
||||
*
|
||||
* @param aggregationParam 聚合参数。
|
||||
* @return 应该结果对象,包含聚合计算后的分组Map列表。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "aggregateBy")
|
||||
@PostMapping("/aggregateBy")
|
||||
public ResponseResult<List<Map<String, Object>>> aggregateBy(@RequestBody MyAggregationParam aggregationParam) {
|
||||
return super.baseAggregateBy(aggregationParam);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,561 @@
|
||||
package com.orange.demo.courseclassservice.controller;
|
||||
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.page.PageMethod;
|
||||
import com.orange.demo.courseclassservice.model.*;
|
||||
import com.orange.demo.courseclassservice.service.*;
|
||||
import com.orange.demo.courseclassinterface.dto.*;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.common.core.util.*;
|
||||
import com.orange.demo.common.core.constant.*;
|
||||
import com.orange.demo.common.core.base.controller.BaseController;
|
||||
import com.orange.demo.common.core.base.service.BaseService;
|
||||
import com.orange.demo.common.core.annotation.MyRequestBody;
|
||||
import com.orange.demo.common.core.validator.UpdateGroup;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.groups.Default;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 班级数据操作控制器类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Api(tags = "班级数据管理接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/studentClass")
|
||||
public class StudentClassController extends BaseController<StudentClass, StudentClassDto, Long> {
|
||||
|
||||
@Autowired
|
||||
private StudentClassService studentClassService;
|
||||
@Autowired
|
||||
private CourseService courseService;
|
||||
@Autowired
|
||||
private StudentService studentService;
|
||||
|
||||
@Override
|
||||
protected BaseService<StudentClass, StudentClassDto, Long> service() {
|
||||
return studentClassService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增班级数据数据。
|
||||
*
|
||||
* @param studentClassDto 新增对象。
|
||||
* @return 应答结果对象,包含新增对象主键Id。
|
||||
*/
|
||||
@ApiOperationSupport(ignoreParameters = {"studentClass.userId"})
|
||||
@PostMapping("/add")
|
||||
public ResponseResult<Long> add(@MyRequestBody("studentClass") StudentClassDto studentClassDto) {
|
||||
String errorMessage = MyCommonUtil.getModelValidationError(studentClassDto);
|
||||
if (errorMessage != null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
|
||||
}
|
||||
StudentClass studentClass = StudentClass.INSTANCE.toModel(studentClassDto);
|
||||
// 验证关联Id的数据合法性
|
||||
CallResult callResult = studentClassService.verifyRelatedData(studentClass, null);
|
||||
if (!callResult.isSuccess()) {
|
||||
errorMessage = callResult.getErrorMessage();
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
|
||||
}
|
||||
studentClass = studentClassService.saveNew(studentClass);
|
||||
return ResponseResult.success(studentClass.getClassId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新班级数据数据。
|
||||
*
|
||||
* @param studentClassDto 更新对象。
|
||||
* @return 应答结果对象。
|
||||
*/
|
||||
@PostMapping("/update")
|
||||
public ResponseResult<Void> update(@MyRequestBody("studentClass") StudentClassDto studentClassDto) {
|
||||
String errorMessage = MyCommonUtil.getModelValidationError(studentClassDto, Default.class, UpdateGroup.class);
|
||||
if (errorMessage != null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
|
||||
}
|
||||
StudentClass studentClass = StudentClass.INSTANCE.toModel(studentClassDto);
|
||||
StudentClass originalStudentClass = studentClassService.getById(studentClass.getClassId());
|
||||
if (originalStudentClass == null) {
|
||||
// NOTE: 修改下面方括号中的话述
|
||||
errorMessage = "数据验证失败,当前 [数据] 并不存在,请刷新后重试!";
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
|
||||
}
|
||||
// 验证关联Id的数据合法性
|
||||
CallResult callResult = studentClassService.verifyRelatedData(studentClass, originalStudentClass);
|
||||
if (!callResult.isSuccess()) {
|
||||
errorMessage = callResult.getErrorMessage();
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
|
||||
}
|
||||
if (!studentClassService.update(studentClass, originalStudentClass)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
||||
}
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除班级数据数据。
|
||||
*
|
||||
* @param classId 删除对象主键Id。
|
||||
* @return 应答结果对象。
|
||||
*/
|
||||
@PostMapping("/delete")
|
||||
public ResponseResult<Void> delete(@MyRequestBody Long classId) {
|
||||
String errorMessage;
|
||||
if (MyCommonUtil.existBlankArgument(classId)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||
}
|
||||
// 验证关联Id的数据合法性
|
||||
StudentClass originalStudentClass = studentClassService.getById(classId);
|
||||
if (originalStudentClass == null) {
|
||||
//NOTE: 修改下面方括号中的话述
|
||||
errorMessage = "数据验证失败,当前 [对象] 并不存在,请刷新后重试!";
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
|
||||
}
|
||||
if (!studentClassService.remove(classId)) {
|
||||
errorMessage = "数据操作失败,删除的对象不存在,请刷新后重试!";
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
|
||||
}
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 列出符合过滤条件的班级数据列表。
|
||||
*
|
||||
* @param studentClassDtoFilter 过滤对象。
|
||||
* @param orderParam 排序参数。
|
||||
* @param pageParam 分页参数。
|
||||
* @return 应答结果对象,包含查询结果集。
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
public ResponseResult<MyPageData<StudentClassDto>> list(
|
||||
@MyRequestBody("studentClassFilter") StudentClassDto studentClassDtoFilter,
|
||||
@MyRequestBody MyOrderParam orderParam,
|
||||
@MyRequestBody MyPageParam pageParam) {
|
||||
if (pageParam != null) {
|
||||
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
||||
}
|
||||
StudentClass studentClassFilter = StudentClass.INSTANCE.toModel(studentClassDtoFilter);
|
||||
String orderBy = MyOrderParam.buildOrderBy(orderParam, StudentClass.class);
|
||||
List<StudentClass> studentClassList =
|
||||
studentClassService.getStudentClassListWithRelation(studentClassFilter, orderBy);
|
||||
long totalCount = 0L;
|
||||
if (studentClassList instanceof Page) {
|
||||
totalCount = ((Page<StudentClass>) studentClassList).getTotal();
|
||||
}
|
||||
// 分页连同对象数据转换copy工作,下面的方法一并完成。
|
||||
Tuple2<List<StudentClassDto>, Long> responseData =
|
||||
new Tuple2<>(StudentClass.INSTANCE.fromModelList(studentClassList), totalCount);
|
||||
return ResponseResult.success(MyPageUtil.makeResponseData(responseData));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看指定班级数据对象详情。
|
||||
*
|
||||
* @param classId 指定对象主键Id。
|
||||
* @return 应答结果对象,包含对象详情。
|
||||
*/
|
||||
@GetMapping("/view")
|
||||
public ResponseResult<StudentClassDto> view(@RequestParam Long classId) {
|
||||
if (MyCommonUtil.existBlankArgument(classId)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||
}
|
||||
StudentClass studentClass =
|
||||
studentClassService.getByIdWithRelation(classId, MyRelationParam.full());
|
||||
if (studentClass == null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
||||
}
|
||||
StudentClassDto studentClassDto = StudentClass.INSTANCE.fromModel(studentClass);
|
||||
return ResponseResult.success(studentClassDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列出不与指定班级数据存在多对多关系的 [课程数据] 列表数据。
|
||||
* 通常用于查看添加新 [课程数据] 对象的候选列表。
|
||||
*
|
||||
* @param classId 主表主键Id。
|
||||
* @param courseDtoFilter [课程数据] 过滤对象。
|
||||
* @param orderParam 排序参数。
|
||||
* @param pageParam 分页参数。
|
||||
* @return 应答结果对象,返回符合条件的数据列表。
|
||||
*/
|
||||
@PostMapping("/listNotInClassCourse")
|
||||
public ResponseResult<MyPageData<CourseDto>> listNotInClassCourse(
|
||||
@MyRequestBody Long classId,
|
||||
@MyRequestBody("courseFilter") CourseDto courseDtoFilter,
|
||||
@MyRequestBody MyOrderParam orderParam,
|
||||
@MyRequestBody MyPageParam pageParam) {
|
||||
if (MyCommonUtil.existBlankArgument(classId)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||
}
|
||||
if (!studentClassService.existId(classId)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.INVALID_RELATED_RECORD_ID);
|
||||
}
|
||||
if (pageParam != null) {
|
||||
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
||||
}
|
||||
Course filter = Course.INSTANCE.toModel(courseDtoFilter);
|
||||
String orderBy = MyOrderParam.buildOrderBy(orderParam, Course.class);
|
||||
List<Course> courseList =
|
||||
courseService.getNotInCourseListByClassId(classId, filter, orderBy);
|
||||
return ResponseResult.success(MyPageUtil.makeResponseData(courseList, Course.INSTANCE));
|
||||
}
|
||||
|
||||
/**
|
||||
* 列出与指定班级数据存在多对多关系的 [课程数据] 列表数据。
|
||||
*
|
||||
* @param classId 主表主键Id。
|
||||
* @param courseDtoFilter [课程数据] 过滤对象。
|
||||
* @param orderParam 排序参数。
|
||||
* @param pageParam 分页参数。
|
||||
* @return 应答结果对象,返回符合条件的数据列表。
|
||||
*/
|
||||
@PostMapping("/listClassCourse")
|
||||
public ResponseResult<MyPageData<CourseDto>> listClassCourse(
|
||||
@MyRequestBody Long classId,
|
||||
@MyRequestBody("courseFilter") CourseDto courseDtoFilter,
|
||||
@MyRequestBody MyOrderParam orderParam,
|
||||
@MyRequestBody MyPageParam pageParam) {
|
||||
if (MyCommonUtil.existBlankArgument(classId)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||
}
|
||||
if (!studentClassService.existId(classId)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.INVALID_RELATED_RECORD_ID);
|
||||
}
|
||||
if (pageParam != null) {
|
||||
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
||||
}
|
||||
Course filter = Course.INSTANCE.toModel(courseDtoFilter);
|
||||
String orderBy = MyOrderParam.buildOrderBy(orderParam, Course.class);
|
||||
List<Course> courseList =
|
||||
courseService.getCourseListByClassId(classId, filter, orderBy);
|
||||
return ResponseResult.success(MyPageUtil.makeResponseData(courseList, Course.INSTANCE));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量添加班级数据和 [课程数据] 对象的多对多关联关系数据。
|
||||
*
|
||||
* @param classId 主表主键Id。
|
||||
* @param classCourseDtoList 关联对象列表。
|
||||
* @return 应答结果对象。
|
||||
*/
|
||||
@PostMapping("/addClassCourse")
|
||||
public ResponseResult<Void> addClassCourse(
|
||||
@MyRequestBody Long classId,
|
||||
@MyRequestBody(value = "classCourseList", elementType = ClassCourseDto.class) List<ClassCourseDto> classCourseDtoList) {
|
||||
if (MyCommonUtil.existBlankArgument(classId, classCourseDtoList)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||
}
|
||||
for (ClassCourseDto classCourse : classCourseDtoList) {
|
||||
String errorMessage = MyCommonUtil.getModelValidationError(classCourse);
|
||||
if (errorMessage != null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
|
||||
}
|
||||
}
|
||||
Set<Long> courseIdSet =
|
||||
classCourseDtoList.stream().map(ClassCourseDto::getCourseId).collect(Collectors.toSet());
|
||||
if (!studentClassService.existId(classId)
|
||||
|| !courseService.existUniqueKeyList("courseId", courseIdSet)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.INVALID_RELATED_RECORD_ID);
|
||||
}
|
||||
List<ClassCourse> classCourseList =
|
||||
MyModelUtil.copyCollectionTo(classCourseDtoList, ClassCourse.class);
|
||||
studentClassService.addClassCourseList(classCourseList, classId);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新指定班级数据和指定 [课程数据] 的多对多关联数据。
|
||||
*
|
||||
* @param classCourseDto 对多对中间表对象。
|
||||
* @return 应答结果对象。
|
||||
*/
|
||||
@PostMapping("/updateClassCourse")
|
||||
public ResponseResult<Void> updateClassCourse(
|
||||
@MyRequestBody("classCourse") ClassCourseDto classCourseDto) {
|
||||
String errorMessage = MyCommonUtil.getModelValidationError(classCourseDto);
|
||||
if (errorMessage != null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
|
||||
}
|
||||
ClassCourse classCourse = MyModelUtil.copyTo(classCourseDto, ClassCourse.class);
|
||||
if (!studentClassService.updateClassCourse(classCourse)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
||||
}
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示班级数据和指定 [课程数据] 的多对多关联详情数据。
|
||||
*
|
||||
* @param classId 主表主键Id。
|
||||
* @param courseId 从表主键Id。
|
||||
* @return 应答结果对象,包括中间表详情。
|
||||
*/
|
||||
@GetMapping("/viewClassCourse")
|
||||
public ResponseResult<ClassCourseDto> viewClassCourse(
|
||||
@RequestParam Long classId, @RequestParam Long courseId) {
|
||||
if (MyCommonUtil.existBlankArgument(classId, courseId)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||
}
|
||||
ClassCourse classCourse = studentClassService.getClassCourse(classId, courseId);
|
||||
if (classCourse == null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
||||
}
|
||||
ClassCourseDto classCourseDto = MyModelUtil.copyTo(classCourse, ClassCourseDto.class);
|
||||
return ResponseResult.success(classCourseDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 移除指定班级数据和指定 [课程数据] 的多对多关联关系。
|
||||
*
|
||||
* @param classId 主表主键Id。
|
||||
* @param courseId 关联表主键Id。
|
||||
* @return 应答结果对象。
|
||||
*/
|
||||
@PostMapping("/deleteClassCourse")
|
||||
public ResponseResult<Void> deleteClassCourse(
|
||||
@MyRequestBody Long classId, @MyRequestBody Long courseId) {
|
||||
if (MyCommonUtil.existBlankArgument(classId, courseId)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||
}
|
||||
if (!studentClassService.removeClassCourse(classId, courseId)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
||||
}
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 列出不与指定班级数据存在多对多关系的 [学生数据] 列表数据。
|
||||
* 通常用于查看添加新 [学生数据] 对象的候选列表。
|
||||
*
|
||||
* @param classId 主表主键Id。
|
||||
* @param studentDtoFilter [学生数据] 过滤对象。
|
||||
* @param orderParam 排序参数。
|
||||
* @param pageParam 分页参数。
|
||||
* @return 应答结果对象,返回符合条件的数据列表。
|
||||
*/
|
||||
@PostMapping("/listNotInClassStudent")
|
||||
public ResponseResult<MyPageData<StudentDto>> listNotInClassStudent(
|
||||
@MyRequestBody Long classId,
|
||||
@MyRequestBody("studentFilter") StudentDto studentDtoFilter,
|
||||
@MyRequestBody MyOrderParam orderParam,
|
||||
@MyRequestBody MyPageParam pageParam) {
|
||||
if (MyCommonUtil.existBlankArgument(classId)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||
}
|
||||
if (!studentClassService.existId(classId)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.INVALID_RELATED_RECORD_ID);
|
||||
}
|
||||
if (pageParam != null) {
|
||||
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
||||
}
|
||||
Student filter = Student.INSTANCE.toModel(studentDtoFilter);
|
||||
String orderBy = MyOrderParam.buildOrderBy(orderParam, Student.class);
|
||||
List<Student> studentList =
|
||||
studentService.getNotInStudentListByClassId(classId, filter, orderBy);
|
||||
return ResponseResult.success(MyPageUtil.makeResponseData(studentList, Student.INSTANCE));
|
||||
}
|
||||
|
||||
/**
|
||||
* 列出与指定班级数据存在多对多关系的 [学生数据] 列表数据。
|
||||
*
|
||||
* @param classId 主表主键Id。
|
||||
* @param studentDtoFilter [学生数据] 过滤对象。
|
||||
* @param orderParam 排序参数。
|
||||
* @param pageParam 分页参数。
|
||||
* @return 应答结果对象,返回符合条件的数据列表。
|
||||
*/
|
||||
@PostMapping("/listClassStudent")
|
||||
public ResponseResult<MyPageData<StudentDto>> listClassStudent(
|
||||
@MyRequestBody Long classId,
|
||||
@MyRequestBody("studentFilter") StudentDto studentDtoFilter,
|
||||
@MyRequestBody MyOrderParam orderParam,
|
||||
@MyRequestBody MyPageParam pageParam) {
|
||||
if (MyCommonUtil.existBlankArgument(classId)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||
}
|
||||
if (!studentClassService.existId(classId)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.INVALID_RELATED_RECORD_ID);
|
||||
}
|
||||
if (pageParam != null) {
|
||||
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
||||
}
|
||||
Student filter = Student.INSTANCE.toModel(studentDtoFilter);
|
||||
String orderBy = MyOrderParam.buildOrderBy(orderParam, Student.class);
|
||||
List<Student> studentList =
|
||||
studentService.getStudentListByClassId(classId, filter, orderBy);
|
||||
return ResponseResult.success(MyPageUtil.makeResponseData(studentList, Student.INSTANCE));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量添加班级数据和 [学生数据] 对象的多对多关联关系数据。
|
||||
*
|
||||
* @param classId 主表主键Id。
|
||||
* @param classStudentDtoList 关联对象列表。
|
||||
* @return 应答结果对象。
|
||||
*/
|
||||
@PostMapping("/addClassStudent")
|
||||
public ResponseResult<Void> addClassStudent(
|
||||
@MyRequestBody Long classId,
|
||||
@MyRequestBody(value = "classStudentList", elementType = ClassStudentDto.class) List<ClassStudentDto> classStudentDtoList) {
|
||||
if (MyCommonUtil.existBlankArgument(classId, classStudentDtoList)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||
}
|
||||
for (ClassStudentDto classStudent : classStudentDtoList) {
|
||||
String errorMessage = MyCommonUtil.getModelValidationError(classStudent);
|
||||
if (errorMessage != null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
|
||||
}
|
||||
}
|
||||
Set<Long> studentIdSet =
|
||||
classStudentDtoList.stream().map(ClassStudentDto::getStudentId).collect(Collectors.toSet());
|
||||
if (!studentClassService.existId(classId)
|
||||
|| !studentService.existUniqueKeyList("studentId", studentIdSet)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.INVALID_RELATED_RECORD_ID);
|
||||
}
|
||||
List<ClassStudent> classStudentList =
|
||||
MyModelUtil.copyCollectionTo(classStudentDtoList, ClassStudent.class);
|
||||
studentClassService.addClassStudentList(classStudentList, classId);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 移除指定班级数据和指定 [学生数据] 的多对多关联关系。
|
||||
*
|
||||
* @param classId 主表主键Id。
|
||||
* @param studentId 关联表主键Id。
|
||||
* @return 应答结果对象。
|
||||
*/
|
||||
@PostMapping("/deleteClassStudent")
|
||||
public ResponseResult<Void> deleteClassStudent(
|
||||
@MyRequestBody Long classId, @MyRequestBody Long studentId) {
|
||||
if (MyCommonUtil.existBlankArgument(classId, studentId)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||
}
|
||||
if (!studentClassService.removeClassStudent(classId, studentId)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
||||
}
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据主键Id集合,获取数据对象集合。仅限于微服务间远程接口调用。
|
||||
*
|
||||
* @param classIds 主键Id集合。
|
||||
* @param withDict 是否包含字典关联。
|
||||
* @return 应答结果对象,包含主对象集合。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "listByIds")
|
||||
@PostMapping("/listByIds")
|
||||
public ResponseResult<List<StudentClassDto>> listByIds(
|
||||
@RequestParam Set<Long> classIds, @RequestParam Boolean withDict) {
|
||||
return super.baseListByIds(classIds, withDict, StudentClass.INSTANCE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据主键Id,获取数据对象。仅限于微服务间远程接口调用。
|
||||
*
|
||||
* @param classId 主键Id。
|
||||
* @param withDict 是否包含字典关联。
|
||||
* @return 应答结果对象,包含主对象数据。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "getById")
|
||||
@PostMapping("/getById")
|
||||
public ResponseResult<StudentClassDto> getById(
|
||||
@RequestParam Long classId, @RequestParam Boolean withDict) {
|
||||
return super.baseGetById(classId, withDict, StudentClass.INSTANCE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断参数列表中指定的主键Id集合,是否全部存在。仅限于微服务间远程接口调用。
|
||||
*
|
||||
* @param classIds 主键Id集合。
|
||||
* @return 应答结果对象,包含true全部存在,否则false。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "existIds")
|
||||
@PostMapping("/existIds")
|
||||
public ResponseResult<Boolean> existIds(@RequestParam Set<Long> classIds) {
|
||||
return super.baseExistIds(classIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断参数列表中指定的主键Id是否存在。仅限于微服务间远程接口调用。
|
||||
*
|
||||
* @param classId 主键Id。
|
||||
* @return 应答结果对象,包含true表示存在,否则false。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "existId")
|
||||
@PostMapping("/existId")
|
||||
public ResponseResult<Boolean> existId(@RequestParam Long classId) {
|
||||
return super.baseExistId(classId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "listBy")
|
||||
@PostMapping("/listBy")
|
||||
public ResponseResult<List<StudentClassDto>> listBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseListBy(queryParam, StudentClass.INSTANCE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "listMapBy")
|
||||
@PostMapping("/listMapBy")
|
||||
public ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseListMapBy(queryParam, StudentClass.INSTANCE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 复杂的查询调用,仅返回单体记录。主要用于微服务间远程过程调用。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "getBy")
|
||||
@PostMapping("/getBy")
|
||||
public ResponseResult<StudentClassDto> getBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseGetBy(queryParam, StudentClass.INSTANCE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据数量。主要用于微服务间远程过程调用。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含结果数量。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "countBy")
|
||||
@PostMapping("/countBy")
|
||||
public ResponseResult<Integer> countBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseCountBy(queryParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取远程对象中符合查询条件的分组聚合计算Map列表。
|
||||
*
|
||||
* @param aggregationParam 聚合参数。
|
||||
* @return 应该结果对象,包含聚合计算后的分组Map列表。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "aggregateBy")
|
||||
@PostMapping("/aggregateBy")
|
||||
public ResponseResult<List<Map<String, Object>>> aggregateBy(@RequestBody MyAggregationParam aggregationParam) {
|
||||
return super.baseAggregateBy(aggregationParam);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,314 @@
|
||||
package com.orange.demo.courseclassservice.controller;
|
||||
|
||||
import cn.jimmyshi.beanquery.BeanQuery;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.page.PageMethod;
|
||||
import com.orange.demo.courseclassservice.model.*;
|
||||
import com.orange.demo.courseclassservice.service.*;
|
||||
import com.orange.demo.courseclassinterface.dto.*;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.common.core.util.*;
|
||||
import com.orange.demo.common.core.constant.*;
|
||||
import com.orange.demo.common.core.base.controller.BaseController;
|
||||
import com.orange.demo.common.core.base.service.BaseService;
|
||||
import com.orange.demo.common.core.annotation.MyRequestBody;
|
||||
import com.orange.demo.common.core.validator.UpdateGroup;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.groups.Default;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 学生数据操作控制器类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Api(tags = "学生数据管理接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/student")
|
||||
public class StudentController extends BaseController<Student, StudentDto, Long> {
|
||||
|
||||
@Autowired
|
||||
private StudentService studentService;
|
||||
|
||||
@Override
|
||||
protected BaseService<Student, StudentDto, Long> service() {
|
||||
return studentService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增学生数据数据。
|
||||
*
|
||||
* @param studentDto 新增对象。
|
||||
* @return 应答结果对象,包含新增对象主键Id。
|
||||
*/
|
||||
@ApiOperationSupport(ignoreParameters = {
|
||||
"student.studentId",
|
||||
"student.searchString",
|
||||
"student.birthdayStart",
|
||||
"student.birthdayEnd",
|
||||
"student.registerTimeStart",
|
||||
"student.registerTimeEnd"})
|
||||
@PostMapping("/add")
|
||||
public ResponseResult<Long> add(@MyRequestBody("student") StudentDto studentDto) {
|
||||
String errorMessage = MyCommonUtil.getModelValidationError(studentDto);
|
||||
if (errorMessage != null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
|
||||
}
|
||||
Student student = Student.INSTANCE.toModel(studentDto);
|
||||
// 验证关联Id的数据合法性
|
||||
CallResult callResult = studentService.verifyRelatedData(student, null);
|
||||
if (!callResult.isSuccess()) {
|
||||
errorMessage = callResult.getErrorMessage();
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
|
||||
}
|
||||
student = studentService.saveNew(student);
|
||||
return ResponseResult.success(student.getStudentId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新学生数据数据。
|
||||
*
|
||||
* @param studentDto 更新对象。
|
||||
* @return 应答结果对象。
|
||||
*/
|
||||
@ApiOperationSupport(ignoreParameters = {
|
||||
"student.searchString",
|
||||
"student.birthdayStart",
|
||||
"student.birthdayEnd",
|
||||
"student.registerTimeStart",
|
||||
"student.registerTimeEnd"})
|
||||
@PostMapping("/update")
|
||||
public ResponseResult<Void> update(@MyRequestBody("student") StudentDto studentDto) {
|
||||
String errorMessage = MyCommonUtil.getModelValidationError(studentDto, Default.class, UpdateGroup.class);
|
||||
if (errorMessage != null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
|
||||
}
|
||||
Student student = Student.INSTANCE.toModel(studentDto);
|
||||
Student originalStudent = studentService.getById(student.getStudentId());
|
||||
if (originalStudent == null) {
|
||||
// NOTE: 修改下面方括号中的话述
|
||||
errorMessage = "数据验证失败,当前 [数据] 并不存在,请刷新后重试!";
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
|
||||
}
|
||||
// 验证关联Id的数据合法性
|
||||
CallResult callResult = studentService.verifyRelatedData(student, originalStudent);
|
||||
if (!callResult.isSuccess()) {
|
||||
errorMessage = callResult.getErrorMessage();
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
|
||||
}
|
||||
if (!studentService.update(student, originalStudent)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
||||
}
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除学生数据数据。
|
||||
*
|
||||
* @param studentId 删除对象主键Id。
|
||||
* @return 应答结果对象。
|
||||
*/
|
||||
@PostMapping("/delete")
|
||||
public ResponseResult<Void> delete(@MyRequestBody Long studentId) {
|
||||
String errorMessage;
|
||||
if (MyCommonUtil.existBlankArgument(studentId)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||
}
|
||||
// 验证关联Id的数据合法性
|
||||
Student originalStudent = studentService.getById(studentId);
|
||||
if (originalStudent == null) {
|
||||
//NOTE: 修改下面方括号中的话述
|
||||
errorMessage = "数据验证失败,当前 [对象] 并不存在,请刷新后重试!";
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
|
||||
}
|
||||
if (!studentService.remove(studentId)) {
|
||||
errorMessage = "数据操作失败,删除的对象不存在,请刷新后重试!";
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
|
||||
}
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 列出符合过滤条件的学生数据列表。
|
||||
*
|
||||
* @param studentDtoFilter 过滤对象。
|
||||
* @param orderParam 排序参数。
|
||||
* @param pageParam 分页参数。
|
||||
* @return 应答结果对象,包含查询结果集。
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
public ResponseResult<MyPageData<StudentDto>> list(
|
||||
@MyRequestBody("studentFilter") StudentDto studentDtoFilter,
|
||||
@MyRequestBody MyOrderParam orderParam,
|
||||
@MyRequestBody MyPageParam pageParam) {
|
||||
if (pageParam != null) {
|
||||
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
||||
}
|
||||
Student studentFilter = Student.INSTANCE.toModel(studentDtoFilter);
|
||||
String orderBy = MyOrderParam.buildOrderBy(orderParam, Student.class);
|
||||
List<Student> studentList =
|
||||
studentService.getStudentListWithRelation(studentFilter, orderBy);
|
||||
long totalCount = 0L;
|
||||
if (studentList instanceof Page) {
|
||||
totalCount = ((Page<Student>) studentList).getTotal();
|
||||
}
|
||||
// 分页连同对象数据转换copy工作,下面的方法一并完成。
|
||||
Tuple2<List<StudentDto>, Long> responseData =
|
||||
new Tuple2<>(Student.INSTANCE.fromModelList(studentList), totalCount);
|
||||
return ResponseResult.success(MyPageUtil.makeResponseData(responseData));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看指定学生数据对象详情。
|
||||
*
|
||||
* @param studentId 指定对象主键Id。
|
||||
* @return 应答结果对象,包含对象详情。
|
||||
*/
|
||||
@GetMapping("/view")
|
||||
public ResponseResult<StudentDto> view(@RequestParam Long studentId) {
|
||||
if (MyCommonUtil.existBlankArgument(studentId)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||
}
|
||||
Student student =
|
||||
studentService.getByIdWithRelation(studentId, MyRelationParam.full());
|
||||
if (student == null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
||||
}
|
||||
StudentDto studentDto = Student.INSTANCE.fromModel(student);
|
||||
return ResponseResult.success(studentDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 以字典形式返回全部学生数据数据集合。字典的键值为[studentId, studentName]。
|
||||
* 白名单接口,登录用户均可访问。
|
||||
*
|
||||
* @param filter 过滤对象。
|
||||
* @return 应答结果对象,包含字典形式的数据集合。
|
||||
*/
|
||||
@GetMapping("/listDictStudent")
|
||||
public ResponseResult<List<Map<String, Object>>> listDictStudent(Student filter) {
|
||||
List<Student> resultList = studentService.getListByFilter(filter, null);
|
||||
return ResponseResult.success(
|
||||
BeanQuery.select("studentId as id", "studentName as name").executeFrom(resultList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据主键Id集合,获取数据对象集合。仅限于微服务间远程接口调用。
|
||||
*
|
||||
* @param studentIds 主键Id集合。
|
||||
* @param withDict 是否包含字典关联。
|
||||
* @return 应答结果对象,包含主对象集合。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "listByIds")
|
||||
@PostMapping("/listByIds")
|
||||
public ResponseResult<List<StudentDto>> listByIds(
|
||||
@RequestParam Set<Long> studentIds, @RequestParam Boolean withDict) {
|
||||
return super.baseListByIds(studentIds, withDict, Student.INSTANCE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据主键Id,获取数据对象。仅限于微服务间远程接口调用。
|
||||
*
|
||||
* @param studentId 主键Id。
|
||||
* @param withDict 是否包含字典关联。
|
||||
* @return 应答结果对象,包含主对象数据。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "getById")
|
||||
@PostMapping("/getById")
|
||||
public ResponseResult<StudentDto> getById(
|
||||
@RequestParam Long studentId, @RequestParam Boolean withDict) {
|
||||
return super.baseGetById(studentId, withDict, Student.INSTANCE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断参数列表中指定的主键Id集合,是否全部存在。仅限于微服务间远程接口调用。
|
||||
*
|
||||
* @param studentIds 主键Id集合。
|
||||
* @return 应答结果对象,包含true全部存在,否则false。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "existIds")
|
||||
@PostMapping("/existIds")
|
||||
public ResponseResult<Boolean> existIds(@RequestParam Set<Long> studentIds) {
|
||||
return super.baseExistIds(studentIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断参数列表中指定的主键Id是否存在。仅限于微服务间远程接口调用。
|
||||
*
|
||||
* @param studentId 主键Id。
|
||||
* @return 应答结果对象,包含true表示存在,否则false。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "existId")
|
||||
@PostMapping("/existId")
|
||||
public ResponseResult<Boolean> existId(@RequestParam Long studentId) {
|
||||
return super.baseExistId(studentId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "listBy")
|
||||
@PostMapping("/listBy")
|
||||
public ResponseResult<List<StudentDto>> listBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseListBy(queryParam, Student.INSTANCE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "listMapBy")
|
||||
@PostMapping("/listMapBy")
|
||||
public ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseListMapBy(queryParam, Student.INSTANCE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 复杂的查询调用,仅返回单体记录。主要用于微服务间远程过程调用。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "getBy")
|
||||
@PostMapping("/getBy")
|
||||
public ResponseResult<StudentDto> getBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseGetBy(queryParam, Student.INSTANCE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据数量。主要用于微服务间远程过程调用。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含结果数量。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "countBy")
|
||||
@PostMapping("/countBy")
|
||||
public ResponseResult<Integer> countBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseCountBy(queryParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取远程对象中符合查询条件的分组聚合计算Map列表。
|
||||
*
|
||||
* @param aggregationParam 聚合参数。
|
||||
* @return 应该结果对象,包含聚合计算后的分组Map列表。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "aggregateBy")
|
||||
@PostMapping("/aggregateBy")
|
||||
public ResponseResult<List<Map<String, Object>>> aggregateBy(@RequestBody MyAggregationParam aggregationParam) {
|
||||
return super.baseAggregateBy(aggregationParam);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.orange.demo.courseclassservice.dao;
|
||||
|
||||
import com.orange.demo.common.core.base.dao.BaseDaoMapper;
|
||||
import com.orange.demo.courseclassservice.model.AreaCode;
|
||||
|
||||
/**
|
||||
* 行政区划数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
public interface AreaCodeMapper extends BaseDaoMapper<AreaCode> {
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.orange.demo.courseclassservice.dao;
|
||||
|
||||
import com.orange.demo.common.core.base.dao.BaseDaoMapper;
|
||||
import com.orange.demo.courseclassservice.model.ClassCourse;
|
||||
|
||||
/**
|
||||
* 数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
public interface ClassCourseMapper extends BaseDaoMapper<ClassCourse> {
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.orange.demo.courseclassservice.dao;
|
||||
|
||||
import com.orange.demo.common.core.base.dao.BaseDaoMapper;
|
||||
import com.orange.demo.courseclassservice.model.ClassStudent;
|
||||
|
||||
/**
|
||||
* 数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
public interface ClassStudentMapper extends BaseDaoMapper<ClassStudent> {
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.orange.demo.courseclassservice.dao;
|
||||
|
||||
import com.orange.demo.common.core.base.dao.BaseDaoMapper;
|
||||
import com.orange.demo.courseclassservice.model.Course;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 课程数据数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
public interface CourseMapper extends BaseDaoMapper<Course> {
|
||||
|
||||
/**
|
||||
* 获取过滤后的对象列表。
|
||||
*
|
||||
* @param inFilterColumn 参与(In-list)过滤的数据表列。
|
||||
* @param inFilterValues 参与(In-list)过滤的数据表列值集合。
|
||||
* @param courseFilter 过滤对象。
|
||||
* @param orderBy 排序字符串,order by从句的参数。
|
||||
* @return 对象列表。
|
||||
*/
|
||||
<M> List<Course> getCourseList(
|
||||
@Param("inFilterColumn") String inFilterColumn,
|
||||
@Param("inFilterValues") Set<M> inFilterValues,
|
||||
@Param("courseFilter") Course courseFilter,
|
||||
@Param("orderBy") String orderBy);
|
||||
|
||||
/**
|
||||
* 获取对象列表,过滤条件中包含like和between条件,以及指定属性的(in list)过滤条件。
|
||||
*
|
||||
* @param inFilterColumn 参与(In-list)过滤的数据表列。
|
||||
* @param inFilterValues 参与(In-list)过滤的数据表列值集合。
|
||||
* @param courseFilter 过滤对象。
|
||||
* @return 对象列表。
|
||||
*/
|
||||
<M> Integer getCourseCount(
|
||||
@Param("inFilterColumn") String inFilterColumn,
|
||||
@Param("inFilterValues") Set<M> inFilterValues,
|
||||
@Param("courseFilter") Course courseFilter);
|
||||
|
||||
/**
|
||||
* 根据关联主表Id,获取关联从表数据列表。
|
||||
*
|
||||
* @param classId 关联主表Id。
|
||||
* @param courseFilter 从表过滤对象。
|
||||
* @param orderBy 排序字符串,order by从句的参数。
|
||||
* @return 从表数据列表。
|
||||
*/
|
||||
List<Course> getCourseListByClassId(
|
||||
@Param("classId") Long classId,
|
||||
@Param("courseFilter") Course courseFilter,
|
||||
@Param("orderBy") String orderBy);
|
||||
|
||||
/**
|
||||
* 根据关联主表Id,获取关联从表中没有和主表建立关联关系的数据列表。
|
||||
*
|
||||
* @param classId 关联主表Id。
|
||||
* @param courseFilter 过滤对象。
|
||||
* @param orderBy 排序字符串,order by从句的参数。
|
||||
* @return 与主表没有建立关联的从表数据列表。
|
||||
*/
|
||||
List<Course> getNotInCourseListByClassId(
|
||||
@Param("classId") Long classId,
|
||||
@Param("courseFilter") Course courseFilter,
|
||||
@Param("orderBy") String orderBy);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.orange.demo.courseclassservice.dao;
|
||||
|
||||
import com.orange.demo.common.core.base.dao.BaseDaoMapper;
|
||||
import com.orange.demo.courseclassservice.model.Grade;
|
||||
|
||||
/**
|
||||
* 年级数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
public interface GradeMapper extends BaseDaoMapper<Grade> {
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.orange.demo.courseclassservice.dao;
|
||||
|
||||
import com.orange.demo.common.core.base.dao.BaseDaoMapper;
|
||||
import com.orange.demo.courseclassservice.model.MaterialEdition;
|
||||
|
||||
/**
|
||||
* 数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
public interface MaterialEditionMapper extends BaseDaoMapper<MaterialEdition> {
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.orange.demo.courseclassservice.dao;
|
||||
|
||||
import com.orange.demo.common.core.base.dao.BaseDaoMapper;
|
||||
import com.orange.demo.courseclassservice.model.SchoolInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 校区数据数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
public interface SchoolInfoMapper extends BaseDaoMapper<SchoolInfo> {
|
||||
|
||||
/**
|
||||
* 获取过滤后的对象列表。
|
||||
*
|
||||
* @param inFilterColumn 参与(In-list)过滤的数据表列。
|
||||
* @param inFilterValues 参与(In-list)过滤的数据表列值集合。
|
||||
* @param schoolInfoFilter 过滤对象。
|
||||
* @param orderBy 排序字符串,order by从句的参数。
|
||||
* @return 对象列表。
|
||||
*/
|
||||
<M> List<SchoolInfo> getSchoolInfoList(
|
||||
@Param("inFilterColumn") String inFilterColumn,
|
||||
@Param("inFilterValues") Set<M> inFilterValues,
|
||||
@Param("schoolInfoFilter") SchoolInfo schoolInfoFilter,
|
||||
@Param("orderBy") String orderBy);
|
||||
|
||||
/**
|
||||
* 获取对象列表,过滤条件中包含like和between条件,以及指定属性的(in list)过滤条件。
|
||||
*
|
||||
* @param inFilterColumn 参与(In-list)过滤的数据表列。
|
||||
* @param inFilterValues 参与(In-list)过滤的数据表列值集合。
|
||||
* @param schoolInfoFilter 过滤对象。
|
||||
* @return 对象列表。
|
||||
*/
|
||||
<M> Integer getSchoolInfoCount(
|
||||
@Param("inFilterColumn") String inFilterColumn,
|
||||
@Param("inFilterValues") Set<M> inFilterValues,
|
||||
@Param("schoolInfoFilter") SchoolInfo schoolInfoFilter);
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.orange.demo.courseclassservice.dao;
|
||||
|
||||
import com.orange.demo.common.core.base.dao.BaseDaoMapper;
|
||||
import com.orange.demo.courseclassservice.model.StudentClass;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 班级数据数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
public interface StudentClassMapper extends BaseDaoMapper<StudentClass> {
|
||||
|
||||
/**
|
||||
* 获取过滤后的对象列表。
|
||||
*
|
||||
* @param inFilterColumn 参与(In-list)过滤的数据表列。
|
||||
* @param inFilterValues 参与(In-list)过滤的数据表列值集合。
|
||||
* @param studentClassFilter 过滤对象。
|
||||
* @param orderBy 排序字符串,order by从句的参数。
|
||||
* @return 对象列表。
|
||||
*/
|
||||
<M> List<StudentClass> getStudentClassList(
|
||||
@Param("inFilterColumn") String inFilterColumn,
|
||||
@Param("inFilterValues") Set<M> inFilterValues,
|
||||
@Param("studentClassFilter") StudentClass studentClassFilter,
|
||||
@Param("orderBy") String orderBy);
|
||||
|
||||
/**
|
||||
* 获取对象列表,过滤条件中包含like和between条件,以及指定属性的(in list)过滤条件。
|
||||
*
|
||||
* @param inFilterColumn 参与(In-list)过滤的数据表列。
|
||||
* @param inFilterValues 参与(In-list)过滤的数据表列值集合。
|
||||
* @param studentClassFilter 过滤对象。
|
||||
* @return 对象列表。
|
||||
*/
|
||||
<M> Integer getStudentClassCount(
|
||||
@Param("inFilterColumn") String inFilterColumn,
|
||||
@Param("inFilterValues") Set<M> inFilterValues,
|
||||
@Param("studentClassFilter") StudentClass studentClassFilter);
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.orange.demo.courseclassservice.dao;
|
||||
|
||||
import com.orange.demo.common.core.base.dao.BaseDaoMapper;
|
||||
import com.orange.demo.courseclassservice.model.Student;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 学生数据数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
public interface StudentMapper extends BaseDaoMapper<Student> {
|
||||
|
||||
/**
|
||||
* 获取过滤后的对象列表。
|
||||
*
|
||||
* @param inFilterColumn 参与(In-list)过滤的数据表列。
|
||||
* @param inFilterValues 参与(In-list)过滤的数据表列值集合。
|
||||
* @param studentFilter 过滤对象。
|
||||
* @param orderBy 排序字符串,order by从句的参数。
|
||||
* @return 对象列表。
|
||||
*/
|
||||
<M> List<Student> getStudentList(
|
||||
@Param("inFilterColumn") String inFilterColumn,
|
||||
@Param("inFilterValues") Set<M> inFilterValues,
|
||||
@Param("studentFilter") Student studentFilter,
|
||||
@Param("orderBy") String orderBy);
|
||||
|
||||
/**
|
||||
* 获取对象列表,过滤条件中包含like和between条件,以及指定属性的(in list)过滤条件。
|
||||
*
|
||||
* @param inFilterColumn 参与(In-list)过滤的数据表列。
|
||||
* @param inFilterValues 参与(In-list)过滤的数据表列值集合。
|
||||
* @param studentFilter 过滤对象。
|
||||
* @return 对象列表。
|
||||
*/
|
||||
<M> Integer getStudentCount(
|
||||
@Param("inFilterColumn") String inFilterColumn,
|
||||
@Param("inFilterValues") Set<M> inFilterValues,
|
||||
@Param("studentFilter") Student studentFilter);
|
||||
|
||||
/**
|
||||
* 根据关联主表Id,获取关联从表数据列表。
|
||||
*
|
||||
* @param classId 关联主表Id。
|
||||
* @param studentFilter 从表过滤对象。
|
||||
* @param orderBy 排序字符串,order by从句的参数。
|
||||
* @return 从表数据列表。
|
||||
*/
|
||||
List<Student> getStudentListByClassId(
|
||||
@Param("classId") Long classId,
|
||||
@Param("studentFilter") Student studentFilter,
|
||||
@Param("orderBy") String orderBy);
|
||||
|
||||
/**
|
||||
* 根据关联主表Id,获取关联从表中没有和主表建立关联关系的数据列表。
|
||||
*
|
||||
* @param classId 关联主表Id。
|
||||
* @param studentFilter 过滤对象。
|
||||
* @param orderBy 排序字符串,order by从句的参数。
|
||||
* @return 与主表没有建立关联的从表数据列表。
|
||||
*/
|
||||
List<Student> getNotInStudentListByClassId(
|
||||
@Param("classId") Long classId,
|
||||
@Param("studentFilter") Student studentFilter,
|
||||
@Param("orderBy") String orderBy);
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.orange.demo.courseclassservice.dao.AreaCodeMapper">
|
||||
<resultMap id="BaseResultMap" type="com.orange.demo.courseclassservice.model.AreaCode">
|
||||
<id column="area_id" jdbcType="BIGINT" property="areaId"/>
|
||||
<result column="area_name" jdbcType="VARCHAR" property="areaName"/>
|
||||
<result column="area_level" jdbcType="INTEGER" property="areaLevel"/>
|
||||
<result column="parent_id" jdbcType="BIGINT" property="parentId"/>
|
||||
</resultMap>
|
||||
</mapper>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.orange.demo.courseclassservice.dao.ClassCourseMapper">
|
||||
<resultMap id="BaseResultMap" type="com.orange.demo.courseclassservice.model.ClassCourse">
|
||||
<id column="class_id" jdbcType="BIGINT" property="classId"/>
|
||||
<id column="course_id" jdbcType="BIGINT" property="courseId"/>
|
||||
<result column="course_order" jdbcType="TINYINT" property="courseOrder"/>
|
||||
</resultMap>
|
||||
</mapper>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.orange.demo.courseclassservice.dao.ClassStudentMapper">
|
||||
<resultMap id="BaseResultMap" type="com.orange.demo.courseclassservice.model.ClassStudent">
|
||||
<id column="class_id" jdbcType="BIGINT" property="classId"/>
|
||||
<id column="student_id" jdbcType="BIGINT" property="studentId"/>
|
||||
</resultMap>
|
||||
</mapper>
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.orange.demo.courseclassservice.dao.CourseMapper">
|
||||
<resultMap id="BaseResultMap" type="com.orange.demo.courseclassservice.model.Course">
|
||||
<id column="course_id" jdbcType="BIGINT" property="courseId"/>
|
||||
<result column="course_name" jdbcType="VARCHAR" property="courseName"/>
|
||||
<result column="price" jdbcType="DECIMAL" property="price"/>
|
||||
<result column="description" jdbcType="VARCHAR" property="description"/>
|
||||
<result column="difficulty" jdbcType="INTEGER" property="difficulty"/>
|
||||
<result column="grade_id" jdbcType="TINYINT" property="gradeId"/>
|
||||
<result column="subject_id" jdbcType="TINYINT" property="subjectId"/>
|
||||
<result column="class_hour" jdbcType="INTEGER" property="classHour"/>
|
||||
<result column="picture_url" jdbcType="VARCHAR" property="pictureUrl"/>
|
||||
<result column="create_user_id" jdbcType="BIGINT" property="createUserId"/>
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="BaseResultMapWithClassCourse" type="com.orange.demo.courseclassservice.model.Course" extends="BaseResultMap">
|
||||
<association property="classCourse" column="course_id" foreignColumn="course_id"
|
||||
notNullColumn="course_id" resultMap="com.orange.demo.courseclassservice.dao.ClassCourseMapper.BaseResultMap" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="filterRef">
|
||||
<if test="courseFilter != null">
|
||||
<if test="courseFilter.courseName != null and courseFilter.courseName != ''">
|
||||
<bind name = "safeCourseName" value = "'%' + courseFilter.courseName + '%'" />
|
||||
AND zz_course.course_name LIKE #{safeCourseName}
|
||||
</if>
|
||||
<if test="courseFilter.priceStart != null">
|
||||
AND zz_course.price >= #{courseFilter.priceStart}
|
||||
</if>
|
||||
<if test="courseFilter.priceEnd != null">
|
||||
AND zz_course.price <= #{courseFilter.priceEnd}
|
||||
</if>
|
||||
<if test="courseFilter.difficulty != null">
|
||||
AND zz_course.difficulty = #{courseFilter.difficulty}
|
||||
</if>
|
||||
<if test="courseFilter.gradeId != null">
|
||||
AND zz_course.grade_id = #{courseFilter.gradeId}
|
||||
</if>
|
||||
<if test="courseFilter.subjectId != null">
|
||||
AND zz_course.subject_id = #{courseFilter.subjectId}
|
||||
</if>
|
||||
<if test="courseFilter.classHourStart != null">
|
||||
AND zz_course.class_hour >= #{courseFilter.classHourStart}
|
||||
</if>
|
||||
<if test="courseFilter.classHourEnd != null">
|
||||
AND zz_course.class_hour <= #{courseFilter.classHourEnd}
|
||||
</if>
|
||||
<if test="courseFilter.updateTimeStart != null and courseFilter.updateTimeStart != ''">
|
||||
AND zz_course.update_time >= #{courseFilter.updateTimeStart}
|
||||
</if>
|
||||
<if test="courseFilter.updateTimeEnd != null and courseFilter.updateTimeEnd != ''">
|
||||
AND zz_course.update_time <= #{courseFilter.updateTimeEnd}
|
||||
</if>
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="getCourseList" resultMap="BaseResultMap" parameterType="com.orange.demo.courseclassservice.model.Course">
|
||||
SELECT * FROM zz_course
|
||||
<where>
|
||||
<if test="inFilterColumn != null and inFilterColumn != '' and inFilterValues != null and inFilterValues.size > 0">
|
||||
AND ${inFilterColumn} IN
|
||||
<foreach collection="inFilterValues" item="item" open="(" separator="," close=")">
|
||||
'${item}'
|
||||
</foreach>
|
||||
</if>
|
||||
<include refid="filterRef"/>
|
||||
</where>
|
||||
<if test="orderBy != null and orderBy != ''">
|
||||
ORDER BY ${orderBy}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getCourseCount" resultType="java.lang.Integer" parameterType="com.orange.demo.courseclassservice.model.Course">
|
||||
SELECT COUNT(1) FROM zz_course
|
||||
<where>
|
||||
<if test="inFilterColumn != null and inFilterColumn != '' and inFilterValues != null and inFilterValues.size > 0">
|
||||
AND ${inFilterColumn} IN
|
||||
<foreach collection="inFilterValues" item="item" open="(" separator="," close=")">
|
||||
'${item}'
|
||||
</foreach>
|
||||
</if>
|
||||
<include refid="filterRef"/>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getCourseListByClassId" resultMap="BaseResultMapWithClassCourse">
|
||||
SELECT
|
||||
zz_course.*,
|
||||
zz_class_course.*
|
||||
FROM
|
||||
zz_course,
|
||||
zz_class_course
|
||||
<where>
|
||||
AND zz_class_course.class_id = #{classId}
|
||||
AND zz_class_course.course_id = zz_course.course_id
|
||||
<include refid="filterRef"/>
|
||||
</where>
|
||||
<if test="orderBy != null and orderBy != ''">
|
||||
ORDER BY ${orderBy}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getNotInCourseListByClassId" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
zz_course.*
|
||||
FROM
|
||||
zz_course
|
||||
<where>
|
||||
AND NOT EXISTS (SELECT * FROM zz_class_course
|
||||
WHERE zz_class_course.class_id = #{classId} AND zz_class_course.course_id = zz_course.course_id)
|
||||
<include refid="filterRef"/>
|
||||
</where>
|
||||
<if test="orderBy != null and orderBy != ''">
|
||||
ORDER BY ${orderBy}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.orange.demo.courseclassservice.dao.GradeMapper">
|
||||
<resultMap id="BaseResultMap" type="com.orange.demo.courseclassservice.model.Grade">
|
||||
<id column="grade_id" jdbcType="INTEGER" property="gradeId"/>
|
||||
<result column="grade_name" jdbcType="VARCHAR" property="gradeName"/>
|
||||
<result column="status" jdbcType="INTEGER" property="status"/>
|
||||
</resultMap>
|
||||
</mapper>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.orange.demo.courseclassservice.dao.MaterialEditionMapper">
|
||||
<resultMap id="BaseResultMap" type="com.orange.demo.courseclassservice.model.MaterialEdition">
|
||||
<id column="edition_id" jdbcType="INTEGER" property="editionId"/>
|
||||
<result column="edition_name" jdbcType="VARCHAR" property="editionName"/>
|
||||
<result column="status" jdbcType="INTEGER" property="status"/>
|
||||
</resultMap>
|
||||
</mapper>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.orange.demo.courseclassservice.dao.SchoolInfoMapper">
|
||||
<resultMap id="BaseResultMap" type="com.orange.demo.courseclassservice.model.SchoolInfo">
|
||||
<id column="school_id" jdbcType="BIGINT" property="schoolId"/>
|
||||
<result column="school_name" jdbcType="VARCHAR" property="schoolName"/>
|
||||
<result column="province_id" jdbcType="BIGINT" property="provinceId"/>
|
||||
<result column="city_id" jdbcType="BIGINT" property="cityId"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="filterRef">
|
||||
<if test="schoolInfoFilter != null">
|
||||
<if test="schoolInfoFilter.schoolName != null and schoolInfoFilter.schoolName != ''">
|
||||
<bind name = "safeSchoolName" value = "'%' + schoolInfoFilter.schoolName + '%'" />
|
||||
AND zz_school_info.school_name LIKE #{safeSchoolName}
|
||||
</if>
|
||||
<if test="schoolInfoFilter.provinceId != null">
|
||||
AND zz_school_info.province_id = #{schoolInfoFilter.provinceId}
|
||||
</if>
|
||||
<if test="schoolInfoFilter.cityId != null">
|
||||
AND zz_school_info.city_id = #{schoolInfoFilter.cityId}
|
||||
</if>
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="getSchoolInfoList" resultMap="BaseResultMap" parameterType="com.orange.demo.courseclassservice.model.SchoolInfo">
|
||||
SELECT * FROM zz_school_info
|
||||
<where>
|
||||
<if test="inFilterColumn != null and inFilterColumn != '' and inFilterValues != null and inFilterValues.size > 0">
|
||||
AND ${inFilterColumn} IN
|
||||
<foreach collection="inFilterValues" item="item" open="(" separator="," close=")">
|
||||
'${item}'
|
||||
</foreach>
|
||||
</if>
|
||||
<include refid="filterRef"/>
|
||||
</where>
|
||||
<if test="orderBy != null and orderBy != ''">
|
||||
ORDER BY ${orderBy}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getSchoolInfoCount" resultType="java.lang.Integer" parameterType="com.orange.demo.courseclassservice.model.SchoolInfo">
|
||||
SELECT COUNT(1) FROM zz_school_info
|
||||
<where>
|
||||
<if test="inFilterColumn != null and inFilterColumn != '' and inFilterValues != null and inFilterValues.size > 0">
|
||||
AND ${inFilterColumn} IN
|
||||
<foreach collection="inFilterValues" item="item" open="(" separator="," close=")">
|
||||
'${item}'
|
||||
</foreach>
|
||||
</if>
|
||||
<include refid="filterRef"/>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.orange.demo.courseclassservice.dao.StudentClassMapper">
|
||||
<resultMap id="BaseResultMap" type="com.orange.demo.courseclassservice.model.StudentClass">
|
||||
<id column="class_id" jdbcType="BIGINT" property="classId"/>
|
||||
<result column="class_name" jdbcType="VARCHAR" property="className"/>
|
||||
<result column="school_id" jdbcType="BIGINT" property="schoolId"/>
|
||||
<result column="leader_id" jdbcType="BIGINT" property="leaderId"/>
|
||||
<result column="finish_class_hour" jdbcType="INTEGER" property="finishClassHour"/>
|
||||
<result column="class_level" jdbcType="TINYINT" property="classLevel"/>
|
||||
<result column="create_user_id" jdbcType="BIGINT" property="createUserId"/>
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||
<result column="status" jdbcType="TINYINT" property="status"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="filterRef">
|
||||
<if test="studentClassFilter != null">
|
||||
<if test="studentClassFilter.className != null and studentClassFilter.className != ''">
|
||||
AND zz_class.class_name = #{studentClassFilter.className}
|
||||
</if>
|
||||
<if test="studentClassFilter.schoolId != null">
|
||||
AND zz_class.school_id = #{studentClassFilter.schoolId}
|
||||
</if>
|
||||
<if test="studentClassFilter.classLevel != null">
|
||||
AND zz_class.class_level = #{studentClassFilter.classLevel}
|
||||
</if>
|
||||
</if>
|
||||
AND zz_class.status = ${@com.orange.demo.common.core.constant.GlobalDeletedFlag@NORMAL}
|
||||
</sql>
|
||||
|
||||
<select id="getStudentClassList" resultMap="BaseResultMap" parameterType="com.orange.demo.courseclassservice.model.StudentClass">
|
||||
SELECT * FROM zz_class
|
||||
<where>
|
||||
<if test="inFilterColumn != null and inFilterColumn != '' and inFilterValues != null and inFilterValues.size > 0">
|
||||
AND ${inFilterColumn} IN
|
||||
<foreach collection="inFilterValues" item="item" open="(" separator="," close=")">
|
||||
'${item}'
|
||||
</foreach>
|
||||
</if>
|
||||
<include refid="filterRef"/>
|
||||
</where>
|
||||
<if test="orderBy != null and orderBy != ''">
|
||||
ORDER BY ${orderBy}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getStudentClassCount" resultType="java.lang.Integer" parameterType="com.orange.demo.courseclassservice.model.StudentClass">
|
||||
SELECT COUNT(1) FROM zz_class
|
||||
<where>
|
||||
<if test="inFilterColumn != null and inFilterColumn != '' and inFilterValues != null and inFilterValues.size > 0">
|
||||
AND ${inFilterColumn} IN
|
||||
<foreach collection="inFilterValues" item="item" open="(" separator="," close=")">
|
||||
'${item}'
|
||||
</foreach>
|
||||
</if>
|
||||
<include refid="filterRef"/>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.orange.demo.courseclassservice.dao.StudentMapper">
|
||||
<resultMap id="BaseResultMap" type="com.orange.demo.courseclassservice.model.Student">
|
||||
<id column="student_id" jdbcType="BIGINT" property="studentId"/>
|
||||
<result column="login_mobile" jdbcType="VARCHAR" property="loginMobile"/>
|
||||
<result column="student_name" jdbcType="VARCHAR" property="studentName"/>
|
||||
<result column="province_id" jdbcType="BIGINT" property="provinceId"/>
|
||||
<result column="city_id" jdbcType="BIGINT" property="cityId"/>
|
||||
<result column="district_id" jdbcType="BIGINT" property="districtId"/>
|
||||
<result column="gender" jdbcType="INTEGER" property="gender"/>
|
||||
<result column="birthday" jdbcType="DATE" property="birthday"/>
|
||||
<result column="experience_level" jdbcType="TINYINT" property="experienceLevel"/>
|
||||
<result column="total_coin" jdbcType="INTEGER" property="totalCoin"/>
|
||||
<result column="left_coin" jdbcType="INTEGER" property="leftCoin"/>
|
||||
<result column="grade_id" jdbcType="INTEGER" property="gradeId"/>
|
||||
<result column="school_id" jdbcType="BIGINT" property="schoolId"/>
|
||||
<result column="register_time" jdbcType="TIMESTAMP" property="registerTime"/>
|
||||
<result column="status" jdbcType="TINYINT" property="status"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="filterRef">
|
||||
<if test="studentFilter != null">
|
||||
<if test="studentFilter.provinceId != null">
|
||||
AND zz_student.province_id = #{studentFilter.provinceId}
|
||||
</if>
|
||||
<if test="studentFilter.cityId != null">
|
||||
AND zz_student.city_id = #{studentFilter.cityId}
|
||||
</if>
|
||||
<if test="studentFilter.districtId != null">
|
||||
AND zz_student.district_id = #{studentFilter.districtId}
|
||||
</if>
|
||||
<if test="studentFilter.birthdayStart != null and studentFilter.birthdayStart != ''">
|
||||
AND zz_student.birthday >= #{studentFilter.birthdayStart}
|
||||
</if>
|
||||
<if test="studentFilter.birthdayEnd != null and studentFilter.birthdayEnd != ''">
|
||||
AND zz_student.birthday <= #{studentFilter.birthdayEnd}
|
||||
</if>
|
||||
<if test="studentFilter.gradeId != null">
|
||||
AND zz_student.grade_id = #{studentFilter.gradeId}
|
||||
</if>
|
||||
<if test="studentFilter.schoolId != null">
|
||||
AND zz_student.school_id = #{studentFilter.schoolId}
|
||||
</if>
|
||||
<if test="studentFilter.registerTimeStart != null and studentFilter.registerTimeStart != ''">
|
||||
AND zz_student.register_time >= #{studentFilter.registerTimeStart}
|
||||
</if>
|
||||
<if test="studentFilter.registerTimeEnd != null and studentFilter.registerTimeEnd != ''">
|
||||
AND zz_student.register_time <= #{studentFilter.registerTimeEnd}
|
||||
</if>
|
||||
<if test="studentFilter.status != null">
|
||||
AND zz_student.status = #{studentFilter.status}
|
||||
</if>
|
||||
<if test="studentFilter.searchString != null and studentFilter.searchString != ''">
|
||||
<bind name = "safeSearchString" value = "'%' + studentFilter.searchString + '%'" />
|
||||
AND CONCAT(IFNULL(zz_student.login_mobile,''), IFNULL(zz_student.student_name,'')) LIKE #{safeSearchString}
|
||||
</if>
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="getStudentList" resultMap="BaseResultMap" parameterType="com.orange.demo.courseclassservice.model.Student">
|
||||
SELECT * FROM zz_student
|
||||
<where>
|
||||
<if test="inFilterColumn != null and inFilterColumn != '' and inFilterValues != null and inFilterValues.size > 0">
|
||||
AND ${inFilterColumn} IN
|
||||
<foreach collection="inFilterValues" item="item" open="(" separator="," close=")">
|
||||
'${item}'
|
||||
</foreach>
|
||||
</if>
|
||||
<include refid="filterRef"/>
|
||||
</where>
|
||||
<if test="orderBy != null and orderBy != ''">
|
||||
ORDER BY ${orderBy}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getStudentCount" resultType="java.lang.Integer" parameterType="com.orange.demo.courseclassservice.model.Student">
|
||||
SELECT COUNT(1) FROM zz_student
|
||||
<where>
|
||||
<if test="inFilterColumn != null and inFilterColumn != '' and inFilterValues != null and inFilterValues.size > 0">
|
||||
AND ${inFilterColumn} IN
|
||||
<foreach collection="inFilterValues" item="item" open="(" separator="," close=")">
|
||||
'${item}'
|
||||
</foreach>
|
||||
</if>
|
||||
<include refid="filterRef"/>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getStudentListByClassId" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
zz_student.*
|
||||
FROM
|
||||
zz_student,
|
||||
zz_class_student
|
||||
<where>
|
||||
AND zz_class_student.class_id = #{classId}
|
||||
AND zz_class_student.student_id = zz_student.student_id
|
||||
<include refid="filterRef"/>
|
||||
</where>
|
||||
<if test="orderBy != null and orderBy != ''">
|
||||
ORDER BY ${orderBy}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getNotInStudentListByClassId" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
zz_student.*
|
||||
FROM
|
||||
zz_student
|
||||
<where>
|
||||
AND NOT EXISTS (SELECT * FROM zz_class_student
|
||||
WHERE zz_class_student.class_id = #{classId} AND zz_class_student.student_id = zz_student.student_id)
|
||||
<include refid="filterRef"/>
|
||||
</where>
|
||||
<if test="orderBy != null and orderBy != ''">
|
||||
ORDER BY ${orderBy}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.orange.demo.courseclassservice.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
/**
|
||||
* 行政区划实体对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Data
|
||||
@Table(name = "zz_area_code")
|
||||
public class AreaCode {
|
||||
|
||||
/**
|
||||
* 行政区划主键Id
|
||||
*/
|
||||
@Id
|
||||
@Column(name = "area_id")
|
||||
private Long areaId;
|
||||
|
||||
/**
|
||||
* 行政区划名称
|
||||
*/
|
||||
@Column(name = "area_name")
|
||||
private String areaName;
|
||||
|
||||
/**
|
||||
* 行政区划级别 (1: 省级别 2: 市级别 3: 区级别)
|
||||
*/
|
||||
@Column(name = "area_level")
|
||||
private Integer areaLevel;
|
||||
|
||||
/**
|
||||
* 父级行政区划Id
|
||||
*/
|
||||
@Column(name = "parent_id")
|
||||
private Long parentId;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.orange.demo.courseclassservice.model;
|
||||
|
||||
import lombok.Data;
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* ClassCourse实体对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Data
|
||||
@Table(name = "zz_class_course")
|
||||
public class ClassCourse {
|
||||
|
||||
/**
|
||||
* 班级Id。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,班级Id不能为空!")
|
||||
@Id
|
||||
@Column(name = "class_id")
|
||||
private Long classId;
|
||||
|
||||
/**
|
||||
* 课程Id。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,课程Id不能为空!")
|
||||
@Id
|
||||
@Column(name = "course_id")
|
||||
private Long courseId;
|
||||
|
||||
/**
|
||||
* 课程顺序(数值越小越靠前)。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,课程顺序(数值越小越靠前)不能为空!")
|
||||
@Column(name = "course_order")
|
||||
private Integer courseOrder;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.orange.demo.courseclassservice.model;
|
||||
|
||||
import lombok.Data;
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* ClassStudent实体对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Data
|
||||
@Table(name = "zz_class_student")
|
||||
public class ClassStudent {
|
||||
|
||||
/**
|
||||
* 班级Id。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,班级Id不能为空!")
|
||||
@Id
|
||||
@Column(name = "class_id")
|
||||
private Long classId;
|
||||
|
||||
/**
|
||||
* 学生Id。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,学生Id不能为空!")
|
||||
@Id
|
||||
@Column(name = "student_id")
|
||||
private Long studentId;
|
||||
}
|
||||
@@ -0,0 +1,198 @@
|
||||
package com.orange.demo.courseclassservice.model;
|
||||
|
||||
import com.orange.demo.courseclassinterface.constant.CourseDifficult;
|
||||
import com.orange.demo.application.common.constant.Subject;
|
||||
import com.orange.demo.common.core.upload.UploadStoreTypeEnum;
|
||||
import com.orange.demo.common.core.annotation.UploadFlagColumn;
|
||||
import com.orange.demo.common.core.annotation.RelationDict;
|
||||
import com.orange.demo.common.core.annotation.RelationConstDict;
|
||||
import com.orange.demo.common.core.base.mapper.BaseModelMapper;
|
||||
import com.orange.demo.common.core.validator.ConstDictRef;
|
||||
import com.orange.demo.courseclassinterface.dto.CourseDto;
|
||||
import lombok.Data;
|
||||
import org.mapstruct.*;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Course实体对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Data
|
||||
@Table(name = "zz_course")
|
||||
public class Course {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,主键Id不能为空!")
|
||||
@Id
|
||||
@Column(name = "course_id")
|
||||
private Long courseId;
|
||||
|
||||
/**
|
||||
* 课程名称。
|
||||
*/
|
||||
@NotBlank(message = "数据验证失败,课程名称不能为空!")
|
||||
@Column(name = "course_name")
|
||||
private String courseName;
|
||||
|
||||
/**
|
||||
* 课程价格。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,课程价格不能为空!")
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 课程描述。
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 课程难度(0: 容易 1: 普通 2: 很难)。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,课程难度不能为空!")
|
||||
@ConstDictRef(constDictClass = CourseDifficult.class, message = "数据验证失败,课程难度为无效值!")
|
||||
private Integer difficulty;
|
||||
|
||||
/**
|
||||
* 年级Id。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,所属年级不能为空!")
|
||||
@Column(name = "grade_id")
|
||||
private Integer gradeId;
|
||||
|
||||
/**
|
||||
* 学科Id。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,所属学科不能为空!")
|
||||
@ConstDictRef(constDictClass = Subject.class, message = "数据验证失败,所属学科为无效值!")
|
||||
@Column(name = "subject_id")
|
||||
private Integer subjectId;
|
||||
|
||||
/**
|
||||
* 课时数量。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,课时数量不能为空!")
|
||||
@Column(name = "class_hour")
|
||||
private Integer classHour;
|
||||
|
||||
/**
|
||||
* 多张课程图片地址。
|
||||
*/
|
||||
@UploadFlagColumn(storeType = UploadStoreTypeEnum.MINIO_SYSTEM)
|
||||
@NotBlank(message = "数据验证失败,课程图片不能为空!")
|
||||
@Column(name = "picture_url")
|
||||
private String pictureUrl;
|
||||
|
||||
/**
|
||||
* 创建用户Id。
|
||||
*/
|
||||
@Column(name = "create_user_id")
|
||||
private Long createUserId;
|
||||
|
||||
/**
|
||||
* 创建时间。
|
||||
*/
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 最后修改时间。
|
||||
*/
|
||||
@Column(name = "update_time")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* price 范围过滤起始值(>=)。
|
||||
*/
|
||||
@Transient
|
||||
private BigDecimal priceStart;
|
||||
|
||||
/**
|
||||
* price 范围过滤结束值(<=)。
|
||||
*/
|
||||
@Transient
|
||||
private BigDecimal priceEnd;
|
||||
|
||||
/**
|
||||
* classHour 范围过滤起始值(>=)。
|
||||
*/
|
||||
@Transient
|
||||
private Integer classHourStart;
|
||||
|
||||
/**
|
||||
* classHour 范围过滤结束值(<=)。
|
||||
*/
|
||||
@Transient
|
||||
private Integer classHourEnd;
|
||||
|
||||
/**
|
||||
* updateTime 范围过滤起始值(>=)。
|
||||
*/
|
||||
@Transient
|
||||
private String updateTimeStart;
|
||||
|
||||
/**
|
||||
* updateTime 范围过滤结束值(<=)。
|
||||
*/
|
||||
@Transient
|
||||
private String updateTimeEnd;
|
||||
|
||||
/**
|
||||
* courseId 的多对多关联表数据对象。
|
||||
*/
|
||||
@Transient
|
||||
private ClassCourse classCourse;
|
||||
|
||||
@RelationDict(
|
||||
masterIdField = "gradeId",
|
||||
slaveServiceName = "gradeService",
|
||||
slaveModelClass = Grade.class,
|
||||
slaveIdField = "gradeId",
|
||||
slaveNameField = "gradeName")
|
||||
@Transient
|
||||
private Map<String, Object> gradeIdDictMap;
|
||||
|
||||
@RelationConstDict(
|
||||
masterIdField = "difficulty",
|
||||
constantDictClass = CourseDifficult.class)
|
||||
@Transient
|
||||
private Map<String, Object> difficultyDictMap;
|
||||
|
||||
@RelationConstDict(
|
||||
masterIdField = "subjectId",
|
||||
constantDictClass = Subject.class)
|
||||
@Transient
|
||||
private Map<String, Object> subjectIdDictMap;
|
||||
|
||||
@Mapper
|
||||
public interface CourseModelMapper extends BaseModelMapper<CourseDto, Course> {
|
||||
/**
|
||||
* 转换Dto对象到实体对象。
|
||||
*
|
||||
* @param courseDto 域对象。
|
||||
* @return 实体对象。
|
||||
*/
|
||||
@Mapping(target = "classCourse", expression = "java(mapToBean(courseDto.getClassCourse(), com.orange.demo.courseclassservice.model.ClassCourse.class))")
|
||||
@Override
|
||||
Course toModel(CourseDto courseDto);
|
||||
/**
|
||||
* 转换实体对象到Dto对象。
|
||||
*
|
||||
* @param course 实体对象。
|
||||
* @return 域对象。
|
||||
*/
|
||||
@Mapping(target = "classCourse", expression = "java(beanToMap(course.getClassCourse(), false))")
|
||||
@Override
|
||||
CourseDto fromModel(Course course);
|
||||
}
|
||||
public static final CourseModelMapper INSTANCE = Mappers.getMapper(CourseModelMapper.class);
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.orange.demo.courseclassservice.model;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.orange.demo.common.core.annotation.DeletedFlagColumn;
|
||||
import lombok.Data;
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* Grade实体对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Data
|
||||
@Table(name = "zz_grade")
|
||||
public class Grade {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,主键Id不能为空!")
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "grade_id")
|
||||
private Integer gradeId;
|
||||
|
||||
/**
|
||||
* 年级名称。
|
||||
*/
|
||||
@NotBlank(message = "数据验证失败,年级名称不能为空!")
|
||||
@Column(name = "grade_name")
|
||||
private String gradeName;
|
||||
|
||||
/**
|
||||
* 逻辑删除标记字段(1: 正常 -1: 已删除)。
|
||||
*/
|
||||
@JSONField(serialize = false)
|
||||
@DeletedFlagColumn
|
||||
private Integer status;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.orange.demo.courseclassservice.model;
|
||||
|
||||
import lombok.Data;
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* MaterialEdition实体对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Data
|
||||
@Table(name = "zz_material_edition")
|
||||
public class MaterialEdition {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,主键Id不能为空!")
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "edition_id")
|
||||
private Integer editionId;
|
||||
|
||||
/**
|
||||
* 教材版本名称。
|
||||
*/
|
||||
@NotBlank(message = "数据验证失败,教材版本名称不能为空!")
|
||||
@Column(name = "edition_name")
|
||||
private String editionName;
|
||||
|
||||
/**
|
||||
* 是否正在使用(0:不是,1:是)。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,是否正在使用(0:不是,1:是)不能为空!")
|
||||
private Integer status;
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package com.orange.demo.courseclassservice.model;
|
||||
|
||||
import com.orange.demo.common.core.annotation.RelationDict;
|
||||
import com.orange.demo.common.core.base.mapper.BaseModelMapper;
|
||||
import com.orange.demo.courseclassinterface.dto.SchoolInfoDto;
|
||||
import lombok.Data;
|
||||
import org.mapstruct.*;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* SchoolInfo实体对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Data
|
||||
@Table(name = "zz_school_info")
|
||||
public class SchoolInfo {
|
||||
|
||||
/**
|
||||
* 学校Id。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,学校Id不能为空!")
|
||||
@Id
|
||||
@Column(name = "school_id")
|
||||
private Long schoolId;
|
||||
|
||||
/**
|
||||
* 学校名称。
|
||||
*/
|
||||
@NotBlank(message = "数据验证失败,学校名称不能为空!")
|
||||
@Column(name = "school_name")
|
||||
private String schoolName;
|
||||
|
||||
/**
|
||||
* 所在省Id。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,所在省份不能为空!")
|
||||
@Column(name = "province_id")
|
||||
private Long provinceId;
|
||||
|
||||
/**
|
||||
* 所在城市Id。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,所在城市不能为空!")
|
||||
@Column(name = "city_id")
|
||||
private Long cityId;
|
||||
|
||||
@RelationDict(
|
||||
masterIdField = "provinceId",
|
||||
slaveServiceName = "areaCodeService",
|
||||
slaveModelClass = AreaCode.class,
|
||||
slaveIdField = "areaId",
|
||||
slaveNameField = "areaName")
|
||||
@Transient
|
||||
private Map<String, Object> provinceIdDictMap;
|
||||
|
||||
@RelationDict(
|
||||
masterIdField = "cityId",
|
||||
slaveServiceName = "areaCodeService",
|
||||
slaveModelClass = AreaCode.class,
|
||||
slaveIdField = "areaId",
|
||||
slaveNameField = "areaName")
|
||||
@Transient
|
||||
private Map<String, Object> cityIdDictMap;
|
||||
|
||||
@Mapper
|
||||
public interface SchoolInfoModelMapper extends BaseModelMapper<SchoolInfoDto, SchoolInfo> {
|
||||
/**
|
||||
* 转换Dto对象到实体对象。
|
||||
*
|
||||
* @param schoolInfoDto 域对象。
|
||||
* @return 实体对象。
|
||||
*/
|
||||
@Override
|
||||
SchoolInfo toModel(SchoolInfoDto schoolInfoDto);
|
||||
/**
|
||||
* 转换实体对象到Dto对象。
|
||||
*
|
||||
* @param schoolInfo 实体对象。
|
||||
* @return 域对象。
|
||||
*/
|
||||
@Override
|
||||
SchoolInfoDto fromModel(SchoolInfo schoolInfo);
|
||||
}
|
||||
public static final SchoolInfoModelMapper INSTANCE = Mappers.getMapper(SchoolInfoModelMapper.class);
|
||||
}
|
||||
@@ -0,0 +1,248 @@
|
||||
package com.orange.demo.courseclassservice.model;
|
||||
|
||||
import com.orange.demo.application.common.constant.Gender;
|
||||
import com.orange.demo.application.common.constant.ExpLevel;
|
||||
import com.orange.demo.application.common.constant.StudentStatus;
|
||||
import com.orange.demo.common.core.annotation.RelationDict;
|
||||
import com.orange.demo.common.core.annotation.RelationConstDict;
|
||||
import com.orange.demo.common.core.base.mapper.BaseModelMapper;
|
||||
import com.orange.demo.common.core.validator.ConstDictRef;
|
||||
import com.orange.demo.courseclassinterface.dto.StudentDto;
|
||||
import lombok.Data;
|
||||
import org.mapstruct.*;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Student实体对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Data
|
||||
@Table(name = "zz_student")
|
||||
public class Student {
|
||||
|
||||
/**
|
||||
* 学生Id。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,学生Id不能为空!")
|
||||
@Id
|
||||
@Column(name = "student_id")
|
||||
private Long studentId;
|
||||
|
||||
/**
|
||||
* 登录手机。
|
||||
*/
|
||||
@NotBlank(message = "数据验证失败,手机号码不能为空!")
|
||||
@Column(name = "login_mobile")
|
||||
private String loginMobile;
|
||||
|
||||
/**
|
||||
* 学生姓名。
|
||||
*/
|
||||
@NotBlank(message = "数据验证失败,姓名不能为空!")
|
||||
@Column(name = "student_name")
|
||||
private String studentName;
|
||||
|
||||
/**
|
||||
* 所在省份Id。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,所在省份不能为空!")
|
||||
@Column(name = "province_id")
|
||||
private Long provinceId;
|
||||
|
||||
/**
|
||||
* 所在城市Id。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,所在城市不能为空!")
|
||||
@Column(name = "city_id")
|
||||
private Long cityId;
|
||||
|
||||
/**
|
||||
* 区县Id。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,所在区县不能为空!")
|
||||
@Column(name = "district_id")
|
||||
private Long districtId;
|
||||
|
||||
/**
|
||||
* 学生性别 (0: 女生 1: 男生)。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,性别不能为空!")
|
||||
@ConstDictRef(constDictClass = Gender.class, message = "数据验证失败,性别为无效值!")
|
||||
private Integer gender;
|
||||
|
||||
/**
|
||||
* 生日。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,生日不能为空!")
|
||||
private Date birthday;
|
||||
|
||||
/**
|
||||
* 经验等级 (0: 初级 1: 中级 2: 高级 3: 资深)。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,经验等级不能为空!")
|
||||
@ConstDictRef(constDictClass = ExpLevel.class, message = "数据验证失败,经验等级为无效值!")
|
||||
@Column(name = "experience_level")
|
||||
private Integer experienceLevel;
|
||||
|
||||
/**
|
||||
* 总共充值学币数量。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,充值学币不能为空!")
|
||||
@Column(name = "total_coin")
|
||||
private Integer totalCoin;
|
||||
|
||||
/**
|
||||
* 可用学币数量。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,剩余学币不能为空!")
|
||||
@Column(name = "left_coin")
|
||||
private Integer leftCoin;
|
||||
|
||||
/**
|
||||
* 年级Id。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,年级不能为空!")
|
||||
@Column(name = "grade_id")
|
||||
private Integer gradeId;
|
||||
|
||||
/**
|
||||
* 校区Id。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,所属校区不能为空!")
|
||||
@Column(name = "school_id")
|
||||
private Long schoolId;
|
||||
|
||||
/**
|
||||
* 注册时间。
|
||||
*/
|
||||
@Column(name = "register_time")
|
||||
private Date registerTime;
|
||||
|
||||
/**
|
||||
* 学生状态 (0: 正常 1: 锁定 2: 注销)。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,状态 不能为空!")
|
||||
@ConstDictRef(constDictClass = StudentStatus.class, message = "数据验证失败,状态 为无效值!")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* birthday 范围过滤起始值(>=)。
|
||||
*/
|
||||
@Transient
|
||||
private String birthdayStart;
|
||||
|
||||
/**
|
||||
* birthday 范围过滤结束值(<=)。
|
||||
*/
|
||||
@Transient
|
||||
private String birthdayEnd;
|
||||
|
||||
/**
|
||||
* registerTime 范围过滤起始值(>=)。
|
||||
*/
|
||||
@Transient
|
||||
private String registerTimeStart;
|
||||
|
||||
/**
|
||||
* registerTime 范围过滤结束值(<=)。
|
||||
*/
|
||||
@Transient
|
||||
private String registerTimeEnd;
|
||||
|
||||
/**
|
||||
* true LIKE搜索字符串。
|
||||
*/
|
||||
@Transient
|
||||
private String searchString;
|
||||
|
||||
@RelationDict(
|
||||
masterIdField = "provinceId",
|
||||
slaveServiceName = "areaCodeService",
|
||||
slaveModelClass = AreaCode.class,
|
||||
slaveIdField = "areaId",
|
||||
slaveNameField = "areaName")
|
||||
@Transient
|
||||
private Map<String, Object> provinceIdDictMap;
|
||||
|
||||
@RelationDict(
|
||||
masterIdField = "cityId",
|
||||
slaveServiceName = "areaCodeService",
|
||||
slaveModelClass = AreaCode.class,
|
||||
slaveIdField = "areaId",
|
||||
slaveNameField = "areaName")
|
||||
@Transient
|
||||
private Map<String, Object> cityIdDictMap;
|
||||
|
||||
@RelationDict(
|
||||
masterIdField = "districtId",
|
||||
slaveServiceName = "areaCodeService",
|
||||
slaveModelClass = AreaCode.class,
|
||||
slaveIdField = "areaId",
|
||||
slaveNameField = "areaName")
|
||||
@Transient
|
||||
private Map<String, Object> districtIdDictMap;
|
||||
|
||||
@RelationDict(
|
||||
masterIdField = "gradeId",
|
||||
slaveServiceName = "gradeService",
|
||||
slaveModelClass = Grade.class,
|
||||
slaveIdField = "gradeId",
|
||||
slaveNameField = "gradeName")
|
||||
@Transient
|
||||
private Map<String, Object> gradeIdDictMap;
|
||||
|
||||
@RelationDict(
|
||||
masterIdField = "schoolId",
|
||||
slaveServiceName = "schoolInfoService",
|
||||
slaveModelClass = SchoolInfo.class,
|
||||
slaveIdField = "schoolId",
|
||||
slaveNameField = "schoolName")
|
||||
@Transient
|
||||
private Map<String, Object> schoolIdDictMap;
|
||||
|
||||
@RelationConstDict(
|
||||
masterIdField = "gender",
|
||||
constantDictClass = Gender.class)
|
||||
@Transient
|
||||
private Map<String, Object> genderDictMap;
|
||||
|
||||
@RelationConstDict(
|
||||
masterIdField = "experienceLevel",
|
||||
constantDictClass = ExpLevel.class)
|
||||
@Transient
|
||||
private Map<String, Object> experienceLevelDictMap;
|
||||
|
||||
@RelationConstDict(
|
||||
masterIdField = "status",
|
||||
constantDictClass = StudentStatus.class)
|
||||
@Transient
|
||||
private Map<String, Object> statusDictMap;
|
||||
|
||||
@Mapper
|
||||
public interface StudentModelMapper extends BaseModelMapper<StudentDto, Student> {
|
||||
/**
|
||||
* 转换Dto对象到实体对象。
|
||||
*
|
||||
* @param studentDto 域对象。
|
||||
* @return 实体对象。
|
||||
*/
|
||||
@Override
|
||||
Student toModel(StudentDto studentDto);
|
||||
/**
|
||||
* 转换实体对象到Dto对象。
|
||||
*
|
||||
* @param student 实体对象。
|
||||
* @return 域对象。
|
||||
*/
|
||||
@Override
|
||||
StudentDto fromModel(Student student);
|
||||
}
|
||||
public static final StudentModelMapper INSTANCE = Mappers.getMapper(StudentModelMapper.class);
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
package com.orange.demo.courseclassservice.model;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.orange.demo.courseclassinterface.constant.ClassLevel;
|
||||
import com.orange.demo.common.core.annotation.RelationDict;
|
||||
import com.orange.demo.common.core.annotation.RelationConstDict;
|
||||
import com.orange.demo.common.core.base.mapper.BaseModelMapper;
|
||||
import com.orange.demo.common.core.annotation.DeletedFlagColumn;
|
||||
import com.orange.demo.common.core.validator.ConstDictRef;
|
||||
import com.orange.demo.courseclassinterface.dto.StudentClassDto;
|
||||
import lombok.Data;
|
||||
import org.mapstruct.*;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* StudentClass实体对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Data
|
||||
@Table(name = "zz_class")
|
||||
public class StudentClass {
|
||||
|
||||
/**
|
||||
* 班级Id。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,班级Id不能为空!")
|
||||
@Id
|
||||
@Column(name = "class_id")
|
||||
private Long classId;
|
||||
|
||||
/**
|
||||
* 班级名称。
|
||||
*/
|
||||
@NotBlank(message = "数据验证失败,班级名称不能为空!")
|
||||
@Column(name = "class_name")
|
||||
private String className;
|
||||
|
||||
/**
|
||||
* 学校Id。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,所属校区不能为空!")
|
||||
@Column(name = "school_id")
|
||||
private Long schoolId;
|
||||
|
||||
/**
|
||||
* 学生班长Id。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,班长不能为空!")
|
||||
@Column(name = "leader_id")
|
||||
private Long leaderId;
|
||||
|
||||
/**
|
||||
* 已完成课时数量。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,已完成课时不能为空!")
|
||||
@Column(name = "finish_class_hour")
|
||||
private Integer finishClassHour;
|
||||
|
||||
/**
|
||||
* 班级级别(0: 初级班 1: 培优班 2: 冲刺提分班 3: 竞赛班)。
|
||||
*/
|
||||
@NotNull(message = "数据验证失败,班级级别不能为空!")
|
||||
@ConstDictRef(constDictClass = ClassLevel.class, message = "数据验证失败,班级级别为无效值!")
|
||||
@Column(name = "class_level")
|
||||
private Integer classLevel;
|
||||
|
||||
/**
|
||||
* 创建用户。
|
||||
*/
|
||||
@Column(name = "create_user_id")
|
||||
private Long createUserId;
|
||||
|
||||
/**
|
||||
* 班级创建时间。
|
||||
*/
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 逻辑删除标记字段(1: 正常 -1: 已删除)。
|
||||
*/
|
||||
@JSONField(serialize = false)
|
||||
@DeletedFlagColumn
|
||||
private Integer status;
|
||||
|
||||
@RelationDict(
|
||||
masterIdField = "schoolId",
|
||||
slaveServiceName = "schoolInfoService",
|
||||
slaveModelClass = SchoolInfo.class,
|
||||
slaveIdField = "schoolId",
|
||||
slaveNameField = "schoolName")
|
||||
@Transient
|
||||
private Map<String, Object> schoolIdDictMap;
|
||||
|
||||
@RelationDict(
|
||||
masterIdField = "leaderId",
|
||||
slaveServiceName = "studentService",
|
||||
slaveModelClass = Student.class,
|
||||
slaveIdField = "studentId",
|
||||
slaveNameField = "studentName")
|
||||
@Transient
|
||||
private Map<String, Object> leaderIdDictMap;
|
||||
|
||||
@RelationConstDict(
|
||||
masterIdField = "classLevel",
|
||||
constantDictClass = ClassLevel.class)
|
||||
@Transient
|
||||
private Map<String, Object> classLevelDictMap;
|
||||
|
||||
@Mapper
|
||||
public interface StudentClassModelMapper extends BaseModelMapper<StudentClassDto, StudentClass> {
|
||||
/**
|
||||
* 转换Dto对象到实体对象。
|
||||
*
|
||||
* @param studentClassDto 域对象。
|
||||
* @return 实体对象。
|
||||
*/
|
||||
@Override
|
||||
StudentClass toModel(StudentClassDto studentClassDto);
|
||||
/**
|
||||
* 转换实体对象到Dto对象。
|
||||
*
|
||||
* @param studentClass 实体对象。
|
||||
* @return 域对象。
|
||||
*/
|
||||
@Override
|
||||
StudentClassDto fromModel(StudentClass studentClass);
|
||||
}
|
||||
public static final StudentClassModelMapper INSTANCE = Mappers.getMapper(StudentClassModelMapper.class);
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.orange.demo.courseclassservice.service;
|
||||
|
||||
import com.orange.demo.courseclassinterface.dto.AreaCodeDto;
|
||||
import com.orange.demo.courseclassservice.dao.AreaCodeMapper;
|
||||
import com.orange.demo.courseclassservice.model.AreaCode;
|
||||
import com.orange.demo.common.core.cache.MapTreeDictionaryCache;
|
||||
import com.orange.demo.common.core.base.service.BaseDictService;
|
||||
import com.orange.demo.common.core.base.dao.BaseDaoMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 行政区划的Service类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Service
|
||||
public class AreaCodeService extends BaseDictService<AreaCode, AreaCodeDto, Long> {
|
||||
|
||||
@Autowired
|
||||
private AreaCodeMapper areaCodeMapper;
|
||||
|
||||
public AreaCodeService() {
|
||||
super();
|
||||
this.dictionaryCache = MapTreeDictionaryCache.create(AreaCode::getAreaId, AreaCode::getParentId);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BaseDaoMapper<AreaCode> mapper() {
|
||||
return areaCodeMapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载数据库数据到内存缓存。
|
||||
*/
|
||||
@Override
|
||||
public void loadCachedData() {
|
||||
Example e = new Example(AreaCode.class);
|
||||
e.orderBy("areaLevel");
|
||||
List<AreaCode> areaCodeList = areaCodeMapper.selectByExample(e);
|
||||
dictionaryCache.putAll(areaCodeList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据上级行政区划Id,获取其下级行政区划列表。
|
||||
*
|
||||
* @param parentId 上级行政区划Id。
|
||||
* @return 下级行政区划列表。
|
||||
*/
|
||||
public Collection<AreaCode> getListByParentId(Long parentId) {
|
||||
return ((MapTreeDictionaryCache<Long, AreaCode>) dictionaryCache).getListByParentId(parentId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,212 @@
|
||||
package com.orange.demo.courseclassservice.service;
|
||||
|
||||
import com.orange.demo.courseclassservice.dao.*;
|
||||
import com.orange.demo.courseclassservice.model.*;
|
||||
import com.orange.demo.courseclassinterface.dto.*;
|
||||
import com.orange.demo.common.core.util.*;
|
||||
import com.orange.demo.common.core.object.MyRelationParam;
|
||||
import com.orange.demo.common.core.object.CallResult;
|
||||
import com.orange.demo.common.core.object.TokenData;
|
||||
import com.orange.demo.common.core.object.MyWhereCriteria;
|
||||
import com.orange.demo.common.core.base.dao.BaseDaoMapper;
|
||||
import com.orange.demo.common.core.base.service.BaseService;
|
||||
import com.orange.demo.common.sequence.wrapper.IdGeneratorWrapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 课程数据数据操作服务类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Service
|
||||
public class CourseService extends BaseService<Course, CourseDto, Long> {
|
||||
|
||||
@Autowired
|
||||
private CourseMapper courseMapper;
|
||||
@Autowired
|
||||
private ClassCourseMapper classCourseMapper;
|
||||
@Autowired
|
||||
private GradeService gradeService;
|
||||
@Autowired
|
||||
private IdGeneratorWrapper idGenerator;
|
||||
|
||||
/**
|
||||
* 返回当前Service的主表Mapper对象。
|
||||
*
|
||||
* @return 主表Mapper对象。
|
||||
*/
|
||||
@Override
|
||||
protected BaseDaoMapper<Course> mapper() {
|
||||
return courseMapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存新增对象。
|
||||
*
|
||||
* @param course 新增对象。
|
||||
* @return 返回新增对象。
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Course saveNew(Course course) {
|
||||
course.setCourseId(idGenerator.nextLongId());
|
||||
TokenData tokenData = TokenData.takeFromRequest();
|
||||
course.setCreateUserId(tokenData.getUserId());
|
||||
Date now = new Date();
|
||||
course.setCreateTime(now);
|
||||
course.setUpdateTime(now);
|
||||
courseMapper.insert(course);
|
||||
return course;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新数据对象。
|
||||
*
|
||||
* @param course 更新的对象。
|
||||
* @param originalCourse 原有数据对象。
|
||||
* @return 成功返回true,否则false。
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean update(Course course, Course originalCourse) {
|
||||
course.setCreateUserId(originalCourse.getCreateUserId());
|
||||
course.setCreateTime(originalCourse.getCreateTime());
|
||||
course.setUpdateTime(new Date());
|
||||
// 这里重点提示,在执行主表数据更新之前,如果有哪些字段不支持修改操作,请用原有数据对象字段替换当前数据字段。
|
||||
return courseMapper.updateByPrimaryKey(course) == 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除指定数据。
|
||||
*
|
||||
* @param courseId 主键Id。
|
||||
* @return 成功返回true,否则false。
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean remove(Long courseId) {
|
||||
// 这里先删除主数据
|
||||
if (courseMapper.deleteByPrimaryKey(courseId) == 0) {
|
||||
return false;
|
||||
}
|
||||
// 这里可继续删除关联数据。
|
||||
// 开始删除多对多父表的关联
|
||||
ClassCourse classCourse = new ClassCourse();
|
||||
classCourse.setCourseId(courseId);
|
||||
classCourseMapper.delete(classCourse);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取单表查询结果。由于没有关联数据查询,因此在仅仅获取单表数据的场景下,效率更高。
|
||||
* 如果需要同时获取关联数据,请移步(getCourseListWithRelation)方法。
|
||||
*
|
||||
* @param filter 过滤对象。
|
||||
* @param orderBy 排序参数。
|
||||
* @return 查询结果集。
|
||||
*/
|
||||
public List<Course> getCourseList(Course filter, String orderBy) {
|
||||
return courseMapper.getCourseList(null, null, filter, orderBy);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取主表的查询结果,查询条件中包括主表过滤对象和指定字段的(in list)过滤。
|
||||
* 由于没有关联数据查询,因此在仅仅获取单表数据的场景下,效率更高。
|
||||
* 如果需要同时获取关联数据,请移步(getCourseListWithRelation)方法。
|
||||
*
|
||||
* @param inFilterField (In-list)指定的字段(Java成员字段,而非数据列名)。
|
||||
* @param inFilterValues inFilterField指定字段的(In-list)数据列表。
|
||||
* @param filter 过滤对象。
|
||||
* @param orderBy 排序参数。
|
||||
* @return 查询结果集。
|
||||
*/
|
||||
public <M> List<Course> getCourseList(
|
||||
String inFilterField, Set<M> inFilterValues, Course filter, String orderBy) {
|
||||
String inFilterColumn = MyModelUtil.mapToColumnName(inFilterField, Course.class);
|
||||
return courseMapper.getCourseList(inFilterColumn, inFilterValues, filter, orderBy);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取主表的查询结果,以及主表关联的字典数据和一对一从表数据,以及一对一从表的字典数据。
|
||||
* 如果仅仅需要获取主表数据,请移步(getCourseList),以便获取更好的查询性能。
|
||||
*
|
||||
* @param filter 主表过滤对象。
|
||||
* @param orderBy 排序对象。
|
||||
* @return 查询结果集。
|
||||
*/
|
||||
public List<Course> getCourseListWithRelation(Course filter, String orderBy) {
|
||||
List<Course> resultList = courseMapper.getCourseList(null, null, filter, orderBy);
|
||||
Map<String, List<MyWhereCriteria>> criteriaMap = buildAggregationAdditionalWhereCriteria();
|
||||
this.buildRelationForDataList(resultList, MyRelationParam.normal(), criteriaMap);
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取主表的查询结果,查询条件中包括主表过滤对象和指定字段的(in list)过滤。
|
||||
* 同时还包含主表关联的字典数据和一对一从表数据,以及一对一从表的字典数据。
|
||||
* 如果仅仅需要获取主表数据,请移步(getCourseList),以便获取更好的查询性能。
|
||||
*
|
||||
* @param inFilterField (In-list)指定的字段(Java成员字段,而非数据列名)。
|
||||
* @param inFilterValues inFilterField指定字段的(In-list)数据列表。
|
||||
* @param filter 主表过滤对象。
|
||||
* @param orderBy 排序对象。
|
||||
* @return 查询结果集。
|
||||
*/
|
||||
public <M> List<Course> getCourseListWithRelation(
|
||||
String inFilterField, Set<M> inFilterValues, Course filter, String orderBy) {
|
||||
List<Course> resultList =
|
||||
courseMapper.getCourseList(inFilterField, inFilterValues, filter, orderBy);
|
||||
this.buildRelationForDataList(resultList, MyRelationParam.dictOnly(), null);
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 在多对多关系中,当前Service的数据表为从表,返回不与指定主表主键Id存在对多对关系的列表。
|
||||
*
|
||||
* @param classId 主表的关联键Id。
|
||||
* @param filter 从表的过滤对象。
|
||||
* @param orderBy 排序参数。
|
||||
* @return 查询结果集。
|
||||
*/
|
||||
public List<Course> getNotInCourseListByClassId(
|
||||
Long classId, Course filter, String orderBy) {
|
||||
List<Course> resultList =
|
||||
courseMapper.getNotInCourseListByClassId(classId, filter, orderBy);
|
||||
this.buildRelationForDataList(resultList, MyRelationParam.dictOnly(), null);
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 在多对多关系中,当前Service的数据表为从表,返回与指定主表主键Id存在对多对关系的列表。
|
||||
*
|
||||
* @param classId 主表的关联键Id。
|
||||
* @param filter 从表的过滤对象。
|
||||
* @param orderBy 排序参数。
|
||||
* @return 查询结果集。
|
||||
*/
|
||||
public List<Course> getCourseListByClassId(
|
||||
Long classId, Course filter, String orderBy) {
|
||||
List<Course> resultList =
|
||||
courseMapper.getCourseListByClassId(classId, filter, orderBy);
|
||||
this.buildRelationForDataList(resultList, MyRelationParam.dictOnly(), null);
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据最新对象和原有对象的数据对比,判断关联的字典数据和多对一主表数据是否都是合法数据。
|
||||
*
|
||||
* @param course 最新数据对象。
|
||||
* @param originalCourse 原有数据对象。
|
||||
* @return 数据全部正确返回true,否则false,同时返回具体的错误信息。
|
||||
*/
|
||||
public CallResult verifyRelatedData(Course course, Course originalCourse) {
|
||||
String errorMessageFormat = "数据验证失败,关联的%s并不存在,请刷新后重试!";
|
||||
if (this.needToVerify(course, originalCourse, Course::getGradeId)
|
||||
&& !gradeService.existId(course.getGradeId())) {
|
||||
return CallResult.error(String.format(errorMessageFormat, "所属年级"));
|
||||
}
|
||||
return CallResult.ok();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.orange.demo.courseclassservice.service;
|
||||
|
||||
import com.orange.demo.common.redis.cache.RedisDictionaryCache;
|
||||
import com.orange.demo.common.core.base.service.BaseDictService;
|
||||
import com.orange.demo.common.core.base.dao.BaseDaoMapper;
|
||||
import com.orange.demo.common.core.constant.GlobalDeletedFlag;
|
||||
import com.orange.demo.courseclassservice.dao.GradeMapper;
|
||||
import com.orange.demo.courseclassservice.model.Grade;
|
||||
import com.orange.demo.courseclassinterface.dto.GradeDto;
|
||||
import org.redisson.api.RedissonClient;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
/**
|
||||
* 年级数据操作服务类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Service
|
||||
public class GradeService extends BaseDictService<Grade, GradeDto, Integer> {
|
||||
|
||||
@Autowired
|
||||
private GradeMapper gradeMapper;
|
||||
@Autowired
|
||||
private RedissonClient redissonClient;
|
||||
|
||||
public GradeService() {
|
||||
super();
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
this.dictionaryCache = RedisDictionaryCache.create(
|
||||
redissonClient, "Grade", Grade.class, Grade::getGradeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回当前Service的主表Mapper对象。
|
||||
*
|
||||
* @return 主表Mapper对象。
|
||||
*/
|
||||
@Override
|
||||
protected BaseDaoMapper<Grade> mapper() {
|
||||
return gradeMapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存新增对象。
|
||||
*
|
||||
* @param grade 新增对象。
|
||||
* @return 返回新增对象。
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Grade saveNew(Grade grade) {
|
||||
grade.setStatus(GlobalDeletedFlag.NORMAL);
|
||||
gradeMapper.insert(grade);
|
||||
dictionaryCache.put(grade.getGradeId(), grade);
|
||||
return grade;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新数据对象。
|
||||
*
|
||||
* @param grade 更新的对象。
|
||||
* @param originalGrade 原有数据对象。
|
||||
* @return 成功返回true,否则false。
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean update(Grade grade, Grade originalGrade) {
|
||||
grade.setStatus(GlobalDeletedFlag.NORMAL);
|
||||
if (gradeMapper.updateByPrimaryKey(grade) != 1) {
|
||||
return false;
|
||||
}
|
||||
dictionaryCache.put(grade.getGradeId(), grade);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除指定数据。
|
||||
*
|
||||
* @param gradeId 主键Id。
|
||||
* @return 成功返回true,否则false。
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean remove(Integer gradeId) {
|
||||
Grade deletedObject = new Grade();
|
||||
deletedObject.setGradeId(gradeId);
|
||||
deletedObject.setStatus(GlobalDeletedFlag.DELETED);
|
||||
if (gradeMapper.updateByPrimaryKeySelective(deletedObject) != 1) {
|
||||
return false;
|
||||
}
|
||||
dictionaryCache.invalidate(gradeId);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,164 @@
|
||||
package com.orange.demo.courseclassservice.service;
|
||||
|
||||
import com.orange.demo.courseclassservice.dao.*;
|
||||
import com.orange.demo.courseclassservice.model.*;
|
||||
import com.orange.demo.courseclassinterface.dto.*;
|
||||
import com.orange.demo.common.core.util.*;
|
||||
import com.orange.demo.common.core.object.MyRelationParam;
|
||||
import com.orange.demo.common.core.object.CallResult;
|
||||
import com.orange.demo.common.core.object.MyWhereCriteria;
|
||||
import com.orange.demo.common.core.base.dao.BaseDaoMapper;
|
||||
import com.orange.demo.common.core.base.service.BaseService;
|
||||
import com.orange.demo.common.sequence.wrapper.IdGeneratorWrapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 校区数据数据操作服务类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Service
|
||||
public class SchoolInfoService extends BaseService<SchoolInfo, SchoolInfoDto, Long> {
|
||||
|
||||
@Autowired
|
||||
private SchoolInfoMapper schoolInfoMapper;
|
||||
@Autowired
|
||||
private AreaCodeService areaCodeService;
|
||||
@Autowired
|
||||
private IdGeneratorWrapper idGenerator;
|
||||
|
||||
/**
|
||||
* 返回当前Service的主表Mapper对象。
|
||||
*
|
||||
* @return 主表Mapper对象。
|
||||
*/
|
||||
@Override
|
||||
protected BaseDaoMapper<SchoolInfo> mapper() {
|
||||
return schoolInfoMapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存新增对象。
|
||||
*
|
||||
* @param schoolInfo 新增对象。
|
||||
* @return 返回新增对象。
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public SchoolInfo saveNew(SchoolInfo schoolInfo) {
|
||||
schoolInfo.setSchoolId(idGenerator.nextLongId());
|
||||
schoolInfoMapper.insert(schoolInfo);
|
||||
return schoolInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新数据对象。
|
||||
*
|
||||
* @param schoolInfo 更新的对象。
|
||||
* @param originalSchoolInfo 原有数据对象。
|
||||
* @return 成功返回true,否则false。
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean update(SchoolInfo schoolInfo, SchoolInfo originalSchoolInfo) {
|
||||
// 这里重点提示,在执行主表数据更新之前,如果有哪些字段不支持修改操作,请用原有数据对象字段替换当前数据字段。
|
||||
return schoolInfoMapper.updateByPrimaryKey(schoolInfo) == 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除指定数据。
|
||||
*
|
||||
* @param schoolId 主键Id。
|
||||
* @return 成功返回true,否则false。
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean remove(Long schoolId) {
|
||||
return schoolInfoMapper.deleteByPrimaryKey(schoolId) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取单表查询结果。由于没有关联数据查询,因此在仅仅获取单表数据的场景下,效率更高。
|
||||
* 如果需要同时获取关联数据,请移步(getSchoolInfoListWithRelation)方法。
|
||||
*
|
||||
* @param filter 过滤对象。
|
||||
* @param orderBy 排序参数。
|
||||
* @return 查询结果集。
|
||||
*/
|
||||
public List<SchoolInfo> getSchoolInfoList(SchoolInfo filter, String orderBy) {
|
||||
return schoolInfoMapper.getSchoolInfoList(null, null, filter, orderBy);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取主表的查询结果,查询条件中包括主表过滤对象和指定字段的(in list)过滤。
|
||||
* 由于没有关联数据查询,因此在仅仅获取单表数据的场景下,效率更高。
|
||||
* 如果需要同时获取关联数据,请移步(getSchoolInfoListWithRelation)方法。
|
||||
*
|
||||
* @param inFilterField (In-list)指定的字段(Java成员字段,而非数据列名)。
|
||||
* @param inFilterValues inFilterField指定字段的(In-list)数据列表。
|
||||
* @param filter 过滤对象。
|
||||
* @param orderBy 排序参数。
|
||||
* @return 查询结果集。
|
||||
*/
|
||||
public <M> List<SchoolInfo> getSchoolInfoList(
|
||||
String inFilterField, Set<M> inFilterValues, SchoolInfo filter, String orderBy) {
|
||||
String inFilterColumn = MyModelUtil.mapToColumnName(inFilterField, SchoolInfo.class);
|
||||
return schoolInfoMapper.getSchoolInfoList(inFilterColumn, inFilterValues, filter, orderBy);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取主表的查询结果,以及主表关联的字典数据和一对一从表数据,以及一对一从表的字典数据。
|
||||
* 如果仅仅需要获取主表数据,请移步(getSchoolInfoList),以便获取更好的查询性能。
|
||||
*
|
||||
* @param filter 主表过滤对象。
|
||||
* @param orderBy 排序对象。
|
||||
* @return 查询结果集。
|
||||
*/
|
||||
public List<SchoolInfo> getSchoolInfoListWithRelation(SchoolInfo filter, String orderBy) {
|
||||
List<SchoolInfo> resultList = schoolInfoMapper.getSchoolInfoList(null, null, filter, orderBy);
|
||||
Map<String, List<MyWhereCriteria>> criteriaMap = buildAggregationAdditionalWhereCriteria();
|
||||
this.buildRelationForDataList(resultList, MyRelationParam.normal(), criteriaMap);
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取主表的查询结果,查询条件中包括主表过滤对象和指定字段的(in list)过滤。
|
||||
* 同时还包含主表关联的字典数据和一对一从表数据,以及一对一从表的字典数据。
|
||||
* 如果仅仅需要获取主表数据,请移步(getSchoolInfoList),以便获取更好的查询性能。
|
||||
*
|
||||
* @param inFilterField (In-list)指定的字段(Java成员字段,而非数据列名)。
|
||||
* @param inFilterValues inFilterField指定字段的(In-list)数据列表。
|
||||
* @param filter 主表过滤对象。
|
||||
* @param orderBy 排序对象。
|
||||
* @return 查询结果集。
|
||||
*/
|
||||
public <M> List<SchoolInfo> getSchoolInfoListWithRelation(
|
||||
String inFilterField, Set<M> inFilterValues, SchoolInfo filter, String orderBy) {
|
||||
List<SchoolInfo> resultList =
|
||||
schoolInfoMapper.getSchoolInfoList(inFilterField, inFilterValues, filter, orderBy);
|
||||
this.buildRelationForDataList(resultList, MyRelationParam.dictOnly(), null);
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据最新对象和原有对象的数据对比,判断关联的字典数据和多对一主表数据是否都是合法数据。
|
||||
*
|
||||
* @param schoolInfo 最新数据对象。
|
||||
* @param originalSchoolInfo 原有数据对象。
|
||||
* @return 数据全部正确返回true,否则false,同时返回具体的错误信息。
|
||||
*/
|
||||
public CallResult verifyRelatedData(SchoolInfo schoolInfo, SchoolInfo originalSchoolInfo) {
|
||||
String errorMessageFormat = "数据验证失败,关联的%s并不存在,请刷新后重试!";
|
||||
if (this.needToVerify(schoolInfo, originalSchoolInfo, SchoolInfo::getProvinceId)
|
||||
&& !areaCodeService.existId(schoolInfo.getProvinceId())) {
|
||||
return CallResult.error(String.format(errorMessageFormat, "所在省份"));
|
||||
}
|
||||
if (this.needToVerify(schoolInfo, originalSchoolInfo, SchoolInfo::getCityId)
|
||||
&& !areaCodeService.existId(schoolInfo.getCityId())) {
|
||||
return CallResult.error(String.format(errorMessageFormat, "所在城市"));
|
||||
}
|
||||
return CallResult.ok();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,288 @@
|
||||
package com.orange.demo.courseclassservice.service;
|
||||
|
||||
import com.orange.demo.courseclassservice.dao.*;
|
||||
import com.orange.demo.courseclassservice.model.*;
|
||||
import com.orange.demo.courseclassinterface.dto.*;
|
||||
import com.orange.demo.common.core.util.*;
|
||||
import com.orange.demo.common.core.object.MyRelationParam;
|
||||
import com.orange.demo.common.core.object.CallResult;
|
||||
import com.orange.demo.common.core.object.TokenData;
|
||||
import com.orange.demo.common.core.object.MyWhereCriteria;
|
||||
import com.orange.demo.common.core.constant.GlobalDeletedFlag;
|
||||
import com.orange.demo.common.core.base.dao.BaseDaoMapper;
|
||||
import com.orange.demo.common.core.base.service.BaseService;
|
||||
import com.orange.demo.common.sequence.wrapper.IdGeneratorWrapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 班级数据数据操作服务类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Service
|
||||
public class StudentClassService extends BaseService<StudentClass, StudentClassDto, Long> {
|
||||
|
||||
@Autowired
|
||||
private StudentClassMapper studentClassMapper;
|
||||
@Autowired
|
||||
private ClassCourseMapper classCourseMapper;
|
||||
@Autowired
|
||||
private ClassStudentMapper classStudentMapper;
|
||||
@Autowired
|
||||
private SchoolInfoService schoolInfoService;
|
||||
@Autowired
|
||||
private StudentService studentService;
|
||||
@Autowired
|
||||
private IdGeneratorWrapper idGenerator;
|
||||
|
||||
/**
|
||||
* 返回当前Service的主表Mapper对象。
|
||||
*
|
||||
* @return 主表Mapper对象。
|
||||
*/
|
||||
@Override
|
||||
protected BaseDaoMapper<StudentClass> mapper() {
|
||||
return studentClassMapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存新增对象。
|
||||
*
|
||||
* @param studentClass 新增对象。
|
||||
* @return 返回新增对象。
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public StudentClass saveNew(StudentClass studentClass) {
|
||||
studentClass.setClassId(idGenerator.nextLongId());
|
||||
TokenData tokenData = TokenData.takeFromRequest();
|
||||
studentClass.setCreateUserId(tokenData.getUserId());
|
||||
studentClass.setCreateTime(new Date());
|
||||
studentClass.setStatus(GlobalDeletedFlag.NORMAL);
|
||||
studentClassMapper.insert(studentClass);
|
||||
return studentClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新数据对象。
|
||||
*
|
||||
* @param studentClass 更新的对象。
|
||||
* @param originalStudentClass 原有数据对象。
|
||||
* @return 成功返回true,否则false。
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean update(StudentClass studentClass, StudentClass originalStudentClass) {
|
||||
studentClass.setCreateUserId(originalStudentClass.getCreateUserId());
|
||||
studentClass.setCreateTime(originalStudentClass.getCreateTime());
|
||||
studentClass.setStatus(GlobalDeletedFlag.NORMAL);
|
||||
// 这里重点提示,在执行主表数据更新之前,如果有哪些字段不支持修改操作,请用原有数据对象字段替换当前数据字段。
|
||||
return studentClassMapper.updateByPrimaryKey(studentClass) == 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除指定数据。
|
||||
*
|
||||
* @param classId 主键Id。
|
||||
* @return 成功返回true,否则false。
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean remove(Long classId) {
|
||||
Example studentClassExample = new Example(StudentClass.class);
|
||||
Example.Criteria c = studentClassExample.createCriteria();
|
||||
c.andEqualTo(super.idFieldName, classId);
|
||||
c.andEqualTo(super.deletedFlagFieldName, GlobalDeletedFlag.NORMAL);
|
||||
// 这里先删除主数据
|
||||
StudentClass deletedObject = new StudentClass();
|
||||
deletedObject.setStatus(GlobalDeletedFlag.DELETED);
|
||||
if (studentClassMapper.updateByExampleSelective(deletedObject, studentClassExample) == 0) {
|
||||
return false;
|
||||
}
|
||||
// 开始删除多对多子表的关联
|
||||
ClassCourse classCourse = new ClassCourse();
|
||||
classCourse.setClassId(classId);
|
||||
classCourseMapper.delete(classCourse);
|
||||
ClassStudent classStudent = new ClassStudent();
|
||||
classStudent.setClassId(classId);
|
||||
classStudentMapper.delete(classStudent);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取单表查询结果。由于没有关联数据查询,因此在仅仅获取单表数据的场景下,效率更高。
|
||||
* 如果需要同时获取关联数据,请移步(getStudentClassListWithRelation)方法。
|
||||
*
|
||||
* @param filter 过滤对象。
|
||||
* @param orderBy 排序参数。
|
||||
* @return 查询结果集。
|
||||
*/
|
||||
public List<StudentClass> getStudentClassList(StudentClass filter, String orderBy) {
|
||||
return studentClassMapper.getStudentClassList(null, null, filter, orderBy);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取主表的查询结果,查询条件中包括主表过滤对象和指定字段的(in list)过滤。
|
||||
* 由于没有关联数据查询,因此在仅仅获取单表数据的场景下,效率更高。
|
||||
* 如果需要同时获取关联数据,请移步(getStudentClassListWithRelation)方法。
|
||||
*
|
||||
* @param inFilterField (In-list)指定的字段(Java成员字段,而非数据列名)。
|
||||
* @param inFilterValues inFilterField指定字段的(In-list)数据列表。
|
||||
* @param filter 过滤对象。
|
||||
* @param orderBy 排序参数。
|
||||
* @return 查询结果集。
|
||||
*/
|
||||
public <M> List<StudentClass> getStudentClassList(
|
||||
String inFilterField, Set<M> inFilterValues, StudentClass filter, String orderBy) {
|
||||
String inFilterColumn = MyModelUtil.mapToColumnName(inFilterField, StudentClass.class);
|
||||
return studentClassMapper.getStudentClassList(inFilterColumn, inFilterValues, filter, orderBy);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取主表的查询结果,以及主表关联的字典数据和一对一从表数据,以及一对一从表的字典数据。
|
||||
* 如果仅仅需要获取主表数据,请移步(getStudentClassList),以便获取更好的查询性能。
|
||||
*
|
||||
* @param filter 主表过滤对象。
|
||||
* @param orderBy 排序对象。
|
||||
* @return 查询结果集。
|
||||
*/
|
||||
public List<StudentClass> getStudentClassListWithRelation(StudentClass filter, String orderBy) {
|
||||
List<StudentClass> resultList = studentClassMapper.getStudentClassList(null, null, filter, orderBy);
|
||||
Map<String, List<MyWhereCriteria>> criteriaMap = buildAggregationAdditionalWhereCriteria();
|
||||
this.buildRelationForDataList(resultList, MyRelationParam.normal(), criteriaMap);
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取主表的查询结果,查询条件中包括主表过滤对象和指定字段的(in list)过滤。
|
||||
* 同时还包含主表关联的字典数据和一对一从表数据,以及一对一从表的字典数据。
|
||||
* 如果仅仅需要获取主表数据,请移步(getStudentClassList),以便获取更好的查询性能。
|
||||
*
|
||||
* @param inFilterField (In-list)指定的字段(Java成员字段,而非数据列名)。
|
||||
* @param inFilterValues inFilterField指定字段的(In-list)数据列表。
|
||||
* @param filter 主表过滤对象。
|
||||
* @param orderBy 排序对象。
|
||||
* @return 查询结果集。
|
||||
*/
|
||||
public <M> List<StudentClass> getStudentClassListWithRelation(
|
||||
String inFilterField, Set<M> inFilterValues, StudentClass filter, String orderBy) {
|
||||
List<StudentClass> resultList =
|
||||
studentClassMapper.getStudentClassList(inFilterField, inFilterValues, filter, orderBy);
|
||||
this.buildRelationForDataList(resultList, MyRelationParam.dictOnly(), null);
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量添加多对多关联关系。
|
||||
*
|
||||
* @param classCourseList 多对多关联表对象集合。
|
||||
* @param classId 主表Id。
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void addClassCourseList(List<ClassCourse> classCourseList, Long classId) {
|
||||
for (ClassCourse classCourse : classCourseList) {
|
||||
classCourse.setClassId(classId);
|
||||
if (classCourse.getCourseOrder() == null) {
|
||||
classCourse.setCourseOrder(0);
|
||||
}
|
||||
}
|
||||
classCourseMapper.insertList(classCourseList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新中间表数据。
|
||||
*
|
||||
* @param classCourse 中间表对象。
|
||||
* @return 更新成功与否。
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean updateClassCourse(ClassCourse classCourse) {
|
||||
Example e = new Example(ClassCourse.class);
|
||||
e.createCriteria()
|
||||
.andEqualTo("classId", classCourse.getClassId())
|
||||
.andEqualTo("courseId", classCourse.getCourseId());
|
||||
return classCourseMapper.updateByExample(classCourse, e) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取中间表数据。
|
||||
*
|
||||
* @param classId 主表Id。
|
||||
* @param courseId 从表Id。
|
||||
* @return 中间表对象。
|
||||
*/
|
||||
public ClassCourse getClassCourse(Long classId, Long courseId) {
|
||||
Example e = new Example(ClassCourse.class);
|
||||
e.createCriteria()
|
||||
.andEqualTo("classId", classId)
|
||||
.andEqualTo("courseId", courseId);
|
||||
return classCourseMapper.selectOneByExample(e);
|
||||
}
|
||||
|
||||
/**
|
||||
* 移除单条多对多关系。
|
||||
*
|
||||
* @param classId 主表Id。
|
||||
* @param courseId 从表Id。
|
||||
* @return 成功返回true,否则false。
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean removeClassCourse(Long classId, Long courseId) {
|
||||
ClassCourse classCourse = new ClassCourse();
|
||||
classCourse.setClassId(classId);
|
||||
classCourse.setCourseId(courseId);
|
||||
return classCourseMapper.delete(classCourse) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量添加多对多关联关系。
|
||||
*
|
||||
* @param classStudentList 多对多关联表对象集合。
|
||||
* @param classId 主表Id。
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void addClassStudentList(List<ClassStudent> classStudentList, Long classId) {
|
||||
for (ClassStudent classStudent : classStudentList) {
|
||||
classStudent.setClassId(classId);
|
||||
}
|
||||
classStudentMapper.insertList(classStudentList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 移除单条多对多关系。
|
||||
*
|
||||
* @param classId 主表Id。
|
||||
* @param studentId 从表Id。
|
||||
* @return 成功返回true,否则false。
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean removeClassStudent(Long classId, Long studentId) {
|
||||
ClassStudent classStudent = new ClassStudent();
|
||||
classStudent.setClassId(classId);
|
||||
classStudent.setStudentId(studentId);
|
||||
return classStudentMapper.delete(classStudent) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据最新对象和原有对象的数据对比,判断关联的字典数据和多对一主表数据是否都是合法数据。
|
||||
*
|
||||
* @param studentClass 最新数据对象。
|
||||
* @param originalStudentClass 原有数据对象。
|
||||
* @return 数据全部正确返回true,否则false,同时返回具体的错误信息。
|
||||
*/
|
||||
public CallResult verifyRelatedData(StudentClass studentClass, StudentClass originalStudentClass) {
|
||||
String errorMessageFormat = "数据验证失败,关联的%s并不存在,请刷新后重试!";
|
||||
if (this.needToVerify(studentClass, originalStudentClass, StudentClass::getSchoolId)
|
||||
&& !schoolInfoService.existId(studentClass.getSchoolId())) {
|
||||
return CallResult.error(String.format(errorMessageFormat, "所属校区"));
|
||||
}
|
||||
if (this.needToVerify(studentClass, originalStudentClass, StudentClass::getLeaderId)
|
||||
&& !studentService.existId(studentClass.getLeaderId())) {
|
||||
return CallResult.error(String.format(errorMessageFormat, "班长"));
|
||||
}
|
||||
return CallResult.ok();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,235 @@
|
||||
package com.orange.demo.courseclassservice.service;
|
||||
|
||||
import com.orange.demo.application.common.constant.StudentStatus;
|
||||
import com.orange.demo.courseclassservice.dao.*;
|
||||
import com.orange.demo.courseclassservice.model.*;
|
||||
import com.orange.demo.courseclassinterface.dto.*;
|
||||
import com.orange.demo.common.core.util.*;
|
||||
import com.orange.demo.common.core.object.MyRelationParam;
|
||||
import com.orange.demo.common.core.object.CallResult;
|
||||
import com.orange.demo.common.core.object.MyWhereCriteria;
|
||||
import com.orange.demo.common.core.base.dao.BaseDaoMapper;
|
||||
import com.orange.demo.common.core.base.service.BaseService;
|
||||
import com.orange.demo.common.sequence.wrapper.IdGeneratorWrapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 学生数据数据操作服务类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Service
|
||||
public class StudentService extends BaseService<Student, StudentDto, Long> {
|
||||
|
||||
@Autowired
|
||||
private StudentMapper studentMapper;
|
||||
@Autowired
|
||||
private ClassStudentMapper classStudentMapper;
|
||||
@Autowired
|
||||
private SchoolInfoService schoolInfoService;
|
||||
@Autowired
|
||||
private AreaCodeService areaCodeService;
|
||||
@Autowired
|
||||
private GradeService gradeService;
|
||||
@Autowired
|
||||
private IdGeneratorWrapper idGenerator;
|
||||
|
||||
/**
|
||||
* 返回当前Service的主表Mapper对象。
|
||||
*
|
||||
* @return 主表Mapper对象。
|
||||
*/
|
||||
@Override
|
||||
protected BaseDaoMapper<Student> mapper() {
|
||||
return studentMapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存新增对象。
|
||||
*
|
||||
* @param student 新增对象。
|
||||
* @return 返回新增对象。
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Student saveNew(Student student) {
|
||||
student.setStudentId(idGenerator.nextLongId());
|
||||
student.setRegisterTime(new Date());
|
||||
if (student.getTotalCoin() == null) {
|
||||
student.setTotalCoin(0);
|
||||
}
|
||||
if (student.getLeftCoin() == null) {
|
||||
student.setLeftCoin(0);
|
||||
}
|
||||
if (student.getStatus() == null) {
|
||||
student.setStatus(StudentStatus.NORMAL);
|
||||
}
|
||||
studentMapper.insert(student);
|
||||
return student;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新数据对象。
|
||||
*
|
||||
* @param student 更新的对象。
|
||||
* @param originalStudent 原有数据对象。
|
||||
* @return 成功返回true,否则false。
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean update(Student student, Student originalStudent) {
|
||||
student.setRegisterTime(originalStudent.getRegisterTime());
|
||||
// 这里重点提示,在执行主表数据更新之前,如果有哪些字段不支持修改操作,请用原有数据对象字段替换当前数据字段。
|
||||
return studentMapper.updateByPrimaryKey(student) == 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除指定数据。
|
||||
*
|
||||
* @param studentId 主键Id。
|
||||
* @return 成功返回true,否则false。
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean remove(Long studentId) {
|
||||
// 这里先删除主数据
|
||||
if (studentMapper.deleteByPrimaryKey(studentId) == 0) {
|
||||
return false;
|
||||
}
|
||||
// 这里可继续删除关联数据。
|
||||
// 开始删除多对多父表的关联
|
||||
ClassStudent classStudent = new ClassStudent();
|
||||
classStudent.setStudentId(studentId);
|
||||
classStudentMapper.delete(classStudent);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取单表查询结果。由于没有关联数据查询,因此在仅仅获取单表数据的场景下,效率更高。
|
||||
* 如果需要同时获取关联数据,请移步(getStudentListWithRelation)方法。
|
||||
*
|
||||
* @param filter 过滤对象。
|
||||
* @param orderBy 排序参数。
|
||||
* @return 查询结果集。
|
||||
*/
|
||||
public List<Student> getStudentList(Student filter, String orderBy) {
|
||||
return studentMapper.getStudentList(null, null, filter, orderBy);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取主表的查询结果,查询条件中包括主表过滤对象和指定字段的(in list)过滤。
|
||||
* 由于没有关联数据查询,因此在仅仅获取单表数据的场景下,效率更高。
|
||||
* 如果需要同时获取关联数据,请移步(getStudentListWithRelation)方法。
|
||||
*
|
||||
* @param inFilterField (In-list)指定的字段(Java成员字段,而非数据列名)。
|
||||
* @param inFilterValues inFilterField指定字段的(In-list)数据列表。
|
||||
* @param filter 过滤对象。
|
||||
* @param orderBy 排序参数。
|
||||
* @return 查询结果集。
|
||||
*/
|
||||
public <M> List<Student> getStudentList(
|
||||
String inFilterField, Set<M> inFilterValues, Student filter, String orderBy) {
|
||||
String inFilterColumn = MyModelUtil.mapToColumnName(inFilterField, Student.class);
|
||||
return studentMapper.getStudentList(inFilterColumn, inFilterValues, filter, orderBy);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取主表的查询结果,以及主表关联的字典数据和一对一从表数据,以及一对一从表的字典数据。
|
||||
* 如果仅仅需要获取主表数据,请移步(getStudentList),以便获取更好的查询性能。
|
||||
*
|
||||
* @param filter 主表过滤对象。
|
||||
* @param orderBy 排序对象。
|
||||
* @return 查询结果集。
|
||||
*/
|
||||
public List<Student> getStudentListWithRelation(Student filter, String orderBy) {
|
||||
List<Student> resultList = studentMapper.getStudentList(null, null, filter, orderBy);
|
||||
Map<String, List<MyWhereCriteria>> criteriaMap = buildAggregationAdditionalWhereCriteria();
|
||||
this.buildRelationForDataList(resultList, MyRelationParam.normal(), criteriaMap);
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取主表的查询结果,查询条件中包括主表过滤对象和指定字段的(in list)过滤。
|
||||
* 同时还包含主表关联的字典数据和一对一从表数据,以及一对一从表的字典数据。
|
||||
* 如果仅仅需要获取主表数据,请移步(getStudentList),以便获取更好的查询性能。
|
||||
*
|
||||
* @param inFilterField (In-list)指定的字段(Java成员字段,而非数据列名)。
|
||||
* @param inFilterValues inFilterField指定字段的(In-list)数据列表。
|
||||
* @param filter 主表过滤对象。
|
||||
* @param orderBy 排序对象。
|
||||
* @return 查询结果集。
|
||||
*/
|
||||
public <M> List<Student> getStudentListWithRelation(
|
||||
String inFilterField, Set<M> inFilterValues, Student filter, String orderBy) {
|
||||
List<Student> resultList =
|
||||
studentMapper.getStudentList(inFilterField, inFilterValues, filter, orderBy);
|
||||
this.buildRelationForDataList(resultList, MyRelationParam.dictOnly(), null);
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 在多对多关系中,当前Service的数据表为从表,返回不与指定主表主键Id存在对多对关系的列表。
|
||||
*
|
||||
* @param classId 主表的关联键Id。
|
||||
* @param filter 从表的过滤对象。
|
||||
* @param orderBy 排序参数。
|
||||
* @return 查询结果集。
|
||||
*/
|
||||
public List<Student> getNotInStudentListByClassId(
|
||||
Long classId, Student filter, String orderBy) {
|
||||
List<Student> resultList =
|
||||
studentMapper.getNotInStudentListByClassId(classId, filter, orderBy);
|
||||
this.buildRelationForDataList(resultList, MyRelationParam.dictOnly(), null);
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 在多对多关系中,当前Service的数据表为从表,返回与指定主表主键Id存在对多对关系的列表。
|
||||
*
|
||||
* @param classId 主表的关联键Id。
|
||||
* @param filter 从表的过滤对象。
|
||||
* @param orderBy 排序参数。
|
||||
* @return 查询结果集。
|
||||
*/
|
||||
public List<Student> getStudentListByClassId(
|
||||
Long classId, Student filter, String orderBy) {
|
||||
List<Student> resultList =
|
||||
studentMapper.getStudentListByClassId(classId, filter, orderBy);
|
||||
this.buildRelationForDataList(resultList, MyRelationParam.dictOnly(), null);
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据最新对象和原有对象的数据对比,判断关联的字典数据和多对一主表数据是否都是合法数据。
|
||||
*
|
||||
* @param student 最新数据对象。
|
||||
* @param originalStudent 原有数据对象。
|
||||
* @return 数据全部正确返回true,否则false,同时返回具体的错误信息。
|
||||
*/
|
||||
public CallResult verifyRelatedData(Student student, Student originalStudent) {
|
||||
String errorMessageFormat = "数据验证失败,关联的%s并不存在,请刷新后重试!";
|
||||
if (this.needToVerify(student, originalStudent, Student::getProvinceId)
|
||||
&& !areaCodeService.existId(student.getProvinceId())) {
|
||||
return CallResult.error(String.format(errorMessageFormat, "所在省份"));
|
||||
}
|
||||
if (this.needToVerify(student, originalStudent, Student::getCityId)
|
||||
&& !areaCodeService.existId(student.getCityId())) {
|
||||
return CallResult.error(String.format(errorMessageFormat, "所在城市"));
|
||||
}
|
||||
if (this.needToVerify(student, originalStudent, Student::getDistrictId)
|
||||
&& !areaCodeService.existId(student.getDistrictId())) {
|
||||
return CallResult.error(String.format(errorMessageFormat, "所在区县"));
|
||||
}
|
||||
if (this.needToVerify(student, originalStudent, Student::getGradeId)
|
||||
&& !gradeService.existId(student.getGradeId())) {
|
||||
return CallResult.error(String.format(errorMessageFormat, "年级"));
|
||||
}
|
||||
if (this.needToVerify(student, originalStudent, Student::getSchoolId)
|
||||
&& !schoolInfoService.existId(student.getSchoolId())) {
|
||||
return CallResult.error(String.format(errorMessageFormat, "所属校区"));
|
||||
}
|
||||
return CallResult.ok();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
spring:
|
||||
application:
|
||||
name: course-class
|
||||
profiles:
|
||||
active: dev
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: localhost:8848
|
||||
config:
|
||||
server-addr: localhost:8848
|
||||
file-extension: yaml
|
||||
# 共享配置文件,排序越高后,优先级越高。
|
||||
shared-configs:
|
||||
- data-id: application-dev.yaml
|
||||
group: DEFAULT_GROUP
|
||||
refresh: true
|
||||
sentinel:
|
||||
eager: true
|
||||
datasource:
|
||||
ds1:
|
||||
nacos:
|
||||
server-addr: localhost:8848
|
||||
data-id: ${spring.application.name}-dev-sentinel
|
||||
group-id: DEFAULT_GROUP
|
||||
data-type: json
|
||||
# 如果是降级服务,需要改为degrade
|
||||
rule-type: flow
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
@@ -0,0 +1,79 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- 本项目全部使用log4j2性能上有很大提升 -->
|
||||
|
||||
<!--monitorInterval="60" 自动检测配置文件更改时间 单位为秒 最小值为5 -->
|
||||
<!--Configuration后面的status,这个用于设置log4j2自身内部的信息输出,可以不设置,当设置成trace时,你会看到log4j2内部各种详细输出。 -->
|
||||
<configuration monitorInterval="20" status="OFF">
|
||||
<!--日志变量 -->
|
||||
<properties>
|
||||
<!-- 日志主目录 ,需要保存到文件时请自己配置-->
|
||||
<property name="LOG_HOME">./zzlogs/course-class</property>
|
||||
<!-- 日志备份目录 -->
|
||||
<property name="BACKUP_HOME">./zzlogs/course-class/backup</property>
|
||||
<!-- 日志输出级别 -->
|
||||
<property name="OUTPUT_LOG_LEVEL">info</property>
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="LOG_PATTERN">
|
||||
<!-- 输出格式%d{HH:mm:ss}时间24小时制 -->
|
||||
<!-- %-5p日志级别 5位左对齐 [%t]线程名 [%c]类名 -->
|
||||
<!--%l:输出日志事件的发生位置,相当于%c.%M(%F:%L)的组合,包括类全名、方法、文件名以及在代码中的行数。例如:test.TestLog4j.main(TestLog4j.java:10)。 -->
|
||||
<!-- 另一种输出风格<PatternLayout pattern="级别%-5p [%d{YYYY-MM-dd HH:mm:ss}] [%t] 位置[%l] - 信息:%msg%n" /> -->
|
||||
<!-- [%-5p][%d{yy-MM-dd HH:mm:ss}][%t]==>%m==>%c==>%L%n -->
|
||||
[%-5p] [%d{YYYY-MM-dd HH:mm:ss}] [%t] ==> %msg%n
|
||||
</property>
|
||||
<property name="LOG_PATTERN_EX">
|
||||
<!-- 下面注释中 %X{PtxId}, SpanId: %X{PspanId} 为PinPoint 中的traceid -->
|
||||
[%-5p] [%d{YYYY-MM-dd HH:mm:ss}] 请求Id[%X{traceId}] [%t] ==> [TxId: %X{PtxId}, SpanId: %X{PspanId}] %msg%n
|
||||
</property>
|
||||
<!-- 日志保留天数 -->
|
||||
<property name="EVERY_FILE_COUNT">31</property>
|
||||
<!-- 日志切割的最小单位 -->
|
||||
<property name="EVERY_FILE_SIZE">20M</property>
|
||||
</properties>
|
||||
|
||||
<appenders>
|
||||
<!--Kafka输出 -->
|
||||
<Kafka name="kafka_log" topic="zz-log-topic" syncSend="false" ignoreExceptions="false">
|
||||
<PatternLayout pattern="${LOG_PATTERN_EX}"/>
|
||||
<Property name="bootstrap.servers">localhost:9092</Property>
|
||||
<Property name="max.block.ms">10000</Property>
|
||||
</Kafka>
|
||||
<!--控制台输出 -->
|
||||
<console name="console" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="${LOG_PATTERN}"/>
|
||||
</console>
|
||||
<!--每次大小超过size,则这size大小的日志会自动进行压缩,作为存档 -->
|
||||
<rollingFile name="file_log" fileName="${LOG_HOME}/course-class.log"
|
||||
filePattern="${LOG_HOME}/course-class-%d{yyyy-MM-dd}-%i.log.gz">
|
||||
<PatternLayout charset="UTF-8" pattern="${LOG_PATTERN_EX}"/>
|
||||
<!-- 日志切割的最小单位 -->
|
||||
<SizeBasedTriggeringPolicy size="${EVERY_FILE_SIZE}"/>
|
||||
<!-- 默认的日志文件数量 -->
|
||||
<DefaultRolloverStrategy max="${EVERY_FILE_COUNT}"/>
|
||||
</rollingFile>
|
||||
</appenders>
|
||||
|
||||
<!-- 然后定义logger,只有定义了logger并引入的appender,appender才会生效 -->
|
||||
<!-- 这里我们把输出到控制台appender的日志级别设置为DEBUG,便于调试。但是输出文件我们缺省为INFO,两者均可随时修改。-->
|
||||
<Loggers>
|
||||
<Root level="${OUTPUT_LOG_LEVEL}">
|
||||
<AppenderRef ref="console"/>
|
||||
</Root>
|
||||
<Logger name="springfox.documentation" additivity="false" level="error">
|
||||
<AppenderRef ref="console"/>
|
||||
</Logger>
|
||||
<!-- AsyncLogger 是基于Disruptor的全量异步队列,性能极高,队列默认大小4096。-->
|
||||
<!-- 队列默认值可通过JVM参数设置,参考博客:https://www.jianshu.com/p/82469047acbf -->
|
||||
<AsyncLogger name="com.orange.demo" additivity="false" level="info">
|
||||
<AppenderRef ref="console"/>
|
||||
<AppenderRef ref="kafka_log"/>
|
||||
<AppenderRef ref="file_log"/>
|
||||
</AsyncLogger>
|
||||
<!-- 这里将dao的日志级别设置为DEBUG,是为了SQL语句的输出 -->
|
||||
<AsyncLogger name="com.orange.demo.courseclassservice.dao" additivity="false" level="debug">
|
||||
<AppenderRef ref="console"/>
|
||||
<AppenderRef ref="kafka_log"/>
|
||||
<AppenderRef ref="file_log"/>
|
||||
</AsyncLogger>
|
||||
</Loggers>
|
||||
</configuration>
|
||||
@@ -0,0 +1,329 @@
|
||||
<html>
|
||||
<head>
|
||||
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<style type="text/css">
|
||||
.b1{white-space-collapsing:preserve;}
|
||||
.t1{border-collapse:collapse;border-spacing:0;}
|
||||
.r1{height:23.25pt;}
|
||||
.r2{height:18.75pt;}
|
||||
.r3{height:17.25pt;}
|
||||
.r4{height:15.0pt;}
|
||||
.r5{height:14.25pt;}
|
||||
.r6{height:21.0pt;}
|
||||
.r7{height:18.0pt;}
|
||||
.r8{height:15.75pt;}
|
||||
.r9{height:19.5pt;}
|
||||
.r10{height:17.0pt;}
|
||||
.r11{height:20.25pt;}
|
||||
.r12{height:28.5pt;}
|
||||
.c1{white-space:pre-wrap;text-align:center;border-bottom:thin solid black;font-weight:bold;color: #dd0806; font-size:18pt;}
|
||||
.c2{white-space:pre-wrap;text-align:center;background-color:#ffff00;border-top:thin solid black;border-left:thin solid black;color: #dd0806; font-size:12pt;}
|
||||
.c3{white-space:pre-wrap;text-align:center;border-top:thin solid black;border-right:thin solid black;border-left:thin solid black;color: #dd0806; font-size:12pt;}
|
||||
.c4{white-space:pre-wrap;text-align:center;border-top:thin solid black;border-right:thin solid black;border-bottom:thin solid black;border-left:thin solid black;color: #dd0806; font-size:12pt;}
|
||||
.c5{white-space:pre-wrap;text-align:center;color: #dd0806; font-size:10pt;}
|
||||
.c6{white-space:pre-wrap;text-align:center;border-top:thin solid black;border-right:thin solid black;border-bottom:thin solid black;color: #dd0806; font-size:10pt;}
|
||||
.c7{white-space:pre-wrap;text-align:center;border-top:thin solid black;border-right:thin solid black;border-bottom:thin solid black;border-left:thin solid black;color: #dd0806; font-size:10pt;}
|
||||
.c8{white-space:pre-wrap;text-align:center;border-top:thin solid black;border-right:thin solid black;border-bottom:thin solid black;border-left:thin solid black;font-size:9pt;}
|
||||
.c9{white-space:pre-wrap;text-align:center;background-color:#ffff00;border-top:thin solid black;border-right:thin solid black;border-bottom:thin solid black;border-left:thin solid black;color: #dd0806; font-size:11pt;}
|
||||
.c10{white-space:pre-wrap;text-align:center;border-right:thin solid black;border-left:thin solid black;font-size:10pt;}
|
||||
.c11{white-space:pre-wrap;text-align:center;border-right:thin solid black;border-bottom:thin solid black;border-left:thin solid black;font-size:10pt;}
|
||||
.c12{white-space:pre-wrap;text-align:center;border-top:thin solid black;border-right:thin solid black;border-left:thin solid black;font-size:10pt;}
|
||||
.c13{white-space:pre-wrap;text-align:center;border-top:thin solid black;border-right:thin solid black;border-bottom:thin solid black;border-left:thin solid black;font-size:8pt;}
|
||||
.c14{white-space:pre-wrap;text-align:center;border-top:thin solid black;border-right:thin solid black;border-left:thin solid black;font-size:8pt;}
|
||||
.c15{white-space:pre-wrap;text-align:center;border-top:thin solid black;border-right:thin solid black;border-bottom:thin solid black;border-left:thin solid black;font-size:10pt;}
|
||||
.c16{white-space:pre-wrap;text-align:center;background-color:#ffff00;border-top:thin solid black;border-right:thin solid black;border-bottom:thin solid black;border-left:thin solid black;font-size:11pt;}
|
||||
.c17{white-space:pre-wrap;text-align:center;border-top:thin solid black;border-right:thin solid black;border-bottom:thin solid black;border-left:thin solid black;font-size:11pt;}
|
||||
.c18{white-space:pre-wrap;text-align:center;border-top:thin solid black;border-right:thin solid black;border-bottom:thin solid black;border-left:thin solid black;font-size:6pt;}
|
||||
.c19{white-space:pre-wrap;text-align:center;border-right:thin solid black;border-bottom:thin solid black;border-left:thin solid black;font-size:6pt;}
|
||||
.c20{white-space:pre-wrap;text-align:center;border-top:thin solid black;border-right:thin solid black;border-left:thin solid black;font-weight:bold;font-size:6pt;}
|
||||
.c21{white-space:pre-wrap;text-align:center;border-top:thin solid black;border-right:thin solid black;border-left:thin solid black;font-weight:bold;font-size:8pt;}
|
||||
.c22{white-space:pre-wrap;text-align:left;border-top:thin solid black;font-weight:bold;font-size:9pt;}
|
||||
</style>
|
||||
</head>
|
||||
<body class="b1">
|
||||
<table class="t1">
|
||||
<colgroup>
|
||||
<col width="40">
|
||||
<col width="40">
|
||||
<col width="57">
|
||||
<col width="57">
|
||||
<col width="57">
|
||||
<col width="57">
|
||||
<col width="57">
|
||||
<col width="56">
|
||||
<col width="59">
|
||||
<col width="57">
|
||||
<col width="57">
|
||||
<col width="57">
|
||||
<col width="57">
|
||||
<col width="57">
|
||||
<col width="57">
|
||||
<col width="57">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr class="r1">
|
||||
<td class="c1" colspan="16">天津公安警官职业学院2017—2018学年度第一学期课程表</td>
|
||||
</tr>
|
||||
<tr class="r1">
|
||||
<td class="c2" colspan="2" rowspan="2">班 级</td>
|
||||
<td class="c3" colspan="3">星期一</td>
|
||||
<td class="c4" colspan="3">星期二</td>
|
||||
<td class="c4" colspan="3">星期三</td>
|
||||
<td class="c4" colspan="3">星期四</td>
|
||||
<td class="c4" colspan="2">星期五</td>
|
||||
</tr>
|
||||
<tr class="r2">
|
||||
<td class="c5">第1节</td>
|
||||
<td class="c5">第2节</td>
|
||||
<td class="c5">第3节</td>
|
||||
<td class="c6">第1节</td>
|
||||
<td class="c7">第2节</td>
|
||||
<td class="c7">第3节</td>
|
||||
<td class="c7">第1节</td>
|
||||
<td class="c7">第2节</td>
|
||||
<td class="c7">第3节</td>
|
||||
<td class="c7">第1节</td>
|
||||
<td class="c7">第2节</td>
|
||||
<td class="c7">第3节</td>
|
||||
<td class="c7">第1节</td>
|
||||
<td class="c7">第2节</td>
|
||||
</tr>
|
||||
<tr class="r2">
|
||||
<td class="c8" rowspan="6">16 级 刑 事 技 术 班 </td>
|
||||
<td class="c9" rowspan="2">课程</td>
|
||||
<td class="c10" rowspan="2">刑法</td>
|
||||
<td class="c10" rowspan="6">自习</td>
|
||||
<td class="c11">刑事图像</td>
|
||||
<td class="c12" rowspan="2">民 法(选修)</td>
|
||||
<td class="c13">派出所工作</td>
|
||||
<td class="c12" rowspan="2">刑事图像</td>
|
||||
<td class="c12" rowspan="2">法医学</td>
|
||||
<td class="c14" rowspan="2">派出所工作</td>
|
||||
<td class="c15">法医学</td>
|
||||
<td class="c12" rowspan="2">国内安全保卫</td>
|
||||
<td class="c12" rowspan="2">体能</td>
|
||||
<td class="c12" rowspan="6">自习</td>
|
||||
<td class="c12" rowspan="2">刑事技术总论</td>
|
||||
<td class="c12" rowspan="2">刑法</td>
|
||||
</tr>
|
||||
<tr class="r3">
|
||||
<td class="c11">自习</td>
|
||||
<td class="c11">自习</td>
|
||||
<td class="c11">自习</td>
|
||||
</tr>
|
||||
<tr class="r3">
|
||||
<td class="c16" rowspan="2">教师</td>
|
||||
<td class="c12" rowspan="2">曾岚</td>
|
||||
<td class="c15">陈磊</td>
|
||||
<td class="c12" rowspan="2">邵刚</td>
|
||||
<td class="c15">杨丽伟</td>
|
||||
<td class="c12" rowspan="2">陈磊</td>
|
||||
<td class="c12" rowspan="2">于辉</td>
|
||||
<td class="c12" rowspan="2">杨丽伟</td>
|
||||
<td class="c15">于辉</td>
|
||||
<td class="c12" rowspan="2">朱学强</td>
|
||||
<td class="c12" rowspan="2">张付海</td>
|
||||
<td class="c12" rowspan="2">王 伟(刑技)</td>
|
||||
<td class="c12" rowspan="2">曾岚</td>
|
||||
</tr>
|
||||
<tr class="r3">
|
||||
<td class="c11"> </td>
|
||||
<td class="c11"> </td>
|
||||
<td class="c11"> </td>
|
||||
</tr>
|
||||
<tr class="r3">
|
||||
<td class="c16" rowspan="2">教室</td>
|
||||
<td class="c15" rowspan="2">206</td>
|
||||
<td class="c15">206</td>
|
||||
<td class="c15" rowspan="2">206</td>
|
||||
<td class="c15">206</td>
|
||||
<td class="c15" rowspan="2">206</td>
|
||||
<td class="c15" rowspan="2">206</td>
|
||||
<td class="c15" rowspan="2">206</td>
|
||||
<td class="c15">206</td>
|
||||
<td class="c15" rowspan="2">206</td>
|
||||
<td class="c15" rowspan="2">操场</td>
|
||||
<td class="c15" rowspan="2">206</td>
|
||||
<td class="c15" rowspan="2">206</td>
|
||||
</tr>
|
||||
<tr class="r4">
|
||||
<td class="c15"> </td>
|
||||
<td class="c11"> </td>
|
||||
<td class="c11"> </td>
|
||||
</tr>
|
||||
<tr class="r2">
|
||||
<td class="c8" rowspan="6">16 级 刑 事 侦 查 </td>
|
||||
<td class="c17" rowspan="2">课程</td>
|
||||
<td class="c12" rowspan="6">自习</td>
|
||||
<td class="c12" rowspan="2">侦查措施</td>
|
||||
<td class="c12" rowspan="2">经济案件侦查</td>
|
||||
<td class="c14" rowspan="2">公安信息化</td>
|
||||
<td class="c14" rowspan="2">公安信息化</td>
|
||||
<td class="c12" rowspan="2">刑法</td>
|
||||
<td class="c12" rowspan="2">体能</td>
|
||||
<td class="c12" rowspan="6">自习</td>
|
||||
<td class="c12" rowspan="2">痕迹检验</td>
|
||||
<td class="c12" rowspan="2">刑法</td>
|
||||
<td class="c12" rowspan="2">国内安全保卫</td>
|
||||
<td class="c18">经济案件侦查</td>
|
||||
<td class="c12" rowspan="2">痕迹检验</td>
|
||||
<td class="c12" rowspan="2">民 法(选修)</td>
|
||||
</tr>
|
||||
<tr class="r3">
|
||||
<td class="c11">侦查措施</td>
|
||||
</tr>
|
||||
<tr class="r3">
|
||||
<td class="c17" rowspan="2">教师</td>
|
||||
<td class="c12" rowspan="2">徐宏涛</td>
|
||||
<td class="c12" rowspan="2">张静</td>
|
||||
<td class="c12" rowspan="2">赵晓松</td>
|
||||
<td class="c12" rowspan="2">赵晓松</td>
|
||||
<td class="c12" rowspan="2">王骏强</td>
|
||||
<td class="c12" rowspan="2">张付海</td>
|
||||
<td class="c12" rowspan="2">郭海川</td>
|
||||
<td class="c12" rowspan="2">王骏强</td>
|
||||
<td class="c12" rowspan="2">朱学强</td>
|
||||
<td class="c15">张静</td>
|
||||
<td class="c12" rowspan="2">郭海川</td>
|
||||
<td class="c12" rowspan="2">邵刚</td>
|
||||
</tr>
|
||||
<tr class="r3">
|
||||
<td class="c11">徐宏涛</td>
|
||||
</tr>
|
||||
<tr class="r3">
|
||||
<td class="c17" rowspan="2">教室</td>
|
||||
<td class="c15" rowspan="2">202</td>
|
||||
<td class="c15" rowspan="2">202</td>
|
||||
<td class="c15" rowspan="2">3号机房</td>
|
||||
<td class="c15" rowspan="2">3号机房</td>
|
||||
<td class="c15" rowspan="2">202</td>
|
||||
<td class="c15" rowspan="2">操场</td>
|
||||
<td class="c15" rowspan="2">202</td>
|
||||
<td class="c15" rowspan="2">202</td>
|
||||
<td class="c15" rowspan="2">202</td>
|
||||
<td class="c15" rowspan="2">202</td>
|
||||
<td class="c15" rowspan="2">202</td>
|
||||
<td class="c15" rowspan="2">202</td>
|
||||
</tr>
|
||||
<tr class="r5">
|
||||
</tr>
|
||||
<tr class="r2">
|
||||
<td class="c8" rowspan="6">16 级 治 安 管 理 班 </td>
|
||||
<td class="c17" rowspan="2">课程</td>
|
||||
<td class="c12" rowspan="2">刑事技术</td>
|
||||
<td class="c12" rowspan="2">体能</td>
|
||||
<td class="c12" rowspan="2">刑事技术</td>
|
||||
<td class="c12" rowspan="2">治安秩序管理</td>
|
||||
<td class="c12" rowspan="2">刑事侦查概论</td>
|
||||
<td class="c12" rowspan="2">刑法</td>
|
||||
<td class="c18">群众工作与纠纷调解</td>
|
||||
<td class="c12" rowspan="2">群众工作与纠纷调解</td>
|
||||
<td class="c12" rowspan="2">公共关系(选修)</td>
|
||||
<td class="c12" rowspan="2">刑事侦查概论</td>
|
||||
<td class="c12" rowspan="2">刑法</td>
|
||||
<td class="c12" rowspan="6">自习</td>
|
||||
<td class="c12" rowspan="6">自习</td>
|
||||
<td class="c12" rowspan="6">自习</td>
|
||||
</tr>
|
||||
<tr class="r6">
|
||||
<td class="c19">q</td>
|
||||
</tr>
|
||||
<tr class="r7">
|
||||
<td class="c17" rowspan="2">教师</td>
|
||||
<td class="c12" rowspan="2">郭海川 韩易浦</td>
|
||||
<td class="c12" rowspan="2">张付海</td>
|
||||
<td class="c12" rowspan="2">郭海川 韩易浦</td>
|
||||
<td class="c12" rowspan="2">翟政亮</td>
|
||||
<td class="c12" rowspan="2">邵妍</td>
|
||||
<td class="c12" rowspan="2">薛强</td>
|
||||
<td class="c15">刘晓鹏</td>
|
||||
<td class="c12" rowspan="2">刘晓鹏</td>
|
||||
<td class="c12" rowspan="2">尚欣</td>
|
||||
<td class="c12" rowspan="2">邵妍</td>
|
||||
<td class="c12" rowspan="2">薛强</td>
|
||||
</tr>
|
||||
<tr class="r7">
|
||||
<td class="c11">翟政亮</td>
|
||||
</tr>
|
||||
<tr class="r3">
|
||||
<td class="c17" rowspan="2">教室</td>
|
||||
<td class="c15" rowspan="2">218</td>
|
||||
<td class="c15" rowspan="2">操场</td>
|
||||
<td class="c15" rowspan="2">218</td>
|
||||
<td class="c15" rowspan="2">218</td>
|
||||
<td class="c15" rowspan="2">218</td>
|
||||
<td class="c15" rowspan="2">218</td>
|
||||
<td class="c15" rowspan="2">218</td>
|
||||
<td class="c15" rowspan="2">218</td>
|
||||
<td class="c15" rowspan="2">218</td>
|
||||
<td class="c15" rowspan="2">218</td>
|
||||
<td class="c15" rowspan="2">218</td>
|
||||
</tr>
|
||||
<tr class="r8">
|
||||
</tr>
|
||||
<tr class="r2">
|
||||
<td class="c13" rowspan="6">16 网 络 安 全 监 察 1 班</td>
|
||||
<td class="c17" rowspan="2">课程</td>
|
||||
<td class="c12" rowspan="2">应用写作</td>
|
||||
<td class="c14" rowspan="2">数据库系统应用</td>
|
||||
<td class="c20" rowspan="2">周二中午:计算机安全管理及实用技术</td>
|
||||
<td class="c13">刑事诉讼法</td>
|
||||
<td class="c21" rowspan="2">周一中午:数据库系统应用</td>
|
||||
<td class="c12" rowspan="2">民法</td>
|
||||
<td class="c12" rowspan="2">体育</td>
|
||||
<td class="c12" rowspan="2">VB语言程序设计</td>
|
||||
<td class="c12" rowspan="6">选修</td>
|
||||
<td class="c12" rowspan="2">VB语言程序设计</td>
|
||||
<td class="c12" rowspan="2">刑事诉讼法</td>
|
||||
<td class="c12" rowspan="6">选修</td>
|
||||
<td class="c15">应用写作</td>
|
||||
<td class="c12" rowspan="2">犯罪心理</td>
|
||||
</tr>
|
||||
<tr class="r2">
|
||||
<td class="c11">民法</td>
|
||||
<td class="c11">犯罪心理</td>
|
||||
</tr>
|
||||
<tr class="r9">
|
||||
<td class="c17" rowspan="2">教师</td>
|
||||
<td class="c12" rowspan="2">关利</td>
|
||||
<td class="c12" rowspan="2">杨斌</td>
|
||||
<td class="c12" rowspan="2">赵晓松</td>
|
||||
<td class="c15">王伟</td>
|
||||
<td class="c12" rowspan="2">杨斌</td>
|
||||
<td class="c12" rowspan="2">李静</td>
|
||||
<td class="c12" rowspan="2">程军</td>
|
||||
<td class="c12" rowspan="2">赵伟</td>
|
||||
<td class="c12" rowspan="2">赵伟</td>
|
||||
<td class="c12" rowspan="2">王伟</td>
|
||||
<td class="c15">关利</td>
|
||||
<td class="c12" rowspan="2">张学林</td>
|
||||
</tr>
|
||||
<tr class="r10">
|
||||
<td class="c11">李静</td>
|
||||
<td class="c11">张学林</td>
|
||||
</tr>
|
||||
<tr class="r3">
|
||||
<td class="c17" rowspan="2">教室</td>
|
||||
<td class="c15" rowspan="2">东阶梯</td>
|
||||
<td class="c15" rowspan="2">2号机房</td>
|
||||
<td class="c15" rowspan="2">主楼201</td>
|
||||
<td class="c15" rowspan="2">101</td>
|
||||
<td class="c15" rowspan="2">2号机房</td>
|
||||
<td class="c15" rowspan="2">101</td>
|
||||
<td class="c15" rowspan="2">操场</td>
|
||||
<td class="c15" rowspan="2">3号机房</td>
|
||||
<td class="c15" rowspan="2">3号机房</td>
|
||||
<td class="c15" rowspan="2">101</td>
|
||||
<td class="c15">东阶梯</td>
|
||||
<td class="c15" rowspan="2">主楼201</td>
|
||||
</tr>
|
||||
<tr class="r11">
|
||||
<td class="c11">主楼201</td>
|
||||
</tr>
|
||||
<tr class="r12">
|
||||
<td class="c22" colspan="16">注:1、课程一栏中有两科次的,上面的课程单周上课,下面的课程双周上课。2、每天上课时间:上午第1节8:30至9:55;第2节10:15至11:40;中午上课时间12:30至13:55;下午第3节14:00至15:25。</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,193 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-client:1.2.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-common:1.2.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-io:commons-io:2.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-api:1.2.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.58" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:guava:28.2-android" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:failureaccess:1.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.checkerframework:checker-compat-qual:2.5.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.3.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.j2objc:j2objc-annotations:1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.prometheus:simpleclient:0.5.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.spring:spring-context-support:1.0.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-ribbon:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon:2.3.0" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.ribbon:ribbon-transport:2.3.0" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-contexts:0.4.9" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-servo:0.4.9" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: javax.inject:javax.inject:1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty:0.4.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-core:2.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-httpclient:2.3.0" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-client:1.19.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-core:1.19.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: javax.ws.rs:jsr311-api:1.1.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey.contribs:jersey-apache-client4:1.19.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.servo:servo-core:0.12.21" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-commons-util:0.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-loadbalancer:2.3.0" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-statistics:0.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.reactivex:rxjava:1.3.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-sentinel:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-transport-simple-http:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-transport-common:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-annotation-aspectj:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-core:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.aspectj:aspectjrt:1.9.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-circuitbreaker-sentinel:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-reactor-adapter:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-spring-webflux-adapter:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-spring-webmvc-adapter:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-parameter-flow-control:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-cluster-server-default:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-cluster-common-default:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-common:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-cluster-client-default:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-alibaba-sentinel-datasource:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.codehaus.woodstox:stax2-api:4.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.woodstox:woodstox-core:5.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-datasource-nacos:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-datasource-extension:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-freemarker:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.freemarker:freemarker:2.3.29" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-log4j2:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-slf4j-impl:2.12.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.12.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-core:2.12.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-jul:2.12.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-cache:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-configuration-processor:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-actuator:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator-autoconfigure:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.micrometer:micrometer-core:1.3.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.latencyutils:LatencyUtils:2.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: de.codecentric:spring-boot-admin-starter-client:2.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: de.codecentric:spring-boot-admin-client:2.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-config:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-openfeign:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.59" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.59" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-openfeign-core:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form-spring:3.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form:3.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.3.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-core:10.7.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-slf4j:10.7.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-hystrix:10.7.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.archaius:archaius-core:0.7.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-httpclient:10.7.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-hystrix:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-hystrix:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-ribbon:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-archaius:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-archaius:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-core:1.5.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-serialization:1.5.18" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.fasterxml.jackson.module:jackson-module-afterburner:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-metrics-event-stream:1.5.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-javanica:1.5.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.9" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.reactivex:rxjava-reactive-streams:1.2.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.3.1.Final" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.mapstruct:mapstruct-processor:1.3.1.Final" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.projectlombok:lombok:1.18.12" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.curator:curator-recipes:4.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.curator:curator-framework:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.curator:curator-client:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.zookeeper:zookeeper:3.5.3-beta" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-cli:commons-cli:1.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.kafka:kafka-clients:2.4.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.luben:zstd-jni:1.4.3-1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.lz4:lz4-java:1.6.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.xerial.snappy:snappy-java:1.1.7.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.scala-lang:scala-library:2.12.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.lmax:disruptor:3.4.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.activation:jakarta.activation-api:1.2.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.vintage:junit-vintage-engine:5.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-junit-jupiter:3.1.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.13.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest:2.1" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:3.1.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy:1.10.8" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.10.8" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.6.3" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?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>
|
||||
<groupId>com.orange.demo</groupId>
|
||||
<artifactId>application</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>course-class</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<modules>
|
||||
<module>course-class-interface</module>
|
||||
<module>course-class-service</module>
|
||||
</modules>
|
||||
</project>
|
||||
@@ -0,0 +1,290 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="Spring" name="Spring">
|
||||
<configuration />
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-spring-ui:2.0.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.20" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-core:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:guava:28.2-android" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:failureaccess:1.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.checkerframework:checker-compat-qual:2.5.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.3.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.j2objc:j2objc-annotations:1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.21" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-bean-validators:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-gateway:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.59" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.59" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-gateway-core:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.projectreactor.addons:reactor-extra:3.3.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-webflux:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-reactor-netty:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.projectreactor.netty:reactor-netty:0.9.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-codec-http:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-codec-http2:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-handler-proxy:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-codec-socks:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-transport-native-epoll:linux-x86_64:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-transport-native-unix-common:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.glassfish:jakarta.el:3.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-validation:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.18.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.1.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-webflux:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.synchronoss.cloud:nio-multipart-parser:1.1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.synchronoss.cloud:nio-stream-storage:1.1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-spring-cloud-gateway-adapter:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-api-gateway-adapter-common:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-core:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-reactor-adapter:1.7.1" level="project" />
|
||||
<orderEntry type="module" module-name="common-redis" />
|
||||
<orderEntry type="library" name="Maven: redis.clients:jedis:3.1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.redisson:redisson:3.12.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-common:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-resolver-dns:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-codec-dns:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.45.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.cache:cache-api:1.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.3.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.reactivex.rxjava2:rxjava:2.2.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: de.ruedigermoeller:fst:2.57" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.10.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jodd:jodd-bean:5.0.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jodd:jodd-core:5.0.13" level="project" />
|
||||
<orderEntry type="module" module-name="common-core" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-io:commons-io:2.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.3.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: joda-time:joda-time:2.10.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-csv:1.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.4.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.jsonwebtoken:jjwt:0.9.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.74" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.ben-manes.caffeine:caffeine:2.8.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.checkerframework:checker-qual:3.1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.jimmyshi:bean-query:1.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest-all:1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:3.17" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.poi:poi:3.17" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:3.17" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:2.6.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: stax:stax-api:1.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.04" level="project" />
|
||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-spring-boot-starter:2.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.4.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:1.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-core:1.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.persistence:persistence-api:1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-base:1.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-weekend:1.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-spring:1.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-extra:1.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: tk.mybatis:mapper-spring-boot-autoconfigure:2.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-starter:1.2.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:2.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:2.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.2.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-client:1.2.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-common:1.2.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-api:1.2.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.prometheus:simpleclient:0.5.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.spring:spring-context-support:1.0.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-ribbon:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon:2.3.0" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.ribbon:ribbon-transport:2.3.0" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-contexts:0.4.9" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-servo:0.4.9" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: javax.inject:javax.inject:1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty:0.4.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-core:2.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-httpclient:2.3.0" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-client:1.19.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-core:1.19.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: javax.ws.rs:jsr311-api:1.1.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey.contribs:jersey-apache-client4:1.19.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.servo:servo-core:0.12.21" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-commons-util:0.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-loadbalancer:2.3.0" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-statistics:0.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.reactivex:rxjava:1.3.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-sentinel:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-transport-simple-http:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-transport-common:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-annotation-aspectj:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.aspectj:aspectjrt:1.9.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-circuitbreaker-sentinel:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-spring-webflux-adapter:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-spring-webmvc-adapter:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-parameter-flow-control:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-cluster-server-default:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-cluster-common-default:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-cluster-client-default:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-alibaba-sentinel-datasource:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.codehaus.woodstox:stax2-api:4.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.woodstox:woodstox-core:5.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-datasource-nacos:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-datasource-extension:1.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-freemarker:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.freemarker:freemarker:2.3.29" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-log4j2:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-slf4j-impl:2.12.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.12.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-core:2.12.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-jul:2.12.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-cache:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-configuration-processor:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-actuator:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator-autoconfigure:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.micrometer:micrometer-core:1.3.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.latencyutils:LatencyUtils:2.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: de.codecentric:spring-boot-admin-starter-client:2.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: de.codecentric:spring-boot-admin-client:2.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-config:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-openfeign:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-openfeign-core:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form-spring:3.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form:3.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-core:10.7.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-slf4j:10.7.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-hystrix:10.7.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.archaius:archaius-core:0.7.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-httpclient:10.7.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-hystrix:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-hystrix:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-ribbon:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-archaius:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-archaius:2.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-core:1.5.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-serialization:1.5.18" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.fasterxml.jackson.module:jackson-module-afterburner:2.10.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-metrics-event-stream:1.5.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-javanica:1.5.18" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.reactivex:rxjava-reactive-streams:1.2.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.3.1.Final" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.mapstruct:mapstruct-processor:1.3.1.Final" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.projectlombok:lombok:1.18.12" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.curator:curator-recipes:4.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.curator:curator-framework:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.curator:curator-client:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.zookeeper:zookeeper:3.5.3-beta" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-cli:commons-cli:1.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.kafka:kafka-clients:2.4.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.luben:zstd-jni:1.4.3-1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.lz4:lz4-java:1.6.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.xerial.snappy:snappy-java:1.1.7.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.scala-lang:scala-library:2.12.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.lmax:disruptor:3.4.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.2.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.activation:jakarta.activation-api:1.2.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.vintage:junit-vintage-engine:5.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.5.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-junit-jupiter:3.1.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.13.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest:2.1" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:3.1.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.10.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.objenesis:objenesis:2.6" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.6.3" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -0,0 +1,89 @@
|
||||
<?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>
|
||||
<groupId>com.orange.demo</groupId>
|
||||
<artifactId>application</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>gateway</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<name>gateway</name>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
<!-- swagger和knife4j相关集成-->
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-spring-ui</artifactId>
|
||||
<version>${knife4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger2</artifactId>
|
||||
<version>${springfox.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-models</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-models</artifactId>
|
||||
<version>${swagger.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-bean-validators</artifactId>
|
||||
<version>${springfox.version}</version>
|
||||
</dependency>
|
||||
<!-- 网关服务 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-gateway</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.csp</groupId>
|
||||
<artifactId>sentinel-spring-cloud-gateway-adapter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.orange.demo</groupId>
|
||||
<artifactId>common-redis</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
<!-- 通用组件依赖 -->
|
||||
<dependency>
|
||||
<groupId>com.orange.demo</groupId>
|
||||
<artifactId>common-core</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<groupId>mysql</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>druid-spring-boot-starter</artifactId>
|
||||
<groupId>com.alibaba</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.orange.demo.gateway;
|
||||
|
||||
import com.orange.demo.common.core.util.ApplicationContextHolder;
|
||||
import com.orange.demo.gateway.filter.AuthenticationPostFilter;
|
||||
import com.orange.demo.gateway.filter.AuthenticationPreFilter;
|
||||
import com.orange.demo.gateway.filter.RequestLogFilter;
|
||||
import com.orange.demo.gateway.filter.ResponseLogFilter;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
import org.springframework.cloud.client.SpringCloudApplication;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 网关服务启动类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class})
|
||||
@SpringCloudApplication
|
||||
public class GatewayApplication {
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/fallback")
|
||||
static class FallbackController {
|
||||
@GetMapping("")
|
||||
public String fallback() {
|
||||
return "GATEWAY FALLBACK!!!";
|
||||
}
|
||||
}
|
||||
|
||||
@Bean
|
||||
public AuthenticationPreFilter authenticationPreFilter() {
|
||||
return new AuthenticationPreFilter();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public AuthenticationPostFilter authenticationPostFilter() {
|
||||
return new AuthenticationPostFilter();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public RequestLogFilter requestLogPreFilter() {
|
||||
return new RequestLogFilter();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ResponseLogFilter responseLogPostFilter() {
|
||||
return new ResponseLogFilter();
|
||||
}
|
||||
|
||||
@Bean
|
||||
ApplicationContextHolder applicationContextHolder() {
|
||||
return new ApplicationContextHolder();
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(GatewayApplication.class, args);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.orange.demo.gateway.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 网关业务配置类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Data
|
||||
@RefreshScope
|
||||
@Configuration
|
||||
@ConfigurationProperties(prefix = "application")
|
||||
public class ApplicationConfig {
|
||||
|
||||
/**
|
||||
* token加密用的密钥,该值的长度最少10个字符(过短会报错)。
|
||||
*/
|
||||
private String tokenSigningKey;
|
||||
/**
|
||||
* 客户端或者浏览器在提交http请求时,携带token的header name,如 Authorization
|
||||
*/
|
||||
private String tokenHeaderKey;
|
||||
/**
|
||||
* 令牌Token在被刷新之后,服务器Http应答的header name,客户端或浏览器需要保存并替换原有的token,用于下次发送时携带
|
||||
*/
|
||||
private String refreshedTokenHeaderKey;
|
||||
/**
|
||||
* 令牌的过期时间,单位毫秒
|
||||
*/
|
||||
private Long expiration;
|
||||
/**
|
||||
* 授信ip列表,没有填写表示全部信任。多个ip之间逗号分隔,如: http://10.10.10.1:8080,http://10.10.10.2:8080
|
||||
*/
|
||||
private String credentialIpList;
|
||||
/**
|
||||
* Session在Redis中的过期时间(秒)。
|
||||
* 缺省值是 one day + 60s
|
||||
*/
|
||||
private int sessionIdRedisExpiredSeconds = 86460;
|
||||
/**
|
||||
* 基于完全等于(equals)判定规则的白名单地址集合,过滤效率高于whitelistUrlPattern。
|
||||
*/
|
||||
private Set<String> whitelistUrl;
|
||||
/**
|
||||
* 基于Ant Pattern模式判定规则的白名单地址集合。如:/aa/**。
|
||||
*/
|
||||
private Set<String> whitelistUrlPattern;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.orange.demo.gateway.config;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.cors.CorsConfiguration;
|
||||
import org.springframework.web.cors.reactive.CorsWebFilter;
|
||||
import org.springframework.web.cors.reactive.UrlBasedCorsConfigurationSource;
|
||||
import org.springframework.web.util.pattern.PathPatternParser;
|
||||
|
||||
/**
|
||||
* 跨域信任配置类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Configuration
|
||||
public class CorsConfig {
|
||||
|
||||
@Bean
|
||||
public CorsWebFilter corsFilter(ApplicationConfig appConfig) {
|
||||
UrlBasedCorsConfigurationSource configSource = new UrlBasedCorsConfigurationSource(new PathPatternParser());
|
||||
CorsConfiguration config = new CorsConfiguration();
|
||||
if (StringUtils.isNotBlank(appConfig.getCredentialIpList())) {
|
||||
String[] credentialIpList = StringUtils.split(appConfig.getCredentialIpList(), ",");
|
||||
if (credentialIpList.length > 0) {
|
||||
for (String ip : credentialIpList) {
|
||||
config.addAllowedOrigin(ip);
|
||||
}
|
||||
}
|
||||
config.addAllowedHeader("*");
|
||||
config.addAllowedMethod("*");
|
||||
config.addExposedHeader(appConfig.getRefreshedTokenHeaderKey());
|
||||
config.setAllowCredentials(true);
|
||||
configSource.registerCorsConfiguration("/**", config);
|
||||
}
|
||||
return new CorsWebFilter(configSource);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.orange.demo.gateway.config;
|
||||
|
||||
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import javax.servlet.Filter;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
/**
|
||||
* Web通用过滤器配置类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Configuration
|
||||
public class FilterConfig {
|
||||
|
||||
@Bean
|
||||
public FilterRegistrationBean<Filter> characterEncodingFilterRegistration() {
|
||||
FilterRegistrationBean<Filter> filterRegistrationBean = new FilterRegistrationBean<>(
|
||||
new org.springframework.web.filter.CharacterEncodingFilter());
|
||||
filterRegistrationBean.addUrlPatterns("/*");
|
||||
filterRegistrationBean.addInitParameter("encoding", StandardCharsets.UTF_8.name());
|
||||
// forceEncoding强制response也被编码,另外即使request中已经设置encoding,forceEncoding也会重新设置
|
||||
filterRegistrationBean.addInitParameter("forceEncoding", "true");
|
||||
filterRegistrationBean.setAsyncSupported(true);
|
||||
return filterRegistrationBean;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.orange.demo.gateway.config;
|
||||
|
||||
import com.alibaba.csp.sentinel.adapter.gateway.sc.SentinelGatewayFilter;
|
||||
import com.alibaba.csp.sentinel.adapter.gateway.sc.exception.SentinelGatewayBlockExceptionHandler;
|
||||
import org.springframework.beans.factory.ObjectProvider;
|
||||
import org.springframework.cloud.gateway.filter.GlobalFilter;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.http.codec.ServerCodecConfigurer;
|
||||
import org.springframework.web.reactive.result.view.ViewResolver;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* Spring Cloud Gateway的Sentinel流控配置类。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Configuration
|
||||
public class SentinelConfig {
|
||||
|
||||
private final List<ViewResolver> viewResolvers;
|
||||
private final ServerCodecConfigurer serverCodecConfigurer;
|
||||
|
||||
public SentinelConfig(
|
||||
ObjectProvider<List<ViewResolver>> viewResolversProvider,
|
||||
ServerCodecConfigurer serverCodecConfigurer) {
|
||||
this.viewResolvers = viewResolversProvider.getIfAvailable(Collections::emptyList);
|
||||
this.serverCodecConfigurer = serverCodecConfigurer;
|
||||
}
|
||||
|
||||
@Bean
|
||||
@Order(Ordered.HIGHEST_PRECEDENCE)
|
||||
public SentinelGatewayBlockExceptionHandler sentinelGatewayBlockExceptionHandler() {
|
||||
// Register the block exception handler for Spring Cloud Gateway.
|
||||
return new SentinelGatewayBlockExceptionHandler(viewResolvers, serverCodecConfigurer);
|
||||
}
|
||||
|
||||
@Bean
|
||||
@Order(Ordered.HIGHEST_PRECEDENCE)
|
||||
public GlobalFilter sentinelGatewayFilter() {
|
||||
return new SentinelGatewayFilter();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.orange.demo.gateway.config;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.cloud.gateway.config.GatewayProperties;
|
||||
import org.springframework.cloud.gateway.route.RouteLocator;
|
||||
import org.springframework.cloud.gateway.support.NameUtils;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.stereotype.Component;
|
||||
import springfox.documentation.swagger.web.SwaggerResource;
|
||||
import springfox.documentation.swagger.web.SwaggerResourcesProvider;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/***
|
||||
* 返回Swagger UI需要读取的资源数据,这里是微服务的路由数据。
|
||||
*
|
||||
* @author Knife4j Team。
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@Primary
|
||||
@AllArgsConstructor
|
||||
public class SwaggerResourceConfig implements SwaggerResourcesProvider {
|
||||
|
||||
private final RouteLocator routeLocator;
|
||||
private final GatewayProperties gatewayProperties;
|
||||
|
||||
@Override
|
||||
public List<SwaggerResource> get() {
|
||||
List<SwaggerResource> resources = new ArrayList<>();
|
||||
List<String> routes = new ArrayList<>();
|
||||
routeLocator.getRoutes().subscribe(route -> routes.add(route.getId()));
|
||||
gatewayProperties.getRoutes().stream().filter(routeDefinition -> routes.contains(routeDefinition.getId()))
|
||||
.forEach(route -> route.getPredicates().stream()
|
||||
.filter(predicateDefinition -> ("Path").equalsIgnoreCase(predicateDefinition.getName()))
|
||||
.forEach(predicateDefinition -> resources.add(swaggerResource(route.getId(),
|
||||
predicateDefinition.getArgs().get(NameUtils.GENERATED_NAME_PREFIX + "0")
|
||||
.replace("**", "v2/api-docs")))));
|
||||
return resources;
|
||||
}
|
||||
|
||||
private SwaggerResource swaggerResource(String name, String location) {
|
||||
SwaggerResource swaggerResource = new SwaggerResource();
|
||||
swaggerResource.setName(name);
|
||||
swaggerResource.setLocation(location);
|
||||
swaggerResource.setSwaggerVersion("2.0");
|
||||
return swaggerResource;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.orange.demo.gateway.constant;
|
||||
|
||||
/**
|
||||
* 网关业务相关的常量对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
public final class GatewayConstant {
|
||||
|
||||
/**
|
||||
* 请求进入网关的开始时间。
|
||||
*/
|
||||
public static final String START_TIME_ATTRIBUTE = "startTime";
|
||||
|
||||
/**
|
||||
* 登录URL。
|
||||
*/
|
||||
public static final String ADMIN_LOGIN_URL = "/admin/upms/login/doLogin";
|
||||
|
||||
/**
|
||||
* 登出URL。
|
||||
*/
|
||||
public static final String ADMIN_LOGOUT_URL = "/admin/upms/login/doLogout";
|
||||
|
||||
/**
|
||||
* sessionId的键名称。
|
||||
*/
|
||||
public static final String SESSION_ID_KEY_NAME = "sessionId";
|
||||
|
||||
/**
|
||||
* 私有构造函数,明确标识该常量类的作用。
|
||||
*/
|
||||
private GatewayConstant() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,222 @@
|
||||
package com.orange.demo.gateway.filter;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.orange.demo.common.core.constant.ErrorCodeEnum;
|
||||
import com.orange.demo.common.core.object.ResponseResult;
|
||||
import com.orange.demo.common.core.object.TokenData;
|
||||
import com.orange.demo.common.core.util.JwtUtil;
|
||||
import com.orange.demo.common.core.util.MyCommonUtil;
|
||||
import com.orange.demo.common.core.util.RedisKeyUtil;
|
||||
import com.orange.demo.gateway.config.ApplicationConfig;
|
||||
import com.orange.demo.gateway.constant.GatewayConstant;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.reactivestreams.Publisher;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cloud.gateway.filter.GatewayFilterChain;
|
||||
import org.springframework.cloud.gateway.filter.GlobalFilter;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.core.io.buffer.DataBuffer;
|
||||
import org.springframework.core.io.buffer.DataBufferFactory;
|
||||
import org.springframework.core.io.buffer.DataBufferUtils;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.server.reactive.ServerHttpRequest;
|
||||
import org.springframework.http.server.reactive.ServerHttpResponse;
|
||||
import org.springframework.http.server.reactive.ServerHttpResponseDecorator;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.web.server.ServerWebExchange;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
import redis.clients.jedis.Jedis;
|
||||
import redis.clients.jedis.JedisPool;
|
||||
import redis.clients.jedis.Transaction;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 全局后处理过滤器。主要用于将用户的会话信息存到缓存服务器,以及在登出时清除缓存中的会话数据。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Slf4j
|
||||
public class AuthenticationPostFilter implements GlobalFilter, Ordered {
|
||||
|
||||
@Autowired
|
||||
private ApplicationConfig appConfig;
|
||||
@Autowired
|
||||
private JedisPool jedisPool;
|
||||
|
||||
@Override
|
||||
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
|
||||
ServerHttpRequest originalRequest = exchange.getRequest();
|
||||
ServerHttpResponse originalResponse = exchange.getResponse();
|
||||
String refreshedToken =
|
||||
(String) exchange.getAttributes().get(appConfig.getRefreshedTokenHeaderKey());
|
||||
if (refreshedToken != null) {
|
||||
originalResponse.getHeaders().add(appConfig.getRefreshedTokenHeaderKey(), refreshedToken);
|
||||
}
|
||||
if (!originalRequest.getURI().getPath().equals(GatewayConstant.ADMIN_LOGIN_URL)
|
||||
&& !originalRequest.getURI().getPath().equals(GatewayConstant.ADMIN_LOGOUT_URL)) {
|
||||
return chain.filter(exchange);
|
||||
}
|
||||
DataBufferFactory bufferFactory = originalResponse.bufferFactory();
|
||||
ServerHttpResponseDecorator decoratedResponse = new ServerHttpResponseDecorator(originalResponse) {
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public Mono<Void> writeWith(@NonNull Publisher<? extends DataBuffer> bodyData) {
|
||||
StringBuilder sb = new StringBuilder(128);
|
||||
sb.append("url: ")
|
||||
.append(originalRequest.getURI().getPath())
|
||||
.append(" -- status: ")
|
||||
.append(getStatusCode());
|
||||
if (getStatusCode() != HttpStatus.OK) {
|
||||
log.error(sb.toString());
|
||||
return super.writeWith(bodyData);
|
||||
}
|
||||
if (!(bodyData instanceof Flux)) {
|
||||
return super.writeWith(bodyData);
|
||||
}
|
||||
Flux<? extends DataBuffer> fluxBody = (Flux<? extends DataBuffer>) bodyData;
|
||||
return super.writeWith(fluxBody.buffer().map(dataBuffers -> {
|
||||
// 读取完整的服务应答消息体。
|
||||
String responseBody = readResponseBody(dataBuffers);
|
||||
originalResponse.getHeaders().setContentType(MediaType.APPLICATION_JSON);
|
||||
// 先判断body中是否包含数据。
|
||||
if (StringUtils.isBlank(responseBody)) {
|
||||
sb.append(" -- Internal Error, no RESPONSE DATA returns !!");
|
||||
log.error(sb.toString());
|
||||
String errorMessage = "后台服务没有任何数据返回!";
|
||||
responseBody = JSON.toJSONString(
|
||||
ResponseResult.error(ErrorCodeEnum.SERVER_INTERNAL_ERROR, errorMessage));
|
||||
byte[] uppedContent = new String(responseBody.getBytes(), StandardCharsets.UTF_8).getBytes();
|
||||
originalResponse.getHeaders().setContentLength(uppedContent.length);
|
||||
return bufferFactory.wrap(uppedContent);
|
||||
}
|
||||
// 处理登录和登出请求。
|
||||
String result;
|
||||
try {
|
||||
result = doProcess(exchange, responseBody);
|
||||
} catch (Exception e) {
|
||||
setStatusCode(HttpStatus.BAD_REQUEST);
|
||||
String errorMsg = "Server Internal Error";
|
||||
sb.append(errorMsg);
|
||||
log.error(sb.toString(), e);
|
||||
result = JSON.toJSONString(
|
||||
ResponseResult.error(ErrorCodeEnum.SERVER_INTERNAL_ERROR, errorMsg));
|
||||
}
|
||||
byte[] uppedContent = new String(result.getBytes(), StandardCharsets.UTF_8).getBytes();
|
||||
originalResponse.getHeaders().setContentLength(uppedContent.length);
|
||||
return bufferFactory.wrap(uppedContent);
|
||||
}));
|
||||
}
|
||||
};
|
||||
return chain.filter(exchange.mutate().response(decoratedResponse).build());
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回过滤器在在调用链上的优先级。
|
||||
*
|
||||
* @return 数值越低,优先级越高。
|
||||
*/
|
||||
@Override
|
||||
public int getOrder() {
|
||||
// -1 is response write filter, must be called before that
|
||||
return -2;
|
||||
}
|
||||
|
||||
private String readResponseBody(List<? extends DataBuffer> dataBuffers) {
|
||||
List<String> list = new LinkedList<>();
|
||||
int dataCount = 0;
|
||||
for (DataBuffer dataBuffer : dataBuffers) {
|
||||
dataCount += dataBuffer.readableByteCount();
|
||||
byte[] content = new byte[dataBuffer.readableByteCount()];
|
||||
dataBuffer.read(content);
|
||||
DataBufferUtils.release(dataBuffer);
|
||||
list.add(new String(content, StandardCharsets.UTF_8));
|
||||
}
|
||||
StringBuilder responseBuilder = new StringBuilder(dataCount + 1);
|
||||
for (String data : list) {
|
||||
responseBuilder.append(data);
|
||||
}
|
||||
return responseBuilder.toString();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private String doProcess(ServerWebExchange exchange, String responseBody) {
|
||||
// 这个解析出来的就是upms登录或登出接口返回的ResponseResult对象。
|
||||
ServerHttpRequest originalRequest = exchange.getRequest();
|
||||
if (originalRequest.getURI().getPath().equals(GatewayConstant.ADMIN_LOGIN_URL)) {
|
||||
// 处理登录服务的消息体,同时重构该消息体,并最终返回前端。
|
||||
ResponseResult<JSONObject> result = processLoginResponse(responseBody);
|
||||
return JSON.toJSONString(result);
|
||||
}
|
||||
if (originalRequest.getURI().getPath().equals(GatewayConstant.ADMIN_LOGOUT_URL)) {
|
||||
ResponseResult<Void> result = JSON.parseObject(responseBody, ResponseResult.class);
|
||||
if (result.isSuccess()) {
|
||||
String sessionId =
|
||||
(String) exchange.getAttributes().get(GatewayConstant.SESSION_ID_KEY_NAME);
|
||||
try (Jedis jedis = jedisPool.getResource()) {
|
||||
jedis.del(RedisKeyUtil.makeSessionIdKeyForRedis(sessionId));
|
||||
}
|
||||
}
|
||||
return responseBody;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private ResponseResult<JSONObject> processLoginResponse(String responseBody) {
|
||||
ResponseResult<JSONObject> responseResult = JSON.parseObject(responseBody, ResponseResult.class);
|
||||
if (!responseResult.isSuccess()) {
|
||||
return responseResult;
|
||||
}
|
||||
JSONObject loginData = responseResult.getData();
|
||||
// 1. 先验证登陆服务器返回的应答数据是否正确
|
||||
JSONObject tokenData = loginData.getJSONObject(TokenData.REQUEST_ATTRIBUTE_NAME);
|
||||
ErrorCodeEnum errorCode = ErrorCodeEnum.SERVER_INTERNAL_ERROR;
|
||||
if (tokenData == null) {
|
||||
return ResponseResult.error(errorCode, "内部错误,用户登录令牌对象没有正确返回!");
|
||||
}
|
||||
Integer userId = tokenData.getInteger("userId");
|
||||
if (MyCommonUtil.isBlankOrNull(userId)) {
|
||||
return ResponseResult.error(errorCode, "内部错误,用户Id没有正确返回!");
|
||||
}
|
||||
Boolean isAdmin = tokenData.getBoolean("isAdmin");
|
||||
if (isAdmin == null) {
|
||||
return ResponseResult.error(errorCode, "内部错误,是否为管理员标记没有正确返回!");
|
||||
}
|
||||
String showName = tokenData.getString("showName");
|
||||
if (StringUtils.isBlank(showName)) {
|
||||
return ResponseResult.error(errorCode, "内部错误,用户显示名没有正确返回!");
|
||||
}
|
||||
String sessionId = tokenData.getString("sessionId");
|
||||
if (StringUtils.isBlank(sessionId)) {
|
||||
return ResponseResult.error(errorCode, "内部错误,SESSION_ID没有正确返回!");
|
||||
}
|
||||
// 2. 生成sessionId并存放到token中
|
||||
Map<String, Object> claims = new HashMap<>(1);
|
||||
claims.put(GatewayConstant.SESSION_ID_KEY_NAME, sessionId);
|
||||
String token = JwtUtil.generateToken(claims, appConfig.getExpiration(), appConfig.getTokenSigningKey());
|
||||
// 3. 更新缓存
|
||||
// 3.1 sessionId -> userId 是hash结构的缓存
|
||||
String sessionIdKey = RedisKeyUtil.makeSessionIdKeyForRedis(sessionId);
|
||||
try (Jedis jedis = jedisPool.getResource()) {
|
||||
Transaction t = jedis.multi();
|
||||
for (String tokenKey : tokenData.keySet()) {
|
||||
t.hset(sessionIdKey, tokenKey, tokenData.getString(tokenKey));
|
||||
}
|
||||
t.expire(sessionIdKey, appConfig.getSessionIdRedisExpiredSeconds());
|
||||
t.exec();
|
||||
}
|
||||
// 4. 构造返回给用户的应答,将加密后的令牌返回给前端。
|
||||
loginData.put(TokenData.REQUEST_ATTRIBUTE_NAME, token);
|
||||
return ResponseResult.success(loginData);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,174 @@
|
||||
package com.orange.demo.gateway.filter;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.orange.demo.common.core.constant.ErrorCodeEnum;
|
||||
import com.orange.demo.common.core.object.ResponseResult;
|
||||
import com.orange.demo.common.core.object.TokenData;
|
||||
import com.orange.demo.common.core.util.JwtUtil;
|
||||
import com.orange.demo.common.core.util.RedisKeyUtil;
|
||||
import com.orange.demo.common.core.util.IpUtil;
|
||||
import com.orange.demo.gateway.config.ApplicationConfig;
|
||||
import com.orange.demo.gateway.constant.GatewayConstant;
|
||||
import io.jsonwebtoken.Claims;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cloud.gateway.filter.GatewayFilterChain;
|
||||
import org.springframework.cloud.gateway.filter.GlobalFilter;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.server.reactive.ServerHttpRequest;
|
||||
import org.springframework.http.server.reactive.ServerHttpResponse;
|
||||
import org.springframework.util.AntPathMatcher;
|
||||
import org.springframework.web.server.ServerWebExchange;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
import redis.clients.jedis.Jedis;
|
||||
import redis.clients.jedis.JedisPool;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 全局前处理过滤器。主要用于用户操作权限验证。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Slf4j
|
||||
public class AuthenticationPreFilter implements GlobalFilter, Ordered {
|
||||
|
||||
@Autowired
|
||||
private ApplicationConfig appConfig;
|
||||
@Autowired
|
||||
private JedisPool jedisPool;
|
||||
/**
|
||||
* Ant Pattern模式的白名单地址匹配器。
|
||||
*/
|
||||
private AntPathMatcher antMatcher = new AntPathMatcher();
|
||||
|
||||
@Override
|
||||
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
|
||||
ServerHttpRequest request = exchange.getRequest();
|
||||
ServerHttpResponse response = exchange.getResponse();
|
||||
String url = request.getURI().getPath();
|
||||
// 判断是否为白名单请求,以及一些内置不需要验证的请求。(登录请求也包含其中)。
|
||||
if (this.shouldNotFilter(url)) {
|
||||
return chain.filter(exchange);
|
||||
}
|
||||
String token = this.getTokenFromRequest(request);
|
||||
Claims c = JwtUtil.parseToken(token, appConfig.getTokenSigningKey());
|
||||
if (JwtUtil.isNullOrExpired(c)) {
|
||||
log.warn("EXPIRED request [{}] from REMOTE-IP [{}].", url, IpUtil.getRemoteIpAddress(request));
|
||||
response.setStatusCode(HttpStatus.UNAUTHORIZED);
|
||||
response.getHeaders().setContentType(MediaType.APPLICATION_JSON);
|
||||
byte[] responseBody = JSON.toJSONString(ResponseResult.error(ErrorCodeEnum.UNAUTHORIZED_LOGIN,
|
||||
"用户登录已过期或尚未登录,请重新登录!")).getBytes(StandardCharsets.UTF_8);
|
||||
return response.writeWith(Flux.just(response.bufferFactory().wrap(responseBody)));
|
||||
}
|
||||
// 这里判断是否需要定时刷新token
|
||||
if (JwtUtil.needToRefresh(c)) {
|
||||
exchange.getAttributes().put(appConfig.getRefreshedTokenHeaderKey(),
|
||||
JwtUtil.generateToken(c, appConfig.getExpiration(), appConfig.getTokenSigningKey()));
|
||||
}
|
||||
try (Jedis jedis = jedisPool.getResource()) {
|
||||
// 先基于sessionId获取userInfo
|
||||
String sessionId = (String) c.get(GatewayConstant.SESSION_ID_KEY_NAME);
|
||||
Map<String, String> userMap = jedis.hgetAll(RedisKeyUtil.makeSessionIdKeyForRedis(sessionId));
|
||||
if (userMap == null) {
|
||||
log.warn("UNAUTHORIZED request [{}] from REMOTE-IP [{}] because no sessionId exists in redis.",
|
||||
url, IpUtil.getRemoteIpAddress(request));
|
||||
response.setStatusCode(HttpStatus.UNAUTHORIZED);
|
||||
response.getHeaders().setContentType(MediaType.APPLICATION_JSON);
|
||||
byte[] responseBody = JSON.toJSONString(ResponseResult.error(ErrorCodeEnum.UNAUTHORIZED_LOGIN,
|
||||
"用户会话已失效,请重新登录!")).getBytes(StandardCharsets.UTF_8);
|
||||
return response.writeWith(Flux.just(response.bufferFactory().wrap(responseBody)));
|
||||
}
|
||||
String userId = userMap.get("userId");
|
||||
if (StringUtils.isBlank(userId)) {
|
||||
log.warn("UNAUTHORIZED request [{}] from REMOTE-IP [{}] because userId is empty in redis.",
|
||||
url, IpUtil.getRemoteIpAddress(request));
|
||||
response.setStatusCode(HttpStatus.UNAUTHORIZED);
|
||||
response.getHeaders().setContentType(MediaType.APPLICATION_JSON);
|
||||
byte[] responseBody = JSON.toJSONString(ResponseResult.error(ErrorCodeEnum.UNAUTHORIZED_LOGIN,
|
||||
"用户登录验证信息已过期,请重新登录!")).getBytes(StandardCharsets.UTF_8);
|
||||
return response.writeWith(Flux.just(response.bufferFactory().wrap(responseBody)));
|
||||
}
|
||||
boolean isAdmin = false;
|
||||
String isAdminString = userMap.get("isAdmin");
|
||||
if (Boolean.parseBoolean(isAdminString)) {
|
||||
isAdmin = true;
|
||||
}
|
||||
String showName = userMap.get("showName");
|
||||
// 因为http header中不支持中文传输,所以需要编码。
|
||||
try {
|
||||
showName = URLEncoder.encode(showName, StandardCharsets.UTF_8.name());
|
||||
userMap.put("showName", showName);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
log.error("Failed to call AuthenticationPreFilter.filter.", e);
|
||||
}
|
||||
// 将session中关联的用户信息,添加到当前的Request中。转发后,业务服务可以根据需要自定读取。
|
||||
JSONObject tokenData = new JSONObject();
|
||||
tokenData.putAll(userMap);
|
||||
tokenData.put("sessionId", sessionId);
|
||||
exchange.getAttributes().put(GatewayConstant.SESSION_ID_KEY_NAME, sessionId);
|
||||
ServerHttpRequest mutableReq = exchange.getRequest().mutate().header(
|
||||
TokenData.REQUEST_ATTRIBUTE_NAME, tokenData.toJSONString()).build();
|
||||
ServerWebExchange mutableExchange = exchange.mutate().request(mutableReq).build();
|
||||
return chain.filter(mutableExchange);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回过滤器在在调用链上的优先级。
|
||||
*
|
||||
* @return 数值越低,优先级越高。
|
||||
*/
|
||||
@Override
|
||||
public int getOrder() {
|
||||
return HIGHEST_PRECEDENCE + 10000;
|
||||
}
|
||||
|
||||
private String getTokenFromRequest(ServerHttpRequest request) {
|
||||
String token = request.getHeaders().getFirst(appConfig.getTokenHeaderKey());
|
||||
if (StringUtils.isBlank(token)) {
|
||||
token = request.getQueryParams().getFirst(appConfig.getTokenHeaderKey());
|
||||
}
|
||||
return token;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断当前请求的url是否为配置中的白名单地址。以及一些内置的不需要登录即可访问的url。
|
||||
* @param url 请求的url。
|
||||
* @return 是返回true,否则false。
|
||||
*/
|
||||
private boolean shouldNotFilter(String url) {
|
||||
// 这里过滤和swagger相关的url
|
||||
if (url.endsWith("/v2/api-docs") || url.endsWith("/v2/api-docs-ext")) {
|
||||
return true;
|
||||
}
|
||||
if (url.equals(GatewayConstant.ADMIN_LOGIN_URL)) {
|
||||
return true;
|
||||
}
|
||||
// 先过滤直接匹配的白名单url。
|
||||
if (CollectionUtils.isNotEmpty(appConfig.getWhitelistUrl())) {
|
||||
if (appConfig.getWhitelistUrl().contains(url)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// 过滤ant pattern模式的白名单url。
|
||||
if (CollectionUtils.isNotEmpty(appConfig.getWhitelistUrlPattern())) {
|
||||
for (String urlPattern : appConfig.getWhitelistUrlPattern()) {
|
||||
if (antMatcher.match(urlPattern, url)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.orange.demo.gateway.filter;
|
||||
|
||||
import com.orange.demo.common.core.constant.ApplicationConstant;
|
||||
import com.orange.demo.common.core.util.MyCommonUtil;
|
||||
import com.orange.demo.gateway.constant.GatewayConstant;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.cloud.gateway.filter.GatewayFilterChain;
|
||||
import org.springframework.cloud.gateway.filter.GlobalFilter;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.http.server.reactive.ServerHttpRequest;
|
||||
import org.springframework.web.server.ServerWebExchange;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
/**
|
||||
* 链路日志前置过虑器。
|
||||
* 为整个链路生成唯一的traceId,并存储在Request Head中。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Slf4j
|
||||
public class RequestLogFilter implements GlobalFilter, Ordered {
|
||||
|
||||
@Override
|
||||
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
|
||||
String traceId = MyCommonUtil.generateUuid();
|
||||
// 分别记录traceId和执行开始时间。
|
||||
exchange.getAttributes().put(ApplicationConstant.HTTP_HEADER_TRACE_ID, traceId);
|
||||
exchange.getAttributes().put(GatewayConstant.START_TIME_ATTRIBUTE, System.currentTimeMillis());
|
||||
ServerHttpRequest mutableReq = exchange.getRequest().mutate().header(
|
||||
ApplicationConstant.HTTP_HEADER_TRACE_ID, traceId).build();
|
||||
ServerWebExchange mutableExchange = exchange.mutate().request(mutableReq).build();
|
||||
MDC.put(ApplicationConstant.HTTP_HEADER_TRACE_ID, traceId);
|
||||
log.info("开始请求,app={gateway}, url={}", exchange.getRequest().getURI().getPath());
|
||||
return chain.filter(mutableExchange);
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回过滤器在在调用链上的优先级。
|
||||
*
|
||||
* @return 数值越低,优先级越高。
|
||||
*/
|
||||
@Override
|
||||
public int getOrder() {
|
||||
return HIGHEST_PRECEDENCE + 9900;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.orange.demo.gateway.filter;
|
||||
|
||||
import com.orange.demo.common.core.constant.ApplicationConstant;
|
||||
import com.orange.demo.gateway.constant.GatewayConstant;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.cloud.gateway.filter.GatewayFilterChain;
|
||||
import org.springframework.cloud.gateway.filter.GlobalFilter;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.web.server.ServerWebExchange;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
/**
|
||||
* 链路日志后置过虑器。
|
||||
* 将整个链路的traceId存储在Response Head中,并返回给前端,便于问题定位。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Slf4j
|
||||
public class ResponseLogFilter implements GlobalFilter, Ordered {
|
||||
|
||||
@Override
|
||||
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
|
||||
// 下面两个属性,都是在RequestLogFilter过滤器中设置的。
|
||||
String traceId = exchange.getAttribute(ApplicationConstant.HTTP_HEADER_TRACE_ID);
|
||||
Long startTime = exchange.getAttribute(GatewayConstant.START_TIME_ATTRIBUTE);
|
||||
if (StringUtils.isNotBlank(traceId)) {
|
||||
MDC.put(ApplicationConstant.HTTP_HEADER_TRACE_ID, traceId);
|
||||
exchange.getResponse().getHeaders().add(ApplicationConstant.HTTP_HEADER_TRACE_ID, traceId);
|
||||
}
|
||||
long elapse = 0;
|
||||
if (startTime != null) {
|
||||
elapse = System.currentTimeMillis() - startTime;
|
||||
}
|
||||
log.info("请求完成, app={gateway}, url={},elapse={}", exchange.getRequest().getURI().getPath(), elapse);
|
||||
return chain.filter(exchange);
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回过滤器在在调用链上的优先级。
|
||||
*
|
||||
* @return 数值越低,优先级越高。
|
||||
*/
|
||||
@Override
|
||||
public int getOrder() {
|
||||
// -1 is response write filter, must be called before that
|
||||
return -10;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.orange.demo.gateway.handler;
|
||||
|
||||
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.RestController;
|
||||
import reactor.core.publisher.Mono;
|
||||
import springfox.documentation.swagger.web.*;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* Swagger的资源请求处理器。
|
||||
*
|
||||
* @author Knife4j Team。
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@RestController
|
||||
public class SwaggerHandler {
|
||||
|
||||
@Autowired(required = false)
|
||||
private SecurityConfiguration securityConfiguration;
|
||||
|
||||
@Autowired(required = false)
|
||||
private UiConfiguration uiConfiguration;
|
||||
|
||||
private final SwaggerResourcesProvider swaggerResources;
|
||||
|
||||
@Autowired
|
||||
public SwaggerHandler(SwaggerResourcesProvider swaggerResources) {
|
||||
this.swaggerResources = swaggerResources;
|
||||
}
|
||||
|
||||
@GetMapping("/swagger-resources/configuration/security")
|
||||
public Mono<ResponseEntity<SecurityConfiguration>> securityConfiguration() {
|
||||
return Mono.just(new ResponseEntity<>(
|
||||
Optional.ofNullable(securityConfiguration)
|
||||
.orElse(SecurityConfigurationBuilder.builder().build()), HttpStatus.OK));
|
||||
}
|
||||
|
||||
@GetMapping("/swagger-resources/configuration/ui")
|
||||
public Mono<ResponseEntity<UiConfiguration>> uiConfiguration() {
|
||||
return Mono.just(new ResponseEntity<>(
|
||||
Optional.ofNullable(uiConfiguration)
|
||||
.orElse(UiConfigurationBuilder.builder().build()), HttpStatus.OK));
|
||||
}
|
||||
|
||||
@GetMapping("/swagger-resources")
|
||||
public Mono<ResponseEntity> swaggerResources() {
|
||||
return Mono.just((new ResponseEntity<>(swaggerResources.get(), HttpStatus.OK)));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
spring:
|
||||
application:
|
||||
name: gateway
|
||||
profiles:
|
||||
active: dev
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: localhost:8848
|
||||
config:
|
||||
server-addr: localhost:8848
|
||||
file-extension: yaml
|
||||
# 共享配置文件,排序越高后,优先级越高。
|
||||
shared-configs:
|
||||
- data-id: application-dev.yaml
|
||||
group: DEFAULT_GROUP
|
||||
refresh: true
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- 本项目全部使用log4j2性能上有很大提升 -->
|
||||
|
||||
<!--monitorInterval="60" 自动检测配置文件更改时间 单位为秒 最小值为5 -->
|
||||
<!--Configuration后面的status,这个用于设置log4j2自身内部的信息输出,可以不设置,当设置成trace时,你会看到log4j2内部各种详细输出。 -->
|
||||
<configuration monitorInterval="20" status="OFF">
|
||||
<!--日志变量 -->
|
||||
<properties>
|
||||
<!-- 日志主目录 ,需要保存到文件时请自己配置-->
|
||||
<property name="LOG_HOME">./zzlogs/gateway</property>
|
||||
<!-- 日志备份目录 -->
|
||||
<property name="BACKUP_HOME">./zzlogs/gateway/backup</property>
|
||||
<!-- 日志输出级别 -->
|
||||
<property name="OUTPUT_LOG_LEVEL">info</property>
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="LOG_PATTERN">
|
||||
<!-- 输出格式%d{HH:mm:ss}时间24小时制 -->
|
||||
<!-- %-5p日志级别 5位左对齐 [%t]线程名 [%c]类名 -->
|
||||
<!--%l:输出日志事件的发生位置,相当于%c.%M(%F:%L)的组合,包括类全名、方法、文件名以及在代码中的行数。例如:test.TestLog4j.main(TestLog4j.java:10)。 -->
|
||||
<!-- 另一种输出风格<PatternLayout pattern="级别%-5p [%d{YYYY-MM-dd HH:mm:ss}] [%t] 位置[%l] - 信息:%msg%n" /> -->
|
||||
<!-- [%-5p][%d{yy-MM-dd HH:mm:ss}][%t]==>%m==>%c==>%L%n -->
|
||||
[%-5p] [%d{YYYY-MM-dd HH:mm:ss}] [%t] ==> %msg%n
|
||||
</property>
|
||||
<property name="LOG_PATTERN_EX">
|
||||
<!-- 下面注释中 %X{PtxId}, SpanId: %X{PspanId} 为PinPoint 中的traceid -->
|
||||
[%-5p] [%d{YYYY-MM-dd HH:mm:ss}] 请求Id[%X{traceId}] [%t] ==> [TxId: %X{PtxId}, SpanId: %X{PspanId}] %msg%n
|
||||
</property>
|
||||
<!-- 日志保留天数 -->
|
||||
<property name="EVERY_FILE_COUNT">31</property>
|
||||
<!-- 日志切割的最小单位 -->
|
||||
<property name="EVERY_FILE_SIZE">20M</property>
|
||||
</properties>
|
||||
|
||||
<appenders>
|
||||
<!--Kafka输出 -->
|
||||
<Kafka name="kafka_log" topic="zz-log-topic" syncSend="false" ignoreExceptions="false">
|
||||
<PatternLayout pattern="${LOG_PATTERN_EX}"/>
|
||||
<Property name="bootstrap.servers">localhost:9092</Property>
|
||||
<Property name="max.block.ms">10000</Property>
|
||||
</Kafka>
|
||||
<!--控制台输出 -->
|
||||
<console name="console" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="${LOG_PATTERN}"/>
|
||||
</console>
|
||||
<!--每次大小超过size,则这size大小的日志会自动进行压缩,作为存档 -->
|
||||
<rollingFile name="file_log" fileName="${LOG_HOME}/gateway.log"
|
||||
filePattern="${LOG_HOME}/gateway-%d{yyyy-MM-dd}-%i.log.gz">
|
||||
<PatternLayout charset="UTF-8" pattern="${LOG_PATTERN_EX}"/>
|
||||
<!-- 日志切割的最小单位 -->
|
||||
<SizeBasedTriggeringPolicy size="${EVERY_FILE_SIZE}"/>
|
||||
<!-- 默认的日志文件数量 -->
|
||||
<DefaultRolloverStrategy max="${EVERY_FILE_COUNT}"/>
|
||||
</rollingFile>
|
||||
</appenders>
|
||||
|
||||
<!-- 然后定义logger,只有定义了logger并引入的appender,appender才会生效 -->
|
||||
<!-- 这里我们把输出到控制台appender的日志级别设置为DEBUG,便于调试。但是输出文件我们缺省为INFO,两者均可随时修改。-->
|
||||
<Loggers>
|
||||
<Root level="${OUTPUT_LOG_LEVEL}">
|
||||
<AppenderRef ref="console"/>
|
||||
</Root>
|
||||
<Logger name="springfox.documentation" additivity="false" level="error">
|
||||
<AppenderRef ref="console"/>
|
||||
</Logger>
|
||||
<!-- AsyncLogger 是基于Disruptor的全量异步队列,性能极高,队列默认大小4096。-->
|
||||
<!-- 队列默认值可通过JVM参数设置,参考博客:https://www.jianshu.com/p/82469047acbf -->
|
||||
<AsyncLogger name="com.orange.demo" additivity="false" level="info">
|
||||
<AppenderRef ref="console"/>
|
||||
<AppenderRef ref="kafka_log"/>
|
||||
<AppenderRef ref="file_log"/>
|
||||
</AsyncLogger>
|
||||
</Loggers>
|
||||
</configuration>
|
||||
42
orange-demo-multi-service-for-app/application/pom.xml
Normal file
42
orange-demo-multi-service-for-app/application/pom.xml
Normal file
@@ -0,0 +1,42 @@
|
||||
<?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>OrangeMultiDemo</artifactId>
|
||||
<groupId>com.orange.demo</groupId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>application</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<name>application</name>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<modules>
|
||||
<module>application-common</module>
|
||||
<module>gateway</module>
|
||||
<module>course-class</module>
|
||||
<module>stats</module>
|
||||
<module>upms</module>
|
||||
</modules>
|
||||
|
||||
<dependencies>
|
||||
<!--nacos 服务发现客户端-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
<!-- 限流、熔断组件 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||
</dependency>
|
||||
<!-- sentinel 规则配置持久化nacos -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.csp</groupId>
|
||||
<artifactId>sentinel-datasource-nacos</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
18
orange-demo-multi-service-for-app/application/stats/pom.xml
Normal file
18
orange-demo-multi-service-for-app/application/stats/pom.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?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>
|
||||
<groupId>com.orange.demo</groupId>
|
||||
<artifactId>application</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>stats</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<modules>
|
||||
<module>stats-interface</module>
|
||||
<module>stats-service</module>
|
||||
</modules>
|
||||
</project>
|
||||
@@ -0,0 +1,36 @@
|
||||
<?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>
|
||||
<groupId>com.orange.demo</groupId>
|
||||
<artifactId>stats</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>stats-interface</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<name>stats-interface</name>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
<!-- 通用业务依赖 -->
|
||||
<dependency>
|
||||
<groupId>com.orange.demo</groupId>
|
||||
<artifactId>application-common</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
<!-- 通用组件依赖 -->
|
||||
<dependency>
|
||||
<groupId>com.orange.demo</groupId>
|
||||
<artifactId>common-core</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
<!-- knife4j 接口文档框架 -->
|
||||
<dependency>
|
||||
<groupId>com.orange.demo</groupId>
|
||||
<artifactId>common-swagger</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,182 @@
|
||||
package com.orange.demo.statsinterface.client;
|
||||
|
||||
import com.orange.demo.common.core.config.FeignConfig;
|
||||
import com.orange.demo.common.core.base.client.BaseClient;
|
||||
import com.orange.demo.common.core.constant.ErrorCodeEnum;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.statsinterface.dto.CourseTransStatsDto;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 课程统计服务远程数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@FeignClient(
|
||||
name = "stats",
|
||||
configuration = FeignConfig.class,
|
||||
fallbackFactory = CourseTransStatsClient.CourseTransStatsClientFallbackFactory.class)
|
||||
public interface CourseTransStatsClient extends BaseClient<CourseTransStatsDto, Long> {
|
||||
|
||||
/**
|
||||
* 基于主键的(In-list)条件获取远程数据接口。
|
||||
*
|
||||
* @param statsIds 主键Id集合。
|
||||
* @param withDict 是否包含字典关联。
|
||||
* @return 应答结果对象,包含主对象的数据集合。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/courseTransStats/listByIds")
|
||||
ResponseResult<List<CourseTransStatsDto>> listByIds(
|
||||
@RequestParam("statsIds") Set<Long> statsIds,
|
||||
@RequestParam("withDict") Boolean withDict);
|
||||
|
||||
/**
|
||||
* 基于主键Id,获取远程对象。
|
||||
*
|
||||
* @param statsId 主键Id。
|
||||
* @param withDict 是否包含字典关联。
|
||||
* @return 应答结果对象,包含主对象数据。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/courseTransStats/getById")
|
||||
ResponseResult<CourseTransStatsDto> getById(
|
||||
@RequestParam("statsId") Long statsId,
|
||||
@RequestParam("withDict") Boolean withDict);
|
||||
|
||||
/**
|
||||
* 判断参数列表中指定的主键Id,是否都存在。
|
||||
*
|
||||
* @param statsIds 主键Id集合。
|
||||
* @return 应答结果对象,包含true全部存在,否则false。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/courseTransStats/existIds")
|
||||
ResponseResult<Boolean> existIds(@RequestParam("statsIds") Set<Long> statsIds);
|
||||
|
||||
/**
|
||||
* 判断主键Id是否存在。
|
||||
*
|
||||
* @param statsId 参数主键Id。
|
||||
* @return 应答结果对象,包含true表示存在,否则false。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/courseTransStats/existId")
|
||||
ResponseResult<Boolean> existId(@RequestParam("statsId") Long statsId);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据列表。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含实体对象集合。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/courseTransStats/listBy")
|
||||
ResponseResult<List<CourseTransStatsDto>> listBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的单条数据对象。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含实体对象。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/courseTransStats/getBy")
|
||||
ResponseResult<CourseTransStatsDto> getBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据列表。
|
||||
* 和listBy接口相比,以Map列表的方式返回的主要目的是,降低服务之间的耦合度。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含主对象集合。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/courseTransStats/listMapBy")
|
||||
ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据数量。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含结果数量。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/courseTransStats/countBy")
|
||||
ResponseResult<Integer> countBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程对象中符合查询条件的分组聚合计算Map列表。
|
||||
*
|
||||
* @param aggregationParam 聚合参数。
|
||||
* @return 应该结果对象,包含聚合计算后的分组Map列表。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/courseTransStats/aggregateBy")
|
||||
ResponseResult<List<Map<String, Object>>> aggregateBy(@RequestBody MyAggregationParam aggregationParam);
|
||||
|
||||
@Component("StatsCourseTransStatsClientFallbackFactory")
|
||||
@Slf4j
|
||||
class CourseTransStatsClientFallbackFactory implements FallbackFactory<CourseTransStatsClient>, CourseTransStatsClient {
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<CourseTransStatsDto>> listByIds(
|
||||
Set<Long> statsIds, Boolean withDict) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<CourseTransStatsDto> getById(
|
||||
Long statsId, Boolean withDict) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<Boolean> existIds(Set<Long> statsIds) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<Boolean> existId(Long statsId) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<CourseTransStatsDto>> listBy(MyQueryParam queryParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<CourseTransStatsDto> getBy(MyQueryParam queryParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<Map<String, Object>>> listMapBy(MyQueryParam queryParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<Integer> countBy(MyQueryParam queryParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<Map<String, Object>>> aggregateBy(MyAggregationParam aggregationParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CourseTransStatsClient create(Throwable throwable) {
|
||||
log.error("Exception For Feign Remote Call.", throwable);
|
||||
return new CourseTransStatsClientFallbackFactory();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,182 @@
|
||||
package com.orange.demo.statsinterface.client;
|
||||
|
||||
import com.orange.demo.common.core.config.FeignConfig;
|
||||
import com.orange.demo.common.core.base.client.BaseClient;
|
||||
import com.orange.demo.common.core.constant.ErrorCodeEnum;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.statsinterface.dto.StudentActionStatsDto;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 学生行为统计服务远程数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@FeignClient(
|
||||
name = "stats",
|
||||
configuration = FeignConfig.class,
|
||||
fallbackFactory = StudentActionStatsClient.StudentActionStatsClientFallbackFactory.class)
|
||||
public interface StudentActionStatsClient extends BaseClient<StudentActionStatsDto, Long> {
|
||||
|
||||
/**
|
||||
* 基于主键的(In-list)条件获取远程数据接口。
|
||||
*
|
||||
* @param statsIds 主键Id集合。
|
||||
* @param withDict 是否包含字典关联。
|
||||
* @return 应答结果对象,包含主对象的数据集合。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentActionStats/listByIds")
|
||||
ResponseResult<List<StudentActionStatsDto>> listByIds(
|
||||
@RequestParam("statsIds") Set<Long> statsIds,
|
||||
@RequestParam("withDict") Boolean withDict);
|
||||
|
||||
/**
|
||||
* 基于主键Id,获取远程对象。
|
||||
*
|
||||
* @param statsId 主键Id。
|
||||
* @param withDict 是否包含字典关联。
|
||||
* @return 应答结果对象,包含主对象数据。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentActionStats/getById")
|
||||
ResponseResult<StudentActionStatsDto> getById(
|
||||
@RequestParam("statsId") Long statsId,
|
||||
@RequestParam("withDict") Boolean withDict);
|
||||
|
||||
/**
|
||||
* 判断参数列表中指定的主键Id,是否都存在。
|
||||
*
|
||||
* @param statsIds 主键Id集合。
|
||||
* @return 应答结果对象,包含true全部存在,否则false。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentActionStats/existIds")
|
||||
ResponseResult<Boolean> existIds(@RequestParam("statsIds") Set<Long> statsIds);
|
||||
|
||||
/**
|
||||
* 判断主键Id是否存在。
|
||||
*
|
||||
* @param statsId 参数主键Id。
|
||||
* @return 应答结果对象,包含true表示存在,否则false。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentActionStats/existId")
|
||||
ResponseResult<Boolean> existId(@RequestParam("statsId") Long statsId);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据列表。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含实体对象集合。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentActionStats/listBy")
|
||||
ResponseResult<List<StudentActionStatsDto>> listBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的单条数据对象。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含实体对象。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentActionStats/getBy")
|
||||
ResponseResult<StudentActionStatsDto> getBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据列表。
|
||||
* 和listBy接口相比,以Map列表的方式返回的主要目的是,降低服务之间的耦合度。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含主对象集合。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentActionStats/listMapBy")
|
||||
ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据数量。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含结果数量。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentActionStats/countBy")
|
||||
ResponseResult<Integer> countBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程对象中符合查询条件的分组聚合计算Map列表。
|
||||
*
|
||||
* @param aggregationParam 聚合参数。
|
||||
* @return 应该结果对象,包含聚合计算后的分组Map列表。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentActionStats/aggregateBy")
|
||||
ResponseResult<List<Map<String, Object>>> aggregateBy(@RequestBody MyAggregationParam aggregationParam);
|
||||
|
||||
@Component("StatsStudentActionStatsClientFallbackFactory")
|
||||
@Slf4j
|
||||
class StudentActionStatsClientFallbackFactory implements FallbackFactory<StudentActionStatsClient>, StudentActionStatsClient {
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<StudentActionStatsDto>> listByIds(
|
||||
Set<Long> statsIds, Boolean withDict) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<StudentActionStatsDto> getById(
|
||||
Long statsId, Boolean withDict) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<Boolean> existIds(Set<Long> statsIds) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<Boolean> existId(Long statsId) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<StudentActionStatsDto>> listBy(MyQueryParam queryParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<StudentActionStatsDto> getBy(MyQueryParam queryParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<Map<String, Object>>> listMapBy(MyQueryParam queryParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<Integer> countBy(MyQueryParam queryParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<Map<String, Object>>> aggregateBy(MyAggregationParam aggregationParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StudentActionStatsClient create(Throwable throwable) {
|
||||
log.error("Exception For Feign Remote Call.", throwable);
|
||||
return new StudentActionStatsClientFallbackFactory();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,182 @@
|
||||
package com.orange.demo.statsinterface.client;
|
||||
|
||||
import com.orange.demo.common.core.config.FeignConfig;
|
||||
import com.orange.demo.common.core.base.client.BaseClient;
|
||||
import com.orange.demo.common.core.constant.ErrorCodeEnum;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.statsinterface.dto.StudentActionTransDto;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 学生行为流水服务远程数据操作访问接口。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@FeignClient(
|
||||
name = "stats",
|
||||
configuration = FeignConfig.class,
|
||||
fallbackFactory = StudentActionTransClient.StudentActionTransClientFallbackFactory.class)
|
||||
public interface StudentActionTransClient extends BaseClient<StudentActionTransDto, Long> {
|
||||
|
||||
/**
|
||||
* 基于主键的(In-list)条件获取远程数据接口。
|
||||
*
|
||||
* @param transIds 主键Id集合。
|
||||
* @param withDict 是否包含字典关联。
|
||||
* @return 应答结果对象,包含主对象的数据集合。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentActionTrans/listByIds")
|
||||
ResponseResult<List<StudentActionTransDto>> listByIds(
|
||||
@RequestParam("transIds") Set<Long> transIds,
|
||||
@RequestParam("withDict") Boolean withDict);
|
||||
|
||||
/**
|
||||
* 基于主键Id,获取远程对象。
|
||||
*
|
||||
* @param transId 主键Id。
|
||||
* @param withDict 是否包含字典关联。
|
||||
* @return 应答结果对象,包含主对象数据。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentActionTrans/getById")
|
||||
ResponseResult<StudentActionTransDto> getById(
|
||||
@RequestParam("transId") Long transId,
|
||||
@RequestParam("withDict") Boolean withDict);
|
||||
|
||||
/**
|
||||
* 判断参数列表中指定的主键Id,是否都存在。
|
||||
*
|
||||
* @param transIds 主键Id集合。
|
||||
* @return 应答结果对象,包含true全部存在,否则false。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentActionTrans/existIds")
|
||||
ResponseResult<Boolean> existIds(@RequestParam("transIds") Set<Long> transIds);
|
||||
|
||||
/**
|
||||
* 判断主键Id是否存在。
|
||||
*
|
||||
* @param transId 参数主键Id。
|
||||
* @return 应答结果对象,包含true表示存在,否则false。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentActionTrans/existId")
|
||||
ResponseResult<Boolean> existId(@RequestParam("transId") Long transId);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据列表。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含实体对象集合。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentActionTrans/listBy")
|
||||
ResponseResult<List<StudentActionTransDto>> listBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的单条数据对象。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含实体对象。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentActionTrans/getBy")
|
||||
ResponseResult<StudentActionTransDto> getBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据列表。
|
||||
* 和listBy接口相比,以Map列表的方式返回的主要目的是,降低服务之间的耦合度。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含主对象集合。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentActionTrans/listMapBy")
|
||||
ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据数量。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含结果数量。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentActionTrans/countBy")
|
||||
ResponseResult<Integer> countBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程对象中符合查询条件的分组聚合计算Map列表。
|
||||
*
|
||||
* @param aggregationParam 聚合参数。
|
||||
* @return 应该结果对象,包含聚合计算后的分组Map列表。
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentActionTrans/aggregateBy")
|
||||
ResponseResult<List<Map<String, Object>>> aggregateBy(@RequestBody MyAggregationParam aggregationParam);
|
||||
|
||||
@Component("StatsStudentActionTransClientFallbackFactory")
|
||||
@Slf4j
|
||||
class StudentActionTransClientFallbackFactory implements FallbackFactory<StudentActionTransClient>, StudentActionTransClient {
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<StudentActionTransDto>> listByIds(
|
||||
Set<Long> transIds, Boolean withDict) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<StudentActionTransDto> getById(
|
||||
Long transId, Boolean withDict) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<Boolean> existIds(Set<Long> transIds) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<Boolean> existId(Long transId) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<StudentActionTransDto>> listBy(MyQueryParam queryParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<StudentActionTransDto> getBy(MyQueryParam queryParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<Map<String, Object>>> listMapBy(MyQueryParam queryParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<Integer> countBy(MyQueryParam queryParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult<List<Map<String, Object>>> aggregateBy(MyAggregationParam aggregationParam) {
|
||||
return ResponseResult.error(ErrorCodeEnum.RPC_DATA_ACCESS_FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StudentActionTransClient create(Throwable throwable) {
|
||||
log.error("Exception For Feign Remote Call.", throwable);
|
||||
return new StudentActionTransClientFallbackFactory();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
package com.orange.demo.statsinterface.dto;
|
||||
|
||||
import com.orange.demo.common.core.validator.UpdateGroup;
|
||||
import com.orange.demo.common.core.validator.ConstDictRef;
|
||||
import com.orange.demo.application.common.constant.Subject;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* CourseTransStatsDto对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@ApiModel("CourseTransStatsDto实体对象")
|
||||
@Data
|
||||
public class CourseTransStatsDto {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id", required = true)
|
||||
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
|
||||
private Long statsId;
|
||||
|
||||
/**
|
||||
* 统计日期。
|
||||
*/
|
||||
@ApiModelProperty(value = "统计日期", required = true)
|
||||
@NotNull(message = "数据验证失败,统计日期不能为空!")
|
||||
private Date statsDate;
|
||||
|
||||
/**
|
||||
* 科目Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "科目Id", required = true)
|
||||
@NotNull(message = "数据验证失败,所属科目不能为空!")
|
||||
@ConstDictRef(constDictClass = Subject.class, message = "数据验证失败,所属科目为无效值!")
|
||||
private Integer subjectId;
|
||||
|
||||
/**
|
||||
* 年级Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "年级Id", required = true)
|
||||
@NotNull(message = "数据验证失败,所属年级不能为空!")
|
||||
private Integer gradeId;
|
||||
|
||||
/**
|
||||
* 年级名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "年级名称")
|
||||
private String gradeName;
|
||||
|
||||
/**
|
||||
* 课程Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "课程Id", required = true)
|
||||
@NotNull(message = "数据验证失败,课程ID不能为空!")
|
||||
private Long courseId;
|
||||
|
||||
/**
|
||||
* 课程名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "课程名称")
|
||||
private String courseName;
|
||||
|
||||
/**
|
||||
* 学生上课次数。
|
||||
*/
|
||||
@ApiModelProperty(value = "学生上课次数", required = true)
|
||||
@NotNull(message = "数据验证失败,上课次数不能为空!")
|
||||
private Integer studentAttendCount;
|
||||
|
||||
/**
|
||||
* 学生献花数量。
|
||||
*/
|
||||
@ApiModelProperty(value = "学生献花数量", required = true)
|
||||
@NotNull(message = "数据验证失败,献花数量不能为空!")
|
||||
private Integer studentFlowerAmount;
|
||||
|
||||
/**
|
||||
* 学生献花次数。
|
||||
*/
|
||||
@ApiModelProperty(value = "学生献花次数", required = true)
|
||||
@NotNull(message = "数据验证失败,献花次数不能为空!")
|
||||
private Integer studentFlowerCount;
|
||||
|
||||
/**
|
||||
* statsDate 范围过滤起始值(>=)。
|
||||
*/
|
||||
@ApiModelProperty(value = "statsDate 范围过滤起始值(>=)")
|
||||
private String statsDateStart;
|
||||
|
||||
/**
|
||||
* statsDate 范围过滤结束值(<=)。
|
||||
*/
|
||||
@ApiModelProperty(value = "statsDate 范围过滤结束值(<=)")
|
||||
private String statsDateEnd;
|
||||
|
||||
/**
|
||||
* gradeId 字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Map<String, Object> gradeIdDictMap;
|
||||
|
||||
/**
|
||||
* courseId 字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Map<String, Object> courseIdDictMap;
|
||||
|
||||
/**
|
||||
* subjectId 常量字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Map<String, Object> subjectIdDictMap;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user