mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-02 12:09:13 +08:00
fix(消息通知): 修复异步发送消息时不能获取session的问题
This commit is contained in:
parent
b2df39b1b5
commit
a76b4970d3
@ -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
Block a user