fix(消息通知): 修复异步发送消息时不能获取session的问题
This commit is contained in:
parent
c57c74e99d
commit
e384e17a72
|
@ -174,14 +174,8 @@ public class ApiDefinitionExecResultService {
|
|||
.build();
|
||||
|
||||
String taskType = NoticeConstants.TaskType.API_DEFINITION_TASK;
|
||||
if (SessionUtils.getUser() != null
|
||||
&& StringUtils.equals(SessionUtils.getCurrentProjectId(), apiTestCaseWithBLOBs.getProjectId())
|
||||
&& StringUtils.isNotEmpty(SessionUtils.getCurrentWorkspaceId())) {
|
||||
noticeSendService.send(taskType, noticeModel);
|
||||
} else {
|
||||
Project project = projectMapper.selectByPrimaryKey(apiTestCaseWithBLOBs.getProjectId());
|
||||
noticeSendService.send(project, taskType, noticeModel);
|
||||
}
|
||||
Project project = projectMapper.selectByPrimaryKey(apiTestCaseWithBLOBs.getProjectId());
|
||||
noticeSendService.send(project, taskType, noticeModel);
|
||||
} catch (Exception e) {
|
||||
LogUtil.error("消息发送失败:" + e.getMessage());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue