mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 15:55:18 +08:00
feat: 优化钉钉消息发送逻辑,增加请求体和响应日志
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user