refactor(任务中心): 优化停止任务的日志记录

This commit is contained in:
wxg0103 2024-06-24 15:27:18 +08:00 committed by wxg0103
parent 08aad6f490
commit 415c6ae553
7 changed files with 16 additions and 5 deletions

View File

@ -350,12 +350,12 @@ public class ApiTaskCenterService {
LogDTO dto = LogDTOBuilder.builder()
.projectId(reportDTO.getProjectId())
.organizationId(orgMap.get(reportDTO.getProjectId()))
.type(OperationLogType.UPDATE.name())
.type(OperationLogType.STOP.name())
.module(module)
.method(OperationLogAspect.getMethod())
.path(OperationLogAspect.getPath())
.sourceId(reportDTO.getId())
.content(String.format("停止任务:%s", reportDTO.getName()))
.content(reportDTO.getName())
.createUser(userId)
.build().getLogDTO();
logs.add(dto);

View File

@ -19,7 +19,8 @@ public enum OperationLogType {
DISASSOCIATE,
ASSOCIATE,
QRCODE,
ARCHIVED;
ARCHIVED,
STOP;
public boolean contains(OperationLogType keyword) {
return this.name().contains(keyword.name());

View File

@ -350,12 +350,12 @@ public class TestPlanTaskCenterService {
LogDTO dto = LogDTOBuilder.builder()
.projectId(reportDTO.getProjectId())
.organizationId(orgMap.get(reportDTO.getProjectId()))
.type(OperationLogType.UPDATE.name())
.type(OperationLogType.STOP.name())
.module(module)
.method(OperationLogAspect.getMethod())
.path(OperationLogAspect.getPath())
.sourceId(reportDTO.getId())
.content(String.format("停止任务:%s", reportDTO.getName()))
.content(reportDTO.getName())
.createUser(userId)
.build().getLogDTO();
logs.add(dto);

View File

@ -84,4 +84,8 @@ export const operationTypeOptions = [
label: 'system.log.operateType.archived',
value: 'ARCHIVED',
},
{
label: 'system.log.operateType.stop',
value: 'STOP',
},
];

View File

@ -455,6 +455,10 @@
label: 'system.log.operateType.archived',
value: 'ARCHIVED',
},
{
label: 'system.log.operateType.stop',
value: 'STOP',
},
];
function resetFilter() {

View File

@ -35,4 +35,5 @@ export default {
'system.log.log': 'Operation log',
'system.log.time': 'Operation time',
'system.log.content': 'in {module} under {range}',
'system.log.operateType.stop': 'Stop',
};

View File

@ -35,4 +35,5 @@ export default {
'system.log.log': '操作日志',
'system.log.time': '操作时间',
'system.log.content': '{operator} 在 {range} 下的 {module} 中 ',
'system.log.operateType.stop': '停止',
};