修改微信服务获取token接口调用

This commit is contained in:
walker-sheng 2020-12-30 14:38:51 +08:00
parent 4628dc3fcb
commit 9426e4ddeb

View File

@ -61,14 +61,15 @@ public class MiniProgramAccessTokenManager {
// }
// }
public static final String URL_GET_ACCESS_TOKEN = "https://api.joylink.club/wechatservice/api/accessToken?clientid=%s&secret=%s&checksum=%s";
public static final String URL_GET_ACCESS_TOKEN = "https://api.joylink.club/wechatservice/api/accessToken?clientid=%s&secret=%s&checksum=%s&appid=%s";
public static final String clientId = "rtss";
public static final String secret = "joylink-0503";
public static final String appid = "wxe9150dbbcbf9440b";
public String getAccessToken() {
String url = String.format(URL_GET_ACCESS_TOKEN,
clientId, secret, EncryptUtil.md5(String.format("%s:%s", clientId, secret)));
clientId, secret, EncryptUtil.md5(String.format("%s:%s", clientId, secret)), appid);
CommonJsonResponse response = this.restTemplate.getForObject(url, CommonJsonResponse.class);
String accessToken = (String) response.getData();
if (!StringUtils.hasText(accessToken)) {