一键催办使用线程发送

This commit is contained in:
wulin 2020-12-17 14:42:57 +08:00
parent caa3c109d8
commit f8ff21cf14

View File

@ -985,6 +985,24 @@ public class DingtalkBusiness {
} }
public void urging(List<FlowRecord> flowRecords, Map<Long, StaffEntity> mapStaffs, Map<Long, ResultRecord> mapReords) { public void urging(List<FlowRecord> flowRecords, Map<Long, StaffEntity> mapStaffs, Map<Long, ResultRecord> mapReords) {
ThreadSendUrgingMessage threadSendUrgingMessage = new ThreadSendUrgingMessage(flowRecords, mapReords, mapStaffs);
Thread thread = new Thread(threadSendUrgingMessage);
thread.start();
}
public class ThreadSendUrgingMessage implements Runnable{
List<FlowRecord> flowRecords;
Map<Long, ResultRecord> mapReords;
Map<Long, StaffEntity> mapStaffs;
public ThreadSendUrgingMessage(List<FlowRecord> flowRecords, Map<Long, ResultRecord> mapReords, Map<Long, StaffEntity> mapStaffs){
this.flowRecords = flowRecords;
this.mapReords = mapReords;
this.mapStaffs = mapStaffs;
}
@Override
public void run() {
logger.info("批量催办"); logger.info("批量催办");
ThirdAppConfig thirdAppConfig = thirdAppConfigService.getByAppId(appid); ThirdAppConfig thirdAppConfig = thirdAppConfigService.getByAppId(appid);
String token = dingTalkUtil.getAccessTokenWitchEntity(thirdAppConfig); String token = dingTalkUtil.getAccessTokenWitchEntity(thirdAppConfig);
@ -1027,7 +1045,7 @@ public class DingtalkBusiness {
logger.info("token无效"); ; logger.info("token无效"); ;
} }
} }
}
public class ThreadSendMessage implements Runnable{ public class ThreadSendMessage implements Runnable{
List<StaffSimpleInfo> toStaffids; List<StaffSimpleInfo> toStaffids;