fix(操作日志): 优化用例模版操作日志 #1005226

--bug=1005226 --user=赵勇 【操作日志】-用户创建... https://www.tapd.cn/55049933/s/1025937
This commit is contained in:
fit2-zhao 2021-07-19 18:50:59 +08:00 committed by fit2-zhao
parent 4dcda56f33
commit 6a7055e9cd
1 changed files with 5 additions and 0 deletions

View File

@ -205,6 +205,11 @@ public class TestCaseTemplateService extends TemplateBaseService {
TestCaseTemplateWithBLOBs templateWithBLOBs = testCaseTemplateMapper.selectByPrimaryKey(id);
if (templateWithBLOBs != null) {
List<DetailColumn> columns = ReflexObjectUtil.getColumns(templateWithBLOBs, SystemReference.caseFieldColumns);
columns.forEach(item ->{
if(item.getColumnName().equals("steps") && item.getOriginalValue().toString().equals("[{\"num\":1,\"desc\":\"\",\"result\":\"\"}]")){
item.setOriginalValue("");
}
});
OperatingLogDetails details = new OperatingLogDetails(JSON.toJSONString(templateWithBLOBs.getId()), null, templateWithBLOBs.getName(), templateWithBLOBs.getCreateUser(), columns);
return JSON.toJSONString(details);
}