提交修改
This commit is contained in:
commit
d7b92e5e3b
@ -230,28 +230,8 @@ public class DingtalkBusiness {
|
||||
|
||||
public String sendWorkMSGWithAsyn(List<StaffSimpleInfo> toStaffids, int type) {
|
||||
|
||||
if(toStaffids.get(0).getEmployeeId() == null || toStaffids.get(0).getEmployeeId().length() == 0){
|
||||
//查询第三方id
|
||||
List<Long> ids = toStaffids.stream().map(new Function<StaffSimpleInfo, Long>() {
|
||||
@Override
|
||||
public Long apply(StaffSimpleInfo staffSimpleInfo) {
|
||||
return staffSimpleInfo.getId();
|
||||
}
|
||||
}).collect(Collectors.toList());
|
||||
List<StaffSimpleInfo> staffSimpleInfos = staffService.selectStaffSimpleInfos(ids);
|
||||
Map<Long, StaffSimpleInfo> 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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user