diff --git a/nakadai/src/main/java/com/huoran/nakadai/controller/EnterpriseCertificationController.java b/nakadai/src/main/java/com/huoran/nakadai/controller/EnterpriseCertificationController.java index 1df2504..d7d59d2 100644 --- a/nakadai/src/main/java/com/huoran/nakadai/controller/EnterpriseCertificationController.java +++ b/nakadai/src/main/java/com/huoran/nakadai/controller/EnterpriseCertificationController.java @@ -149,7 +149,7 @@ public class EnterpriseCertificationController { wxMssVo.setRequest_url("https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token=" + accessToken); //将模板中的值一一赋值 发送到小程序的数据要转化为json格式 可以使用下面的方法直接拼接成JSONObject //使用map结合模板 后续再加遍历拼接成JSONObject - HashMap map = new HashMap<>(3); + HashMap map = new HashMap<>(4); map.put("thing1", details.getCompanyName());//公司名称 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); @@ -161,6 +161,7 @@ public class EnterpriseCertificationController { //通过:更改认证状态 认证状态(0默认未认证 1.认证中2.已认证) enterpriseCertification.setAuthenticationStatus(2); authenticationStatus = "通过"; + map.put("thing3", "无");//备注 break; case 3: //不通过 diff --git a/nakadai/src/main/java/com/huoran/nakadai/utils/WeChatUtil.java b/nakadai/src/main/java/com/huoran/nakadai/utils/WeChatUtil.java index cdba470..64e81c3 100644 --- a/nakadai/src/main/java/com/huoran/nakadai/utils/WeChatUtil.java +++ b/nakadai/src/main/java/com/huoran/nakadai/utils/WeChatUtil.java @@ -60,9 +60,9 @@ public class WeChatUtil { // String appid = PropUtils.getProp("APPID"); // String appsecret = PropUtils.getProp("APPSECRET"); // 微信小程序ID - String appid = WeChatPropertiesUtil.PARTNER_WX_OPEN_APP_ID; + String appid = WeChatPropertiesUtil.KINDERGARTEN_WX_OPEN_APP_ID; // 微信小程序秘钥 - String appsecret =WeChatPropertiesUtil.PARTNER_WX_OPEN_APP_SECRET; + String appsecret =WeChatPropertiesUtil.KINDERGARTEN_WX_OPEN_APP_SECRET; //构建url,用于向微信服务器请求用户的openId StringBuffer url = new StringBuffer("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&"); @@ -75,7 +75,7 @@ public class WeChatUtil { HttpResponse httpResponse = client.execute(httpGet); HttpEntity result = httpResponse.getEntity(); String resultStr = EntityUtils.toString(result); - System.out.println(resultStr); + System.err.println(resultStr); JSONObject resultJsonObject = JSONUtil.parseObj(resultStr); String accessToken = (String) resultJsonObject.get("access_token"); return accessToken;