wangliang пре 2 дана
родитељ
комит
cd3f95ecfe

+ 4 - 6
cas/src/main/java/com/qmth/teachcloud/cas/api/OpenApiController.java

@@ -1,7 +1,6 @@
 package com.qmth.teachcloud.cas.api;
 
 import com.qmth.boot.api.annotation.Aac;
-import com.qmth.boot.api.annotation.BOOL;
 import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.teachcloud.cas.util.CdutCasUtil;
 import com.qmth.teachcloud.cas.util.GdpuCasUtil;
@@ -16,7 +15,6 @@ import com.qmth.teachcloud.exchange.common.enums.SchoolCodeEnum;
 import com.qmth.teachcloud.exchange.common.service.CommonService;
 import com.qmth.teachcloud.exchange.common.util.JacksonUtil;
 import com.qmth.teachcloud.exchange.common.util.Result;
-import com.qmth.teachcloud.exchange.common.util.ResultUtil;
 import com.qmth.teachcloud.exchange.common.util.ServletUtil;
 import io.swagger.annotations.*;
 import org.slf4j.Logger;
@@ -63,7 +61,7 @@ public class OpenApiController {
     @ApiOperation(value = "cas鉴权接口")
     @ApiResponses({@ApiResponse(code = 200, message = "返回消息", response = Result.class)})
     @RequestMapping(value = "/{schoolCode}/authentication", method = RequestMethod.GET)
-    @Aac(auth = BOOL.FALSE)
+    @Aac(auth = false)
     public void authentication(@ApiParam(value = "学校编码") @PathVariable("schoolCode") String schoolCode,
                                @ApiParam(value = "工号") @RequestParam(required = false) String code,
                                @ApiParam(value = "系统参数") @RequestParam(required = false) String state,
@@ -96,7 +94,7 @@ public class OpenApiController {
     @ApiOperation(value = "cas鉴权退出接口")
     @RequestMapping(value = "/{schoolCode}/authentication/logout", method = RequestMethod.GET)
     @ApiResponses({@ApiResponse(code = 200, message = "返回消息", response = Result.class)})
-    @Aac(auth = BOOL.FALSE)
+    @Aac(auth = false)
     public void logout(@ApiParam(value = "学校编码") @PathVariable("schoolCode") String schoolCode,
                        @ApiParam(value = "sessionId", required = false) @RequestParam(required = false) String gSessionId) throws IOException {
         switch (SchoolCodeEnum.valueOf(schoolCode.toUpperCase())) {
@@ -120,7 +118,7 @@ public class OpenApiController {
     @ApiOperation(value = "跳转知学知考")
     @RequestMapping(value = "/{schoolCode}/authentication/zxzk_login", method = RequestMethod.GET)
     @ApiResponses({@ApiResponse(code = 200, message = "返回消息", response = Result.class)})
-    @Aac(auth = BOOL.FALSE)
+    @Aac(auth = false)
     public void zxzkLogin(@ApiParam(value = "学校编码") @PathVariable("schoolCode") String schoolCode) throws IOException {
         HttpServletRequest request = ServletUtil.getRequest();
         HttpServletResponse response = ServletUtil.getResponse();
@@ -161,7 +159,7 @@ public class OpenApiController {
     @ApiOperation(value = "cas_mq鉴权接口")
     @ApiResponses({@ApiResponse(code = 200, message = "返回消息", response = Result.class)})
     @RequestMapping(value = "/{schoolCode}/mq/account", method = RequestMethod.GET)
-    @Aac(auth = BOOL.FALSE)
+    @Aac(auth = false)
     public void maAccount(@ApiParam(value = "学校编码") @PathVariable("schoolCode") String schoolCode,
                           @ApiParam(value = "员工工号") @RequestParam(required = false) String employeeNo) throws IOException {
         RedirectParams redirectParams = null;

+ 2 - 2
cas/src/main/java/com/qmth/teachcloud/cas/aspect/ApiControllerAspect.java → cas/src/main/java/com/qmth/teachcloud/cas/aspect/ApiCasControllerAspect.java

@@ -31,8 +31,8 @@ import java.util.StringJoiner;
  */
 @Aspect
 @Component
-public class ApiControllerAspect {
-    private final static Logger log = LoggerFactory.getLogger(ApiControllerAspect.class);
+public class ApiCasControllerAspect {
+    private final static Logger log = LoggerFactory.getLogger(ApiCasControllerAspect.class);
 
     /**
      * api切入点

+ 3 - 3
cas/src/main/java/com/qmth/teachcloud/cas/mq/gdpu/api/GdpuMqController.java

@@ -4,7 +4,6 @@ import cn.hutool.core.date.DateUtil;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.qmth.boot.api.annotation.Aac;
-import com.qmth.boot.api.annotation.BOOL;
 import com.qmth.teachcloud.cas.mq.gdpu.bean.AESEncryptUtils;
 import com.qmth.teachcloud.cas.mq.gdpu.bean.ProcessInfoDTO;
 import com.qmth.teachcloud.cas.mq.gdpu.bean.RemarkInfoDTO;
@@ -38,7 +37,7 @@ import java.util.*;
 @Api(tags = "广东药科大学服务中台controller")
 @RestController
 //@RequestMapping(SystemConstant.PREFIX_URL_GDPU_GET_BACK_LOG)
-@Aac(auth = BOOL.FALSE)
+@Aac(auth = false)
 @Validated
 public class GdpuMqController {
     private final static Logger log = LoggerFactory.getLogger(GdpuMqController.class);
@@ -231,7 +230,8 @@ public class GdpuMqController {
         remarkInfoDTO.setActionName(doneTaskDto.getApproveOperation().name());
         remarkInfoDTO.setUserId(doneTaskDto.getApproveUserName());
         remarkInfoDTO.setUserName(doneTaskDto.getRealName());
-        remarkInfoDTO.setOrunId(String.valueOf(doneTaskDto.getId()));
+//        remarkInfoDTO.setOrunId(String.valueOf(doneTaskDto.getId()));
+        remarkInfoDTO.setOrunId(String.valueOf(doneTaskDto.getTaskId()));
         remarkInfoDTO.setRemark(doneTaskDto.getApproveRemark());
         remarkInfoDTO.setUrl(SystemConstant.GDPU_CAS_MQ_URL + "?schoolCode=" + schoolCode + "&employeeNo=" + doneTaskDto.getApproveUserName());
         remarkInfoDTO.setMobileUrl(SystemConstant.GDPU_CAS_MQ_URL + "?schoolCode=" + schoolCode + "&employeeNo=" + doneTaskDto.getApproveUserName());

+ 1 - 2
cas/src/main/java/com/qmth/teachcloud/cas/mq/gdpu/api/OpenMqController.java

@@ -1,7 +1,6 @@
 package com.qmth.teachcloud.cas.mq.gdpu.api;
 
 import com.qmth.boot.api.annotation.Aac;
-import com.qmth.boot.api.annotation.BOOL;
 import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.teachcloud.cas.mq.gdpu.cache.FlowMqCacheUtil;
 import com.qmth.teachcloud.exchange.common.bean.dto.flow.DoneTaskDto;
@@ -29,7 +28,7 @@ import java.util.*;
 @Api(tags = "广东药科大学获取流程消息controller")
 @RestController
 @RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + SystemConstant.PREFIX_URL_GDPU_MQ)
-@Aac(auth = BOOL.FALSE)
+@Aac(auth = false)
 @Validated
 public class OpenMqController {
     private final static Logger log = LoggerFactory.getLogger(OpenMqController.class);

+ 3 - 3
cas/src/main/resources/application.properties

@@ -49,9 +49,9 @@ spring.jackson.time-zone=GMT+8
 com.qmth.logging.root-level=info
 com.qmth.logging.file-path=/Users/king/Downloads/cas-exchange.log
 
-com.qmth.solar.access-key=df8baa73072c4725a07fe4d119cceb24
-com.qmth.solar.access-secret=r18hy2X8zkj8OPkRoemq1owt4qS87Gal
-#com.qmth.solar.license=/Volumes/extend/\u542F\u660E/\u5206\u5E03\u5F0F\u5370\u5237/\u5206\u5E03\u5F0F\u5370\u5237&\u6559\u7814\u5206\u6790v3.1.0/tc-dev-wl.lic
+#com.qmth.solar.access-key=df8baa73072c4725a07fe4d119cceb24
+#com.qmth.solar.access-secret=r18hy2X8zkj8OPkRoemq1owt4qS87Gal
+com.qmth.solar.license=/Users/king/Downloads/zxzk-gdpu.lic
 
 cas.filter.gdpuServerName=exam.gdpu.edu.cn:7400
 cas.filter.sxufeServerName=210.31.120.103:7400

+ 1 - 2
eds/src/main/java/com/qmth/teachcloud/eds/api/ApiController.java

@@ -1,7 +1,6 @@
 package com.qmth.teachcloud.eds.api;
 
 import com.qmth.boot.api.annotation.Aac;
-import com.qmth.boot.api.annotation.BOOL;
 import com.qmth.teachcloud.eds.service.GdpuService;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.*;
@@ -10,7 +9,7 @@ import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
 
 @Controller
-@Aac(auth = BOOL.FALSE)
+@Aac(auth = false)
 public class ApiController {
     @Resource
     GdpuService gdpuService;

+ 4 - 0
teachcloud-exchange-common/pom.xml

@@ -126,6 +126,10 @@
             <groupId>com.aventrix.jnanoid</groupId>
             <artifactId>jnanoid</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+        </dependency>
     </dependencies>
 
 </project>

+ 9 - 9
teachcloud-exchange-common/src/main/java/com/qmth/teachcloud/exchange/common/util/FileStoreUtil.java

@@ -1,6 +1,6 @@
 package com.qmth.teachcloud.exchange.common.util;
 
-import com.qmth.boot.core.fss.service.FileService;
+import com.qmth.boot.core.fss.service.FileStoreService;
 import com.qmth.teachcloud.exchange.common.config.DictionaryConfig;
 import com.qmth.teachcloud.exchange.common.enums.UploadFileEnum;
 import org.apache.commons.codec.digest.DigestUtils;
@@ -23,7 +23,7 @@ public class FileStoreUtil {
     private final static Logger log = LoggerFactory.getLogger(FileStoreUtil.class);
 
     @Resource
-    private FileService fileService;
+    private FileStoreService fileStoreService;
 
     @Resource
     private DictionaryConfig dictionaryConfig;
@@ -37,7 +37,7 @@ public class FileStoreUtil {
      */
     public void ossUpload(String dirName, InputStream inputStream, String md5, String type) throws Exception {
         log.info("ossUpload is come in");
-        fileService.getFileStore(type).write(dirName, inputStream, md5);
+        fileStoreService.getFileStore(type).write(dirName, inputStream, md5);
         log.info("dirName:{}", dirName);
     }
 
@@ -88,7 +88,7 @@ public class FileStoreUtil {
      */
     public void ossUpload(String dirName, File file, String md5, String type) throws Exception {
         log.info("ossUpload is come in");
-        fileService.getFileStore(type).write(dirName, new FileInputStream(file), md5);
+        fileStoreService.getFileStore(type).write(dirName, new FileInputStream(file), md5);
         log.info("dirName:{}", dirName);
     }
 
@@ -101,7 +101,7 @@ public class FileStoreUtil {
      */
     public void ossUpload(String dirName, String content, String type) throws Exception {
         log.info("ossUpload is come in");
-        fileService.getFileStore(type).write(dirName, new ByteArrayInputStream(content.getBytes()), DigestUtils.md5Hex(new ByteArrayInputStream(content.getBytes())));
+        fileStoreService.getFileStore(type).write(dirName, new ByteArrayInputStream(content.getBytes()), DigestUtils.md5Hex(new ByteArrayInputStream(content.getBytes())));
         log.info("dirName:{}", dirName);
     }
 
@@ -115,7 +115,7 @@ public class FileStoreUtil {
      */
     public File ossDownload(String dirName, String localPath, String type) throws Exception {
         log.info("ossDownload is come in");
-        return this.saveLocal(fileService.getFileStore(type).read(dirName), localPath);
+        return this.saveLocal(fileStoreService.getFileStore(type).read(dirName), localPath);
     }
 
 
@@ -128,7 +128,7 @@ public class FileStoreUtil {
      */
     public byte[] ossDownload(String objectName, String type) throws Exception {
         log.info("oss Download is come in");
-        return IOUtils.toByteArray(fileService.getFileStore(type).read(objectName));
+        return IOUtils.toByteArray(fileStoreService.getFileStore(type).read(objectName));
     }
 
     /**
@@ -140,7 +140,7 @@ public class FileStoreUtil {
      */
     public InputStream ossDownloadIs(String objectName, String type) throws Exception {
         log.info("oss Download is come in");
-        return fileService.getFileStore(type).read(objectName);
+        return fileStoreService.getFileStore(type).read(objectName);
     }
 
 
@@ -237,4 +237,4 @@ public class FileStoreUtil {
         }
         return file;
     }
-}
+}