Ver Fonte

bug修复

wangliang há 4 anos atrás
pai
commit
fb0bc6bf87

+ 6 - 2
teachcloud-report/src/main/java/com/qmth/teachcloud/report/api/WudaOpenApiController.java

@@ -2,8 +2,10 @@ package com.qmth.teachcloud.report.api;
 
 import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.teachcloud.common.config.DictionaryConfig;
+import com.qmth.teachcloud.common.entity.SysUser;
 import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
 import com.qmth.teachcloud.common.util.Result;
+import com.qmth.teachcloud.common.util.ServletUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiResponse;
@@ -34,8 +36,9 @@ public class WudaOpenApiController {
         if (Objects.isNull(uid)) {
             throw ExceptionResultEnum.NOT_LOGIN.exception();
         }
+        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
         response.setHeader("Access-Control-Allow-Origin", "*");
-        response.sendRedirect(dictionaryConfig.sysDomain().getReportUrl() + uid);
+        response.sendRedirect(dictionaryConfig.sysDomain().getReportUrl() + sysUser.getSchoolId() + "/" + uid);
     }
 
 //    @ApiOperation(value = "cas鉴权接口")
@@ -43,7 +46,8 @@ public class WudaOpenApiController {
 //    @ApiResponses({@ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class)})
 //    public void authentication(HttpServletRequest request, HttpServletResponse response, @PathVariable String studentCode
 //    ) throws IOException {
+//        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
 //        response.setHeader("Access-Control-Allow-Origin", "*");
-//        response.sendRedirect(dictionaryConfig.sysDomain().getReportUrl() + studentCode);
+//        response.sendRedirect(dictionaryConfig.sysDomain().getReportUrl() + sysUser.getSchoolId() + "/" + studentCode);
 //    }
 }

+ 1 - 1
teachcloud-report/src/main/resources/application-dev.properties

@@ -58,7 +58,7 @@ sys.config.adminLogoUrl=http://qmth-test.oss-cn-shenzhen.aliyuncs.com/frontend/w
 #sys.config.autoCreatePdfResetMaxCount=5
 sys.config.threadPoolCoreSize=1
 sys.config.customThreadPoolCoreSize=false
-sys.config.reportUrl=http://localhost:7004/#/student-report/
+sys.config.reportUrl=http://localhost:9099/#/student-report/
 spring.resources.static-locations=file:${sys.config.serverUpload},classpath:/META-INF/resources/,classpath:/resources/
 
 org.center.url=https://solar.qmth.com.cn

+ 15 - 15
teachcloud-report/src/main/resources/application-release.properties

@@ -1,4 +1,4 @@
-server.port=7006
+server.port=8877
 #tomcat\u6700\u5927\u7EBF\u7A0B\u6570\uFF0C\u9ED8\u8BA4\u4E3A200
 server.tomcat.threads.max=2500
 #tomcat\u6700\u5927\u8FDE\u63A5\u6570
@@ -10,17 +10,17 @@ server.tomcat.uri-encoding=UTF-8
 spring.application.name=teachcloud-report
 
 #\u6570\u636E\u6E90\u914D\u7F6E
-db.host=192.168.10.136
+db.host=rm-wz9s1kch755798kt6.mysql.rds.aliyuncs.com
 db.port=3306
-db.name=teachcloud-report
-db.username=root
-db.password=Qmth87863577!
+db.name=wdu
+db.username=wdfx
+db.password=qmth_wdfx
 
 #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.password=123456
+redis.host=qmth-redis2.redis.rds.aliyuncs.com
+redis.database=9
+redis.port=6379
+redis.password=wdfx_redis:Wdfx_redis
 
 #mysql\u914D\u7F6E
 com.qmth.mysql.url=jdbc:mysql://${db.host}:${db.port}/${db.name}?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8
@@ -44,8 +44,8 @@ sys.config.attachmentType=.xlsx,.xls,.doc,.docx,.pdf,.jpg,.jpeg,.png,.html,.zip,
 sys.config.attachmentLength=100
 sys.config.attachmentSize=200
 sys.config.serverUpload=
-sys.config.fileHost=localhost:7004
-sys.config.serverHost=localhost:7004
+sys.config.fileHost=localhost:8877
+sys.config.serverHost=localhost:8877
 #sys.config.accessKey=0bce69d94a7b4aef8bc0badf150351a9
 #sys.config.accessSecret=LdUwb5X4etmjW7fDn0KAdoXG0Yt7AkDu
 sys.config.accessKey=274f823e5f59410f8b3bb6edcd8e2b6e
@@ -55,8 +55,8 @@ sys.config.adminLogoUrl=http://qmth-test.oss-cn-shenzhen.aliyuncs.com/frontend/w
 #sys.config.htmlToPdfUrl=/usr/local/bin/wkhtmltopdf
 #sys.config.autoCreatePdfResetMaxCount=5
 sys.config.threadPoolCoreSize=1
-sys.config.customThreadPoolCoreSize=true
-sys.config.reportUrl=http://localhost:7004/#/student-report/
+sys.config.customThreadPoolCoreSize=false
+sys.config.reportUrl=https://localhost:8877/#/student-report/
 spring.resources.static-locations=file:${sys.config.serverUpload},classpath:/META-INF/resources/,classpath:/resources/
 
 org.center.url=https://solar.qmth.com.cn
@@ -65,7 +65,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=false
+com.qmth.api.global-auth=true
 #com.qmth.api.global-strict=false
 #com.qmth.api.global-rate-limit=1/5s
 
@@ -95,7 +95,7 @@ prefix.url.analyze=report/analyze
 
 #\u65E5\u5FD7\u914D\u7F6E
 com.qmth.logging.root-level=info
-com.qmth.logging.file-path=/Users/king/Downloads/teachcloud-report.log
+com.qmth.logging.file-path=./logs/teachcloud-report.log
 
 #\u5F15\u5165task\u914D\u7F6E\u6587\u4EF6
 spring.profiles.include=task