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