Преглед на файлове

增加report基础模块

wangliang преди 4 години
родител
ревизия
48f17aa54f

+ 4 - 4
distributed-print/src/main/java/com/qmth/distributed/print/interceptor/AuthInterceptor.java

@@ -22,11 +22,11 @@ public class AuthInterceptor extends ExtendInterceptor {
     @Override
     public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
         log.info("preHandle is come in");
-//        if (request.getServletPath().contains(endpoint)) {
+        if (request.getServletPath().contains(endpoint)) {
             return true;
-//        } else {
-//            return AuthUtil.adminAuthInterceptor(request, response);
-//        }
+        } else {
+            return AuthUtil.adminAuthInterceptor(request, response);
+        }
     }
 
     @Override

+ 2 - 2
distributed-print/src/main/resources/application.properties

@@ -12,7 +12,7 @@ spring.application.name=distributed-print
 #\u6570\u636E\u6E90\u914D\u7F6E
 db.host=localhost
 db.port=3306
-db.name=distributed-136
+db.name=merge
 db.username=root
 db.password=123456789
 
@@ -68,7 +68,7 @@ org.center.orgQueryApi=/api/open/org/query
 #com.qmth.api.uri-prefix=/aaa
 #\u7EDF\u8BA1\u9875\u9762\u914D\u7F6E
 com.qmth.api.metrics-endpoint=/metrics-count
-com.qmth.api.global-auth=true
+com.qmth.api.global-auth=false
 #com.qmth.api.global-strict=false
 #com.qmth.api.global-rate-limit=1/5s
 

+ 1 - 1
distributed-print/src/main/java/com/qmth/distributed/print/api/BasicSchoolController.java → teachcloud-common/src/main/java/com/qmth/teachcloud/common/api/BasicSchoolController.java

@@ -1,4 +1,4 @@
-package com.qmth.distributed.print.api;
+package com.qmth.teachcloud.common.api;
 
 import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.teachcloud.common.bean.dto.SchoolDto;

+ 2 - 2
teachcloud-report/src/main/java/com/qmth/teachcloud/report/TeachcloudReportApplication.java

@@ -14,9 +14,9 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
 import javax.annotation.Resource;
 
 @SpringBootApplication(scanBasePackages = "com.qmth.*")
-@MapperScan({"com.qmth.distributed.print.business.mapper","com.qmth.teachcloud.report.business.mapper"})
+@MapperScan({"com.qmth.distributed.print.business.mapper","com.qmth.teachcloud.report.business.mapper","com.qmth.teachcloud.common.mapper"})
 //主要就是定义扫描的路径从中找出标识了需要装配的类自动装配到spring的bean容器中,做过web开发的同学一定都有用过@Controller,@Service,@Repository注解,查看其源码你会发现,他们中有一个共同的注解@Component,没错@ComponentScan注解默认就会装配标识了@Controller,@Service,@Repository,@Component注解的类到spring容器中
-@EntityScan(basePackages = {"com.qmth.distributed.print.business.entity","com.qmth.teachcloud.report.business.entity"}) // 用来扫描和发现指定包及其子包中的Entity定义
+@EntityScan(basePackages = {"com.qmth.distributed.print.business.entity","com.qmth.teachcloud.report.business.entity","com.qmth.teachcloud.common.entity"}) // 用来扫描和发现指定包及其子包中的Entity定义
 @EnableTransactionManagement // spring开启事务支持
 @EnableAsync // 开启异步任务
 @EnableCaching // 开启缓存注解

+ 7 - 6
teachcloud-report/src/main/resources/application.properties

@@ -12,14 +12,14 @@ spring.application.name=teachcloud-report
 #\u6570\u636E\u6E90\u914D\u7F6E
 db.host=localhost
 db.port=3306
-db.name=teachcloud-report
+db.name=merge
 db.username=root
 db.password=123456789
 
 #redis\u6570\u636E\u6E90\u914D\u7F6E
 com.qmth.redis.host=${db.host}
 com.qmth.redis.port=6379
-com.qmth.redis.db=1
+com.qmth.redis.db=0
 #com.qmth.redis.password
 
 #mysql\u914D\u7F6E
@@ -80,10 +80,11 @@ com.qmth.api.auth.time-max-delay=10000
 com.qmth.cache.expire-after-write=8h
 
 #api\u524D\u7F00
-prefix.url.common=report/admin/common
-prefix.url.sys=report/admin/sys
-prefix.url.basic=report/admin/basic
-prefix.url.data=report/admin/data
+prefix.url.common=admin/common
+prefix.url.sys=admin/sys
+prefix.url.basic=admin/basic
+prefix.url.exam=admin/exam
+prefix.url.data=admin/data
 
 #\u65E5\u5FD7\u914D\u7F6E
 com.qmth.logging.root-level=info