mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-01 19:49:10 +08:00
feat(项目设置): 删除及更新缺陷模板未插入操作日志的问题
--bug=1015966 --user=宋昌昌 【项目设置】删除/更新缺陷模版,操作日志没有记录 https://www.tapd.cn/55049933/s/1227059
This commit is contained in:
parent
ee740ad063
commit
740d562b7e
@ -40,13 +40,13 @@ public class IssueTemplateController {
|
||||
}
|
||||
|
||||
@GetMapping("/delete/{id}")
|
||||
@MsAuditLog(module = OperLogModule.WORKSPACE_TEMPLATE_SETTINGS_ISSUE, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = IssueTemplateService.class)
|
||||
@MsAuditLog(module = OperLogModule.PROJECT_TEMPLATE_MANAGEMENT, type = OperLogConstants.DELETE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = IssueTemplateService.class)
|
||||
public void delete(@PathVariable(value = "id") String id) {
|
||||
issueTemplateService.delete(id);
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@MsAuditLog(module = OperLogModule.WORKSPACE_TEMPLATE_SETTINGS_ISSUE, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#request.id,#request.customFields)", content = "#msClass.getLogDetails(#request)", msClass = IssueTemplateService.class)
|
||||
@MsAuditLog(module = OperLogModule.PROJECT_TEMPLATE_MANAGEMENT, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#request.id, #request.customFields)", content = "#msClass.getLogDetails(#request)", msClass = IssueTemplateService.class)
|
||||
public void update(@RequestBody UpdateIssueTemplateRequest request) {
|
||||
issueTemplateService.update(request);
|
||||
}
|
||||
|
@ -510,7 +510,7 @@ public class IssueTemplateService extends TemplateBaseService {
|
||||
}
|
||||
List<DetailColumn> columnIssues = ReflexObjectUtil.getColumns(templateWithBLOBs, SystemReference.issueFieldColumns);
|
||||
columns.addAll(columnIssues);
|
||||
OperatingLogDetails details = new OperatingLogDetails(JSON.toJSONString(templateWithBLOBs.getId()), null, templateWithBLOBs.getName(), templateWithBLOBs.getCreateUser(), columns);
|
||||
OperatingLogDetails details = new OperatingLogDetails(JSON.toJSONString(templateWithBLOBs.getId()), templateWithBLOBs.getProjectId(), templateWithBLOBs.getName(), templateWithBLOBs.getCreateUser(), columns);
|
||||
return JSON.toJSONString(details);
|
||||
}
|
||||
|
||||
@ -535,4 +535,16 @@ public class IssueTemplateService extends TemplateBaseService {
|
||||
OperatingLogDetails details = new OperatingLogDetails(targetProjectId, targetProjectId, targetProjectName, null, null);
|
||||
return JSON.toJSONString(details);
|
||||
}
|
||||
|
||||
public String getLogDetails(String issueTemplateId) {
|
||||
if (StringUtils.isEmpty(issueTemplateId)) {
|
||||
return null;
|
||||
}
|
||||
IssueTemplate issueTemplate = issueTemplateMapper.selectByPrimaryKey(issueTemplateId);
|
||||
if (issueTemplate == null) {
|
||||
return null;
|
||||
}
|
||||
OperatingLogDetails details = new OperatingLogDetails(issueTemplateId, issueTemplate.getProjectId(), issueTemplate.getName(), issueTemplate.getCreateUser(), null);
|
||||
return JSON.toJSONString(details);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user