diff --git a/framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js b/framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js index fcf0a40ecd..2defafb982 100644 --- a/framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js +++ b/framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js @@ -2423,6 +2423,7 @@ const message = { organization_member: "组织-成员", organization_workspace: "组织-工作空间", workspace_service_integration: "工作空间-服务集成", + project_message_settings: "项目-消息设置", project_settings: "项目-消息设置", workspace_member: "工作空间-成员", project_template_settings_field: "项目-模版设置-自定义字段", diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/controller/NoticeController.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/controller/NoticeController.java index 9dbecfb157..3392b85fee 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/controller/NoticeController.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/controller/NoticeController.java @@ -35,7 +35,7 @@ public class NoticeController { } @GetMapping("/delete/message/{identification}") - @MsAuditLog(module = OperLogModule.WORKSPACE_MESSAGE_SETTINGS, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#identification)", msClass = NoticeService.class) + @MsAuditLog(module = OperLogModule.WORKSPACE_MESSAGE_SETTINGS, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getDelLogDetails(#identification)", msClass = NoticeService.class) public int deleteMessage(@PathVariable String identification) { return noticeService.delMessage(identification); } diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/service/NoticeService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/service/NoticeService.java index 0b531de6a1..0325a9160d 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/service/NoticeService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/notice/service/NoticeService.java @@ -189,8 +189,24 @@ public class NoticeService { } } List columns = ReflexObjectUtil.getColumns(task, SystemReference.messageColumns); - OperatingLogDetails details = new OperatingLogDetails(JSON.toJSONString(task.getId()), null, + OperatingLogDetails details = new OperatingLogDetails(JSON.toJSONString(task.getId()), task.getProjectId(), StatusReference.statusMap.containsKey(task.getTaskType()) ? StatusReference.statusMap.get(task.getTaskType()) : task.getTaskType(), null, columns); return JSON.toJSONString(details); } + + public String getDelLogDetails(String identification) { + MessageTaskExample example = new MessageTaskExample(); + example.createCriteria().andIdentificationEqualTo(identification); + List tasks = messageTaskMapper.selectByExample(example); + if (CollectionUtils.isNotEmpty(tasks)) { + MessageTask messageTask = tasks.get(0); + OperatingLogDetails details = new OperatingLogDetails(JSON.toJSONString(messageTask.getId()), + messageTask.getProjectId(), + StatusReference.statusMap.containsKey(messageTask.getTaskType()) ? StatusReference.statusMap.get(messageTask.getTaskType()) : messageTask.getTaskType(), + null, + new LinkedList<>()); + return JSON.toJSONString(details); + } + return null; + } }