|
|
@ -62,16 +62,16 @@ public class SzyServiceImpl implements ISzyService { |
|
|
text.put("content", paramBo.getContent() == null ? "" : paramBo.getContent()); |
|
|
text.put("content", paramBo.getContent() == null ? "" : paramBo.getContent()); |
|
|
params.put("text", text); |
|
|
params.put("text", text); |
|
|
log.info("深政易主动发送消息:params:{}", params); |
|
|
log.info("深政易主动发送消息:params:{}", params); |
|
|
|
|
|
|
|
|
// 3.调用发送消息接口
|
|
|
// 3.调用发送消息接口
|
|
|
String data = com.zdxt.enforcementcode.common.util.HttpUtil.httpSendPost(szyptUrl + "cgi-bin/message/send?access_token="+token, JSONObject.toJSONString(params), new HashMap<>()); |
|
|
String data = com.zdxt.enforcementcode.common.util.HttpUtil.httpSendPost(szyptUrl + "cgi-bin/message/send?access_token="+token, JSONObject.toJSONString(params), new HashMap<>()); |
|
|
|
|
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(data); |
|
|
JSONObject jsonObject = JSONObject.parseObject(data); |
|
|
log.info("深政易主动发送消息:data:{}", jsonObject); |
|
|
log.info("深政易主动发送消息:data:{}", jsonObject); |
|
|
|
|
|
|
|
|
// 4.判断返回成功并保存信息
|
|
|
|
|
|
String errcode = jsonObject == null ? null : jsonObject.getString("errcode"); |
|
|
String errcode = jsonObject == null ? null : jsonObject.getString("errcode"); |
|
|
LgSendMessageLogVo sendMessageVo; |
|
|
LgSendMessageLogVo sendMessageVo; |
|
|
if ("0".equals(errcode)) { |
|
|
if ("0".equals(errcode)) { |
|
|
|
|
|
// 4.判断返回成功并保存信息
|
|
|
sendMessageVo = messageInfo(jsonObject, paramBo, "0", null); |
|
|
sendMessageVo = messageInfo(jsonObject, paramBo, "0", null); |
|
|
log.info("深政易主动发送消息:发送成功"); |
|
|
log.info("深政易主动发送消息:发送成功"); |
|
|
}else { |
|
|
}else { |
|
|
|