lyhzzz 2 rokov pred
rodič
commit
4b30363439

+ 3 - 1
src/main/java/com/fdkankan/manage/controller/ExcelController.java

@@ -39,7 +39,9 @@ public class ExcelController {
             case 2 : fileName = "cameraCompany.xlsx"; break;
             default: throw new BusinessException(ErrorCode.MISSING_REQUIRED_PARAMETERS);
         }
-        String path = this.getClass().getResource("/template/" + fileName).getPath();
+        String path = this.getClass().getProtectionDomain().getCodeSource().getLocation().getFile();
+        path = java.net.URLDecoder.decode(path, "UTF-8");
+        path +="/template/"+ fileName;
         OutputStream os = res.getOutputStream();
         try {
             String agent = req.getHeader("USER-AGENT");

+ 1 - 1
src/main/java/com/fdkankan/manage/entity/SceneApply.java

@@ -71,7 +71,7 @@ public class SceneApply implements Serializable {
     private String country;
 
     /**
-     * 申请状态
+     * 邮件发送状态 0 待发送,1发送成功,2发送失败
      */
     @TableField("state")
     private Integer state;

+ 2 - 1
src/main/java/com/fdkankan/manage/service/impl/ManageService.java

@@ -2,6 +2,7 @@ package com.fdkankan.manage.service.impl;
 
 import cn.dev33.satoken.stp.SaLoginConfig;
 import cn.dev33.satoken.stp.StpUtil;
+import com.alibaba.fastjson.JSONObject;
 import com.fdkankan.common.constant.ErrorCode;
 import com.fdkankan.common.exception.BusinessException;
 import com.fdkankan.common.util.Base64Converter;
@@ -36,7 +37,7 @@ public class ManageService {
                 .setExtra("userName",result.getUserName())
                 .setExtra("nickName",result.getNickName()));
         result.setToken(StpUtil.getTokenValue());
-        redisUtil.set(String.format(RedisKey.TOKEN_V3 ,result.getToken()), "1", 216000);
+        redisUtil.set(String.format(RedisKey.TOKEN_V3 ,result.getToken()), JSONObject.toJSONString(result), 216000);
         return result;
     }