From f7e75f88ad9a9cb290c3224b0a73bd2d9b23b6f8 Mon Sep 17 00:00:00 2001 From: wulin Date: Wed, 11 Nov 2020 14:47:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../job/business/DingtalkBusiness.java | 22 +------------------ 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/src/main/java/com/lz/modules/job/business/DingtalkBusiness.java b/src/main/java/com/lz/modules/job/business/DingtalkBusiness.java index 73be5359..029e6e0b 100644 --- a/src/main/java/com/lz/modules/job/business/DingtalkBusiness.java +++ b/src/main/java/com/lz/modules/job/business/DingtalkBusiness.java @@ -222,28 +222,8 @@ public class DingtalkBusiness { public String sendWorkMSGWithAsyn(List toStaffids, int type) { - if(toStaffids.get(0).getEmployeeId() == null || toStaffids.get(0).getEmployeeId().length() == 0){ - //查询第三方id - List ids = toStaffids.stream().map(new Function() { - @Override - public Long apply(StaffSimpleInfo staffSimpleInfo) { - return staffSimpleInfo.getId(); - } - }).collect(Collectors.toList()); - List staffSimpleInfos = staffService.selectStaffSimpleInfos(ids); - Map map = toStaffids.stream().collect(Collectors.toMap(StaffSimpleInfo::getId, e->e)); - for (StaffSimpleInfo staff:staffSimpleInfos - ) { - StaffSimpleInfo staff1 = map.get(staff.getId()); - staff1.setEmployeeId(staff1.getEmployeeId()); - } - } - WorkMsgTypeEnum workMsgTypeEnum = WorkMsgTypeEnum.findRoleTypeByCode(type); + return sendWorkMSGWithAsyn(null, toStaffids, type); - ThreadSendMessage threadSendMessage = new ThreadSendMessage(null, toStaffids, workMsgTypeEnum, appid); - Thread thread = new Thread(threadSendMessage); - thread.start(); - return "OK"; } public String sendWorkMSGByEntity(String appid, StaffEntity fromStaffEntity, StaffEntity toStaffEntity,