'提交代码'

dev-discount
= 4 years ago
parent 955b922aa4
commit 9bb30f4c53
  1. 3
      hai-cweb/src/main/java/com/cweb/controller/WechatController.java
  2. 3
      hai-schedule/src/main/java/com/hai/schedule/SynchronizeCNPC.java

@ -272,7 +272,6 @@ public class WechatController {
HttpServletRequest request, HttpServletResponse response) { HttpServletRequest request, HttpServletResponse response) {
try { try {
System.out.println("--------------获取access_token-----------------------");
// 获取access_token // 获取access_token
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
params.put("appid", SysConst.getSysConfig().getWxH5AppId()); params.put("appid", SysConst.getSysConfig().getWxH5AppId());
@ -280,8 +279,6 @@ public class WechatController {
params.put("code", code); params.put("code", code);
params.put("grant_type", "authorization_code"); params.put("grant_type", "authorization_code");
JSONObject jsonObject = HttpsUtils.doGet("https://api.weixin.qq.com/sns/oauth2/access_token", params); JSONObject jsonObject = HttpsUtils.doGet("https://api.weixin.qq.com/sns/oauth2/access_token", params);
System.out.println(jsonObject.toJSONString());
System.out.println("-----------------获取access_token--------------------");
String accessToken = jsonObject.getString("access_token"); String accessToken = jsonObject.getString("access_token");
String openid = jsonObject.getString("openid"); String openid = jsonObject.getString("openid");
if (StringUtils.isBlank(accessToken) || StringUtils.isBlank(openid)) { if (StringUtils.isBlank(accessToken) || StringUtils.isBlank(openid)) {

@ -55,7 +55,7 @@ public class SynchronizeCNPC {
String token = data.getString("token"); String token = data.getString("token");
Calendar instance = Calendar.getInstance(); Calendar instance = Calendar.getInstance();
instance.add(Calendar.MINUTE, -10); instance.add(Calendar.MINUTE, -15);
Map<String,Object> bodyMap = new HashMap<>(); Map<String,Object> bodyMap = new HashMap<>();
bodyMap.put("appId", config.getAppId()); bodyMap.put("appId", config.getAppId());
@ -89,7 +89,6 @@ public class SynchronizeCNPC {
} }
} }
} }
log.error(object.toJSONString());
} }
} }
} }

Loading…
Cancel
Save