开发OTA备案工具-导入导出

This commit is contained in:
高嵩
2023-03-27 11:40:16 +08:00
parent d57248b15b
commit dc92697f3e
@@ -38,7 +38,7 @@ public class ComparisonUtil<T> {
String newStr = parseDictText(ote, field, newClazz, sysDictService);
String oldStr = parseDictText(ote, field, oldClazz, sysDictService);
if (!newStr.equals(oldStr)) {
String content = "" + title + "" + oldStr + "改为" + newStr;
String content = "" + title + "'" + oldStr + "'改为'" + newStr + "'";
resList.add(new OtaBaCxTxjl(otaId, otaModuleEnum.getName(), content));
}
}
@@ -56,7 +56,7 @@ public class ComparisonUtil<T> {
if (ObjectUtils.isEmpty(id)) {
Field tableField = newObj.getClass().getDeclaredField(tableTitle);
tableField.setAccessible(true);
String content = "新增了一条" + tableField.get(newObj).toString();
String content = "新增了一条'" + tableField.get(newObj).toString() + "'";
resList.add(new OtaBaCxTxjl(otaId, otaModuleEnum.getName(), content));
Field[] fields = newObj.getClass().getDeclaredFields();
for (Field field : fields) {
@@ -68,12 +68,12 @@ public class ComparisonUtil<T> {
title = ote.getValue();
field.setAccessible(true);
Object newVal = field.get(newObj);
String newStr = "";
String newStr = "";
if (ObjectUtils.isNotEmpty(newVal)) {
newStr = newVal.toString();
content = tableField.get(newObj).toString() + "-" + title + "由'空'改为'" + newStr + "'";
resList.add(new OtaBaCxTxjl(otaId, otaModuleEnum.getName(), content));
}
content = "增加" + tableField.get(newObj).toString() + "" + title + "" + newStr;
resList.add(new OtaBaCxTxjl(otaId, otaModuleEnum.getName(), content));
}
} else {
for (T oldObj : oldList) {
@@ -105,7 +105,7 @@ public class ComparisonUtil<T> {
if (ObjectUtils.isNotEmpty(tableTitleObj)) {
tableTitleObjStr = tableTitleObj.toString();
}
String content = "删除了" + tableTitleObjStr;
String content = "删除了'" + tableTitleObjStr + "'";
resList.add(new OtaBaCxTxjl(otaId, otaModuleEnum.getName(), content));
}
}
@@ -143,7 +143,7 @@ public class ComparisonUtil<T> {
newTitleStr = newTitleVal.toString();
}
}
String content = newTitleStr + "" + title + "" + oldStr + "改为" + newStr;
String content = newTitleStr + "-" + title + "'" + oldStr + "'改为'" + newStr + "'";
resList.add(new OtaBaCxTxjl(otaId, otaModuleEnum.getName(), content));
}
} catch (IllegalAccessException | NoSuchFieldException e) {