wangzaijun 7 ماه پیش
والد
کامیت
8879aeb866

+ 3 - 1
service-base/src/main/java/com/simuwang/base/config/ShiroConfig.java

@@ -116,7 +116,9 @@ public class ShiroConfig {
         sessionManager.setSessionValidationSchedulerEnabled(false);
         sessionManager.setSessionIdCookieEnabled(true);
         sessionManager.setSessionIdCookie(simpleCookie());
-        sessionManager.setGlobalSessionTimeout(3600000);
+        // session 超时时间
+        long timeout = this.properties.getTokenExpire() * 60 * 1000L;
+        sessionManager.setGlobalSessionTimeout(timeout);
         return sessionManager;
     }
 

+ 1 - 0
service-deploy/src/main/java/com/simuwang/deploy/components/ErrorInfoBuilder.java

@@ -81,6 +81,7 @@ public class ErrorInfoBuilder implements HandlerExceptionResolver, Ordered {
         } else if (error instanceof UnknownAccountException || error instanceof IncorrectCredentialsException) {
             msg = ResultCode.AUTH_FAILD.getMsg();
         } else if (error instanceof AuthenticationException) {
+            code = HttpStatus.UNAUTHORIZED.value();
             msg = "登录认证失败";
         } else if (error instanceof APIException e) {
             msg = e.getMsg();

+ 3 - 3
service-manage/src/main/java/com/simuwang/manage/api/deletion/DeletionController.java

@@ -90,7 +90,7 @@ public class DeletionController {
      * @return
      */
     @PostMapping("/download-fund-deletion")
-    public void downloadFundDeletion(@RequestBody FundDeletionListVO fundDeletionListVO, HttpServletResponse response, HttpServletRequest request){
+    public void downloadFundDeletion(@RequestBody FundDeletionListVO fundDeletionListVO, HttpServletResponse response){
         List<ExcelDeletionInfoDTO> fundDeletionInfoVOList = deletionService.selectFundDeletionInfoVOList(fundDeletionListVO);
         Map<String,List<List<String>>> values = new HashMap<>();
         List<String> head = new ArrayList<>();
@@ -115,8 +115,8 @@ public class DeletionController {
         values.put(sheetName,dataList);
         HSSFWorkbook wb = ExcelUtil.getHSSFWorkbook(sheetName,head,values,null);
         try {
-            response.setContentType("application/octet-stream; charset=utf-8");
-            response.setCharacterEncoding("utf-8");
+            response.setContentType("application/x-xls");
+            response.setCharacterEncoding("gbk");
             response.addHeader("Content-Disposition", "attachment;filename=" + EncodeUtil.encodeUTF8("缺失明细.xls"));
             ServletOutputStream outputStream = response.getOutputStream();
             wb.write(outputStream);