Req-3117 补全注释,添加日志
This commit is contained in:
parent
23188912d6
commit
362ca9a14e
@ -26,7 +26,7 @@ public interface DingDingMsgApi {
|
||||
* 发送钉钉消息
|
||||
* 给单个群发送
|
||||
* 目前只能给一个APPKEY,发送,后续扩展支持多个
|
||||
* 目前只能支持2个横着的按钮发送
|
||||
* 目前只能支持2个横着的按钮发送,其他类型,需要验证
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
|
||||
@ -5,7 +5,9 @@ import cn.axzo.riven.client.feign.DingDingMsgApi;
|
||||
import cn.axzo.riven.client.req.DingDingSendRebootGroupMsgReq;
|
||||
import cn.axzo.riven.client.req.DingDingSendRebootMsgReq;
|
||||
import cn.axzo.riven.service.DingDingRebootService;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@ -15,6 +17,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Component
|
||||
@Slf4j
|
||||
public class DingDingMsgController implements DingDingMsgApi {
|
||||
private final DingDingRebootService dingDingRebootService;
|
||||
|
||||
@ -26,6 +29,7 @@ public class DingDingMsgController implements DingDingMsgApi {
|
||||
|
||||
@Override
|
||||
public ApiResult<Void> sendRebootGroupMsg(DingDingSendRebootGroupMsgReq req) {
|
||||
log.info("sendRebootGroupMsg={}", JSON.toJSONString(req));
|
||||
dingDingRebootService.sendCorpRebootGroupMsg(req);
|
||||
return ApiResult.ok();
|
||||
}
|
||||
|
||||
@ -147,7 +147,7 @@ public class DingDingNewSdkManger {
|
||||
}
|
||||
}
|
||||
|
||||
public void sendGroupMessage(String accessToken, String rebootCode,String openConversationId, DingDingSendRebootGroupMsgReq req){
|
||||
public void sendGroupMessage(String accessToken, String rebootCode, String openConversationId, DingDingSendRebootGroupMsgReq req) {
|
||||
|
||||
|
||||
com.aliyun.dingtalkrobot_1_0.models.OrgGroupSendHeaders orgGroupSendHeaders = new com.aliyun.dingtalkrobot_1_0.models.OrgGroupSendHeaders();
|
||||
@ -160,6 +160,8 @@ public class DingDingNewSdkManger {
|
||||
|
||||
orgGroupSendRequest.setMsgParam(req.getReplyMessage().toJson());
|
||||
|
||||
log.info("sendGroupMessage, orgGroupSendRequest={},accessToken={}", JSON.toJSONString(orgGroupSendRequest), accessToken);
|
||||
|
||||
try {
|
||||
OrgGroupSendResponse response = dingTalkRobotClient.orgGroupSendWithOptions(orgGroupSendRequest, orgGroupSendHeaders, new com.aliyun.teautil.models.RuntimeOptions());
|
||||
log.info("sendGroupMessage, response={}", JSON.toJSONString(response));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user