chenjiahe
2024-09-02 c7ca3856580ee63384d4e2d06d064a464e02fa5d
获取token优化1
2个文件已修改
8 ■■■■■ 已修改文件
phi_platform_common/src/main/java/com/hx/phip/common/wx/corp/WeiXinCorpMpUtil.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_common/src/main/java/com/hx/phip/common/wx/corp/WeiXinMpUtil.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_common/src/main/java/com/hx/phip/common/wx/corp/WeiXinCorpMpUtil.java
@@ -47,10 +47,11 @@
        if(sp != null) {
            //需要判断一下是否过期
            Calendar ca = Calendar.getInstance();
            long curTime = ca.getTimeInMillis();
            //加上一秒钟提前过期
            long curTime = ca.getTimeInMillis()+1000L;
            ca.setTime(sp.getCreateTime());
            ca.add(Calendar.SECOND, Integer.parseInt(sp.getParamValue1()));
            if(curTime <= ca.getTimeInMillis()) {
            if(curTime < ca.getTimeInMillis()) {
                needGetAgain = 0;
            }
        }
phi_platform_common/src/main/java/com/hx/phip/common/wx/corp/WeiXinMpUtil.java
@@ -46,7 +46,8 @@
        if(sp != null) {
            //需要判断一下是否过期
            Calendar ca = Calendar.getInstance();
            long curTime = ca.getTimeInMillis();
            //加上1秒钟,提前过期
            long curTime = ca.getTimeInMillis()+1000L;
            ca.setTime(sp.getCreateTime());
            ca.add(Calendar.SECOND, Integer.parseInt(sp.getParamValue1()));
            if(curTime < ca.getTimeInMillis()) {