Lee-茶百道飞书接口调用unionId

This commit is contained in:
李栋 2025-09-09 15:34:04 +08:00
parent 5087272b1a
commit 4694fd460f
5 changed files with 65 additions and 7 deletions

View File

@ -68,7 +68,7 @@ public class KqMindDoneAction implements EsbServerlessRpcRemoteInterface {
} }
private void sendToFeiShuTodo(SimpleEmployee user, String dataId, String pcUrl, String mobileUrl, String status) { private void sendToFeiShuTodo(SimpleEmployee user, String dataId, String pcUrl, String mobileUrl, String status) {
Map<String, Object> userMap = esb2FeishuOpenIdUtil.queryFeishuOpenIdByMobiles(user.getMobile()); Map<String, Object> userMap = esb2FeishuOpenIdUtil.queryFeishuUnionIdByMobiles(user.getMobile());
String operator_open_id = String.valueOf(userMap.get(user.getMobile())); String operator_open_id = String.valueOf(userMap.get(user.getMobile()));
String token = (String) baseCache.get(Constant.MODULE_KEY, Constant.FEI_SHU_TOKEN_KEY); String token = (String) baseCache.get(Constant.MODULE_KEY, Constant.FEI_SHU_TOKEN_KEY);

View File

@ -125,11 +125,11 @@ public class SendKqMindAction implements EsbServerlessRpcRemoteInterface {
token = esb2FeishuTokenUtil.getToken(); token = esb2FeishuTokenUtil.getToken();
baseCache.set(Constant.MODULE_KEY, Constant.FEI_SHU_TOKEN_KEY, token, 6000); baseCache.set(Constant.MODULE_KEY, Constant.FEI_SHU_TOKEN_KEY, token, 6000);
} }
Map<String, Object> userMap = esb2FeishuOpenIdUtil.queryFeishuOpenIdByMobiles(operatorMobile); Map<String, Object> userMap = esb2FeishuOpenIdUtil.queryFeishuUnionIdByMobiles(operatorMobile);
String operator_open_id = String.valueOf(userMap.get(operatorMobile)); String operator_open_id = String.valueOf(userMap.get(operatorMobile));
long currentTimeStamp = System.currentTimeMillis(); long currentTimeStamp = System.currentTimeMillis();
//接收人openid //接收人openid
Map<String, Object> receiverMap = esb2FeishuOpenIdUtil.queryFeishuOpenIdByMobiles(receiver.getMobile()); Map<String, Object> receiverMap = esb2FeishuOpenIdUtil.queryFeishuUnionIdByMobiles(receiver.getMobile());
String receiver_open_id = String.valueOf(receiverMap.get(receiver.getMobile())); String receiver_open_id = String.valueOf(receiverMap.get(receiver.getMobile()));
String status = "PENDING"; String status = "PENDING";
@ -212,7 +212,7 @@ public class SendKqMindAction implements EsbServerlessRpcRemoteInterface {
} }
private void sendToFeiShuBotTodo(String operatorMobile, String dataId, String text, String title, String content, String pcUrl, String mobileUrl, SimpleEmployee receiver) { private void sendToFeiShuBotTodo(String operatorMobile, String dataId, String text, String title, String content, String pcUrl, String mobileUrl, SimpleEmployee receiver) {
Map<String, Object> userMap = esb2FeishuOpenIdUtil.queryFeishuOpenIdByMobiles(operatorMobile); Map<String, Object> userMap = esb2FeishuOpenIdUtil.queryFeishuUnionIdByMobiles(operatorMobile);
String operator_open_id = String.valueOf(userMap.get(operatorMobile)); String operator_open_id = String.valueOf(userMap.get(operatorMobile));
String token = (String) baseCache.get(Constant.MODULE_KEY, Constant.FEI_SHU_TOKEN_KEY); String token = (String) baseCache.get(Constant.MODULE_KEY, Constant.FEI_SHU_TOKEN_KEY);
@ -222,7 +222,7 @@ public class SendKqMindAction implements EsbServerlessRpcRemoteInterface {
} }
long currentTimeStamp = System.currentTimeMillis(); long currentTimeStamp = System.currentTimeMillis();
//接收人openid //接收人openid
Map<String, Object> receiverMap = esb2FeishuOpenIdUtil.queryFeishuOpenIdByMobiles(receiver.getMobile()); Map<String, Object> receiverMap = esb2FeishuOpenIdUtil.queryFeishuUnionIdByMobiles(receiver.getMobile());
String receiver_open_id = String.valueOf(receiverMap.get(receiver.getMobile())); String receiver_open_id = String.valueOf(receiverMap.get(receiver.getMobile()));

View File

@ -72,7 +72,7 @@ public class UrgingAction implements EsbServerlessRpcRemoteInterface {
private void sendUnOperatedToBotMsg(String unOperateUrl, String requestId, String requestName, String creatorId, String operator, ObjectMapper mapper) throws JsonProcessingException { private void sendUnOperatedToBotMsg(String unOperateUrl, String requestId, String requestName, String creatorId, String operator, ObjectMapper mapper) throws JsonProcessingException {
//流程创建人飞书openid //流程创建人飞书openid
SimpleEmployee creatorEmployee = hrmCommonUtil.getSimpleEmployee(Long.valueOf(creatorId)); SimpleEmployee creatorEmployee = hrmCommonUtil.getSimpleEmployee(Long.valueOf(creatorId));
Map<String, Object> creatorMap = esb2FeishuOpenIdUtil.queryFeishuOpenIdByMobiles(creatorEmployee.getMobile()); Map<String, Object> creatorMap = esb2FeishuOpenIdUtil.queryFeishuUnionIdByMobiles(creatorEmployee.getMobile());
String create_open_id = String.valueOf(creatorMap.get(creatorEmployee.getMobile())); String create_open_id = String.valueOf(creatorMap.get(creatorEmployee.getMobile()));
String papiCode = PapiUtil.getPapiCode(ApplicationConfigConstant.APP_URL, ApplicationConfigConstant.CORP_ID, "A1a"); String papiCode = PapiUtil.getPapiCode(ApplicationConfigConstant.APP_URL, ApplicationConfigConstant.CORP_ID, "A1a");
@ -91,7 +91,7 @@ public class UrgingAction implements EsbServerlessRpcRemoteInterface {
operatorUsers.forEach(user -> { operatorUsers.forEach(user -> {
//流程未操作人飞书openid //流程未操作人飞书openid
SimpleEmployee unOperator = hrmCommonUtil.getSimpleEmployee(Long.valueOf(user.getUserId())); SimpleEmployee unOperator = hrmCommonUtil.getSimpleEmployee(Long.valueOf(user.getUserId()));
Map<String, Object> unMap = esb2FeishuOpenIdUtil.queryFeishuOpenIdByMobiles(unOperator.getMobile()); Map<String, Object> unMap = esb2FeishuOpenIdUtil.queryFeishuUnionIdByMobiles(unOperator.getMobile());
String unOperator_open_id = String.valueOf(unMap.get(unOperator.getMobile())); String unOperator_open_id = String.valueOf(unMap.get(unOperator.getMobile()));
String mobileurl = "/mobile/workflow/flowpage/view/" + requestId; String mobileurl = "/mobile/workflow/flowpage/view/" + requestId;
String pcurl = "/sp/workflow/flowpage/view/" + requestId; String pcurl = "/sp/workflow/flowpage/view/" + requestId;

View File

@ -0,0 +1,58 @@
package com.weaver.seconddev.chapanda.entity.dto;
import com.weaver.common.component.search.item.WeaSearchConditionItemType;
import com.weaver.seconddev.chapanda.annotation.SearchCondition;
import com.weaver.seconddev.chapanda.annotation.SearchConditionItem;
import com.weaver.seconddev.chapanda.constant.Constant;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class DemoSearchConditionDTO {
@SearchCondition(
label = "创建人",
labelId = 0,
needQuickSearch = true,
quickSearchKey = "username",
items = {
@SearchConditionItem(itemType = WeaSearchConditionItemType.INPUT, name = "username"),
}
)
private String username;
@SearchCondition(
label = "部门",
labelId = 0,
needQuickSearch = true,
items = {
@SearchConditionItem(itemType = WeaSearchConditionItemType.BROWSER,
browserType = "department", browserMultiple = true, name = "department"),
}
)
private String department;
@SearchCondition(
label = "工单类型",
labelId = 0,
items = @SearchConditionItem(itemType = WeaSearchConditionItemType.BROWSER,
browserType = "orderTypeBrowser", name = "orderType", browserModule = Constant.MODULE)
)
private String orderType;
@SearchCondition(
label = "创建日期",
labelId = 0,
items = {
@SearchConditionItem(itemType = WeaSearchConditionItemType.DATEPICKER, name = "createTime"),
}
)
private String createTime;
}