Bladeren bron

Merge branch 'develop' of gitadmin/tuoheng_telecomumale into release

tags/v1.0.0^2
chengwang 1 jaar geleden
bovenliggende
commit
7cbf4fc9dc
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. +2
    -2
      tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/WxServiceImpl.java

+ 2
- 2
tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/WxServiceImpl.java Bestand weergeven

@@ -113,7 +113,7 @@ public class WxServiceImpl implements IWxService {
*/
public String getAccessToken(){
//判断accessToken是否已经过期,如果国企需要重新获取
if(accessToken == null || expiresTime <System.currentTimeMillis()){
// if(accessToken == null || expiresTime <System.currentTimeMillis()){
RestTemplate restTemplate = new RestTemplate();
Map<String,String> params = new HashMap<>(2);
params.put("APPID",CommonConfig.appId);
@@ -134,7 +134,7 @@ public class WxServiceImpl implements IWxService {
Long expires_in = object.getLong("expires_in");
//失效时间 = 当前时间+有效期(提前一分钟,也可以不提前)
expiresTime = System.currentTimeMillis() + (expires_in - 60) * 1000;
}
// }

return accessToken;
}

Laden…
Annuleren
Opslaan