fix(系统设置): 环境操作未记录日志

--bug=1018661 --user=李玉号 【系统设置】操作日志-项目环境的增删改操作没有日志 https://www.tapd.cn/55049933/s/1283760
This commit is contained in:
shiziyuan9527 2022-10-31 16:10:14 +08:00 committed by lyh
parent c7b38077d9
commit 6f3cf8fa61
1 changed files with 2 additions and 0 deletions

View File

@ -68,6 +68,7 @@ public class TestEnvironmentController {
} }
@PostMapping("/add") @PostMapping("/add")
@MsAuditLog(module = OperLogModule.PROJECT_ENVIRONMENT_SETTING, type = OperLogConstants.CREATE, title = "#apiTestEnvironmentWithBLOBs.name", project = "#apiTestEnvironmentWithBLOBs.projectId", msClass = BaseEnvironmentService.class)
public String create(@RequestPart("request") TestEnvironmentDTO apiTestEnvironmentWithBLOBs, @RequestPart(value = "files", required = false) List<MultipartFile> sslFiles, @RequestPart(value = "variablesFiles", required = false) List<MultipartFile> variableFile) { public String create(@RequestPart("request") TestEnvironmentDTO apiTestEnvironmentWithBLOBs, @RequestPart(value = "files", required = false) List<MultipartFile> sslFiles, @RequestPart(value = "variablesFiles", required = false) List<MultipartFile> variableFile) {
checkParams(apiTestEnvironmentWithBLOBs); checkParams(apiTestEnvironmentWithBLOBs);
return baseEnvironmentService.add(apiTestEnvironmentWithBLOBs, sslFiles, variableFile); return baseEnvironmentService.add(apiTestEnvironmentWithBLOBs, sslFiles, variableFile);
@ -114,6 +115,7 @@ public class TestEnvironmentController {
} }
@GetMapping("/delete/{id}") @GetMapping("/delete/{id}")
@MsAuditLog(module = OperLogModule.PROJECT_ENVIRONMENT_SETTING, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = BaseEnvironmentService.class)
public void delete(@PathVariable String id) { public void delete(@PathVariable String id) {
baseEnvironmentService.delete(id); baseEnvironmentService.delete(id);
} }