Commit 311c33f1 authored by chenyuxi's avatar chenyuxi

feat: 降日志等级

parent d0d60034
...@@ -124,11 +124,11 @@ public class WxConfig { ...@@ -124,11 +124,11 @@ public class WxConfig {
HttpHeaders headers = new HttpHeaders(); HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON_UTF8); headers.setContentType(MediaType.APPLICATION_JSON_UTF8);
Gson gson = new Gson(); Gson gson = new Gson();
log.error("发企业微信===请求:{}", gson.toJson(requestMap)); log.info("发企业微信===请求:{}", gson.toJson(requestMap));
HttpEntity<String> requestEntity = new HttpEntity<>(gson.toJson(requestMap), headers); HttpEntity<String> requestEntity = new HttpEntity<>(gson.toJson(requestMap), headers);
String accessToken = getAccessToken(restTemplate); String accessToken = getAccessToken(restTemplate);
ResponseEntity<String> responseEntity = restTemplate.postForEntity(String.format(SecurityConstants.WX_SEND_MESSAGE, accessToken), requestEntity, String.class); ResponseEntity<String> responseEntity = restTemplate.postForEntity(String.format(SecurityConstants.WX_SEND_MESSAGE, accessToken), requestEntity, String.class);
log.error("发企业微信===返回:{}",JSON.toJSONString(responseEntity)); log.info("发企业微信===返回:{}",JSON.toJSONString(responseEntity));
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(responseEntity)); JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(responseEntity));
JSONObject jsonBody = jsonObject.getJSONObject("body"); JSONObject jsonBody = jsonObject.getJSONObject("body");
if (jsonBody != null) { if (jsonBody != null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment