fix(系统设置): 报告删除日志记录有误

--bug=1037836 --user=宋昌昌 【系统设置】日志-删除接口报告的日志信息操作对象为空 https://www.tapd.cn/55049933/s/1489296
This commit is contained in:
song-cc-rock 2024-04-07 18:42:23 +08:00 committed by Craftsman
parent 41ccb313aa
commit bab7b488aa
1 changed files with 4 additions and 4 deletions

View File

@ -31,7 +31,7 @@ public class ApiScenarioReportLogService {
private ApiScenarioReportMapper apiScenarioReportMapper;
public void deleteLog(String id) {
public LogDTO deleteLog(String id) {
ApiScenarioReport scenarioReport = apiScenarioReportMapper.selectByPrimaryKey(id);
Project project = projectMapper.selectByPrimaryKey(scenarioReport.getProjectId());
LogDTO dto = new LogDTO(
@ -46,10 +46,10 @@ public class ApiScenarioReportLogService {
dto.setPath("/api/report/scenario/delete/" + scenarioReport.getId());
dto.setMethod(HttpMethodConstants.GET.name());
dto.setOriginalValue(JSON.toJSONBytes(scenarioReport));
operationLogService.add(dto);
return dto;
}
public void updateLog(String id) {
public LogDTO updateLog(String id) {
ApiScenarioReport scenarioReport = apiScenarioReportMapper.selectByPrimaryKey(id);
Project project = projectMapper.selectByPrimaryKey(scenarioReport.getProjectId());
LogDTO dto = new LogDTO(
@ -64,7 +64,7 @@ public class ApiScenarioReportLogService {
dto.setPath("/api/report/scenario/rename/" + scenarioReport.getId() + "/" + scenarioReport.getName());
dto.setMethod(HttpMethodConstants.GET.name());
dto.setOriginalValue(JSON.toJSONBytes(scenarioReport));
operationLogService.add(dto);
return dto;
}
@Async