bug: 政策课题修改记录代码修改
This commit is contained in:
@@ -117,7 +117,7 @@ public class SarLawsTopic implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 课题组研究方案
|
* 课题组研究方案
|
||||||
*/
|
*/
|
||||||
@CompareField(fieldName = "researchPlan")
|
@CompareField(fieldName = "课题研究方案")
|
||||||
@ApiModelProperty(value = "课题研究方案")
|
@ApiModelProperty(value = "课题研究方案")
|
||||||
@TableField(value = "RESEARCH_PLAN")
|
@TableField(value = "RESEARCH_PLAN")
|
||||||
private String researchPlan;
|
private String researchPlan;
|
||||||
|
|||||||
+12
-2
@@ -557,7 +557,17 @@ public class SarLawsTopicServiceImpl extends ServiceImpl<SarLawsTopicMapper, Sar
|
|||||||
}
|
}
|
||||||
// 获取字段名称
|
// 获取字段名称
|
||||||
CompareField annotationsByType = field.getAnnotationsByType(CompareField.class)[0];
|
CompareField annotationsByType = field.getAnnotationsByType(CompareField.class)[0];
|
||||||
changes.add(annotationsByType.fieldName() + "由\"" + String.join(",",oldFileNameList) + "\"改为\"" + String.join(",",fileNameList) + "\"");
|
if (StringUtils.isBlank(String.join(",",oldFileNameList))) {
|
||||||
|
oldValue = "空";
|
||||||
|
}else {
|
||||||
|
oldValue = String.join(",",oldFileNameList);
|
||||||
|
}
|
||||||
|
if (StringUtils.isBlank(String.join(",",fileNameList))) {
|
||||||
|
newValue = "空";
|
||||||
|
}else {
|
||||||
|
newValue = String.join(",",fileNameList);
|
||||||
|
}
|
||||||
|
changes.add(annotationsByType.fieldName() + "由\"" + oldValue + "\"改为\"" + newValue + "\"");
|
||||||
// 对比列表字段
|
// 对比列表字段
|
||||||
} else if ("meetingList".equals(field.getName())|| "topicContactInformationList".equals(field.getName()) || "insideContactInformationList".equals(field.getName())) {
|
} else if ("meetingList".equals(field.getName())|| "topicContactInformationList".equals(field.getName()) || "insideContactInformationList".equals(field.getName())) {
|
||||||
String fieldName = field.getName().substring(0, 1).toUpperCase() + field.getName().substring(1);
|
String fieldName = field.getName().substring(0, 1).toUpperCase() + field.getName().substring(1);
|
||||||
@@ -573,7 +583,7 @@ public class SarLawsTopicServiceImpl extends ServiceImpl<SarLawsTopicMapper, Sar
|
|||||||
} else {
|
} else {
|
||||||
// 对比其他字段
|
// 对比其他字段
|
||||||
CompareField annotationsByType = field.getAnnotationsByType(CompareField.class)[0];
|
CompareField annotationsByType = field.getAnnotationsByType(CompareField.class)[0];
|
||||||
changes.add(annotationsByType.fieldName() + "由\"" + oldValue + "\"改为\"" + newValue + "\"");
|
changes.add(annotationsByType.fieldName() + "由\"" + Optional.ofNullable(oldValue).orElse("空") + "\"改为\"" + Optional.ofNullable(newValue).orElse("空") + "\"");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
|
} catch (IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user