Lee-茶百道飞书接口调用方法更新

This commit is contained in:
李栋 2025-09-19 10:03:25 +08:00
parent c4aca5c6dd
commit 5adcb95c28
3 changed files with 6 additions and 2 deletions

View File

@ -13,6 +13,7 @@ import com.weaver.mc.api.entity.SendMessageEntity;
import com.weaver.seconddev.chapanda.constant.Constant; import com.weaver.seconddev.chapanda.constant.Constant;
import com.weaver.seconddev.chapanda.entity.dto.EmployeeAttendDTO; import com.weaver.seconddev.chapanda.entity.dto.EmployeeAttendDTO;
import com.weaver.seconddev.chapanda.feishu.constant.Constants; import com.weaver.seconddev.chapanda.feishu.constant.Constants;
import com.weaver.seconddev.chapanda.feishu.entity.OkHttpDto;
import com.weaver.seconddev.chapanda.feishu.util.Esb2FeishuOpenIdUtil; import com.weaver.seconddev.chapanda.feishu.util.Esb2FeishuOpenIdUtil;
import com.weaver.seconddev.chapanda.feishu.util.Esb2FeishuSendTodoUtil; import com.weaver.seconddev.chapanda.feishu.util.Esb2FeishuSendTodoUtil;
import com.weaver.seconddev.chapanda.feishu.util.Esb2FeishuTokenUtil; import com.weaver.seconddev.chapanda.feishu.util.Esb2FeishuTokenUtil;
@ -126,7 +127,8 @@ public class KqMindDoneAction implements EsbServerlessRpcRemoteInterface {
taskListArray.add(taskListJson); taskListArray.add(taskListJson);
bodyJson.put("task_list", taskListArray); bodyJson.put("task_list", taskListArray);
log.error("sendToFeiShuTodo-bodyJson:{}", bodyJson.toJSONString()); log.error("sendToFeiShuTodo-bodyJson:{}", bodyJson.toJSONString());
String sendResult = esb2FeishuSendTodoUtil.doPostSendMessage(bodyJson.toJSONString(), token); OkHttpDto okHttpDto = esb2FeishuSendTodoUtil.doPostSendMessage(bodyJson.toJSONString(), token);
String sendResult = okHttpDto.getResponseBody();
if (StringUtils.isNotBlank(sendResult)) { if (StringUtils.isNotBlank(sendResult)) {
JSONObject returnData = JSONObject.parseObject(sendResult); JSONObject returnData = JSONObject.parseObject(sendResult);
if (returnData.containsKey("code")) { if (returnData.containsKey("code")) {

View File

@ -13,6 +13,7 @@ import com.weaver.mc.api.entity.SendMessageEntity;
import com.weaver.seconddev.chapanda.constant.Constant; import com.weaver.seconddev.chapanda.constant.Constant;
import com.weaver.seconddev.chapanda.entity.dto.EmployeeAttendDTO; import com.weaver.seconddev.chapanda.entity.dto.EmployeeAttendDTO;
import com.weaver.seconddev.chapanda.feishu.constant.Constants; import com.weaver.seconddev.chapanda.feishu.constant.Constants;
import com.weaver.seconddev.chapanda.feishu.entity.OkHttpDto;
import com.weaver.seconddev.chapanda.feishu.util.Esb2FeishuBotCreateTodoUtil; import com.weaver.seconddev.chapanda.feishu.util.Esb2FeishuBotCreateTodoUtil;
import com.weaver.seconddev.chapanda.feishu.util.Esb2FeishuOpenIdUtil; import com.weaver.seconddev.chapanda.feishu.util.Esb2FeishuOpenIdUtil;
import com.weaver.seconddev.chapanda.feishu.util.Esb2FeishuSendTodoUtil; import com.weaver.seconddev.chapanda.feishu.util.Esb2FeishuSendTodoUtil;
@ -199,7 +200,8 @@ public class SendKqMindAction implements EsbServerlessRpcRemoteInterface {
taskListArray.add(taskListJson); taskListArray.add(taskListJson);
bodyJson.put("task_list", taskListArray); bodyJson.put("task_list", taskListArray);
log.error("sendToFeiShuTodo-bodyJson:{}", bodyJson.toJSONString()); log.error("sendToFeiShuTodo-bodyJson:{}", bodyJson.toJSONString());
String sendResult = esb2FeishuSendTodoUtil.doPostSendMessage(bodyJson.toJSONString(), token); OkHttpDto okHttpDto = esb2FeishuSendTodoUtil.doPostSendMessage(bodyJson.toJSONString(), token);
String sendResult = okHttpDto.getResponseBody();
if (StringUtils.isNotBlank(sendResult)) { if (StringUtils.isNotBlank(sendResult)) {
JSONObject returnData = JSONObject.parseObject(sendResult); JSONObject returnData = JSONObject.parseObject(sendResult);
if (returnData.containsKey("code")) { if (returnData.containsKey("code")) {