fix(项目设置): 修复操作日志,操作对象显示的不对的缺陷

--bug=1013010 --user=王孝刚 【工作空间】操作日志,操作对象显示的不对
https://www.tapd.cn/55049933/s/1153405
This commit is contained in:
wxg0103 2022-05-06 14:05:46 +08:00 committed by 刘瑞斌
parent e6390e706e
commit 978abd61cf
3 changed files with 14 additions and 14 deletions

View File

@ -245,7 +245,7 @@ public class ApiAutomationController {
@PostMapping("/batch/copy")
@RequiresPermissions(value = {PermissionConstants.PROJECT_API_SCENARIO_READ_CREATE, PermissionConstants.PROJECT_API_SCENARIO_READ_COPY}, logical = Logical.OR)
@MsAuditLog(module = "api_automation", type = OperLogConstants.BATCH_ADD, beforeEvent = "#msClass.getLogDetails(#request.ids)", content = "#msClass.getLogDetails(#request.ids)", msClass = ApiAutomationService.class)
@MsAuditLog(module = OperLogModule.API_AUTOMATION, type = OperLogConstants.BATCH_ADD, beforeEvent = "#msClass.getLogDetails(#request.ids)", content = "#msClass.getLogDetails(#request.ids)", msClass = ApiAutomationService.class)
public void batchCopy(@RequestBody ApiScenarioBatchRequest request) {
apiAutomationService.batchCopy(request);
}

View File

@ -29,13 +29,13 @@ public class ApiScenarioModuleController {
}
@PostMapping("/add")
@MsAuditLog(module = "api_automation", type = OperLogConstants.CREATE, title = "#node.name", content = "#msClass.getLogDetails(#node)", msClass = ApiScenarioModuleService.class)
@MsAuditLog(module = OperLogModule.API_AUTOMATION, type = OperLogConstants.CREATE, title = "#node.name", content = "#msClass.getLogDetails(#node)", msClass = ApiScenarioModuleService.class)
public String addNode(@RequestBody ApiScenarioModule node) {
return apiScenarioModuleService.addNode(node);
}
@PostMapping("/edit")
@MsAuditLog(module = "api_automation", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#node)", title = "#node.name", content = "#msClass.getLogDetails(#node)", msClass = ApiScenarioModuleService.class)
@MsAuditLog(module = OperLogModule.API_AUTOMATION, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#node)", title = "#node.name", content = "#msClass.getLogDetails(#node)", msClass = ApiScenarioModuleService.class)
public int editNode(@RequestBody DragApiScenarioModuleRequest node) {
return apiScenarioModuleService.editNode(node);
}

View File

@ -4,18 +4,18 @@
<select id="list" resultType="io.metersphere.log.vo.OperatingLogDTO">
SELECT
t.id,
t.project_id,
t.oper_user,
t3.source_id,
t.oper_type,
t.oper_module,
t.oper_title,
t.oper_time,
t1.NAME userName,
t2.`name` projectName
t.id,
t.project_id,
t.oper_user,
t3.source_id,
t.oper_type,
upper (t.oper_module) oper_module ,
t.oper_title,
t.oper_time,
t1.NAME userName,
t2.`name` projectName
FROM
operating_log t
operating_log t
LEFT JOIN `user` t1 ON t.oper_user = t1.id
LEFT JOIN project t2 ON t.project_id = t2.id
LEFT JOIN workspace w on t2.workspace_id = w.id