chenjiahe
2022-08-11 2b35339fd67969df7acb8c75bfceafa1ba134b41
src/main/java/com/platform/verification/VerificationTool.java
@@ -1,8 +1,5 @@
package com.platform.verification;
import com.alibaba.fastjson.JSONObject;
import com.hx.redis.RedisUtil;
import com.hx.util.DateUtil;
import com.hx.util.StringUtils;
import com.hx.util.rsa.RSAUtil;
@@ -41,7 +38,6 @@
            return PlatformResult.failure(PlatformCode.ERROR_APPIS, "APPID无效");
        }
        if(StringUtils.isEmpty(thirtApplication.getPrivateKey())){
            return PlatformResult.failure(PlatformCode.ERROR_SIGN, "签名错误,APPID无效");
        }
@@ -77,13 +73,13 @@
            return PlatformResult.failure(PlatformCode.ERROR_SIGN, "签名错误05");
        }
        //接口有效5秒钟
        if(System.currentTimeMillis()-date.getTime() > 5000){
        //接口有效30秒钟
        if(System.currentTimeMillis()-date.getTime() > 30000){
            return PlatformResult.failure(PlatformCode.ERRO_VISIT_OVERTIMR, "访问超时");
        }
        thirtApplication.setPrivateKey(null);
        request.setAttribute(LoginConstant.LOGIN_APPLY,thirtApplication);
        request.getSession().setAttribute(LoginConstant.LOGIN_APPLY,thirtApplication);
        return PlatformResult.success();
    }