feat: 优化钉钉消息发送逻辑,增加请求体和响应日志

This commit is contained in:
2025-02-09 19:32:58 +08:00
parent 80644e571c
commit 98f24fb043

View File

@@ -133,13 +133,14 @@ public class DingtalkBotService extends BaseService<DingtalkBotEntity, DingtalkB
try {
String post =
String postBody = objectMapper.writeValueAsString(body);
String response =
HttpUtil.post(
dingtalkBotEntity.getUrl(), objectMapper.writeValueAsString(body));
dingtalkBotEntity.getUrl(), postBody);
log.info("发送钉钉消息成功, 返回结果: {}", post);
log.info("发送钉钉消息成功, 请求: {} 返回结果: {} ", postBody , response);
sendMsgResult.setResponse(post);
sendMsgResult.setResponse(response);
} catch (Exception e) {
log.error("发送钉钉消息失败", e);