bug:政策资料修改

This commit is contained in:
wxyclub
2023-10-26 18:04:08 +08:00
parent 53241dd7bd
commit 5ef7dff78c
@@ -69,8 +69,7 @@ public class SarLawsInformationServiceImpl extends ServiceImpl<SarLawsInformatio
// 查询是否被收藏
LambdaQueryWrapper<TsPersonCollect> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(TsPersonCollect::getCollectResId, sarLawsInformation.getId());
wrapper.eq(TsPersonCollect::getValidFlag, 0);
List<TsPersonCollect> list = collectEOService.list();
List<TsPersonCollect> list = collectEOService.list(wrapper);
if (list.size() > 0) {
sarLawsInformation.setCollectId(list.get(0).getId());
}
@@ -213,7 +212,7 @@ public class SarLawsInformationServiceImpl extends ServiceImpl<SarLawsInformatio
String fieldName = field.getName().substring(0, 1).toUpperCase() + field.getName().substring(1);
Method method = SarLawsInformation.class.getMethod("get" + fieldName + "Name");
Object oldTypeName = method.invoke(oldInfo);
changes.add("\"" + field.getName() + "\"由\"" + oldTypeName + "\"\"改为\"\"" + String.join(",",typeNameList) + "\"");
changes.add("\"" + field.getName() + "\"由\"" + oldTypeName + "\"改为\"" + String.join(",",typeNameList) + "\"");
} else if ("informationFile".equals(field.getName())) {
List<String> fileNameList = new ArrayList<>();
if (StringUtils.isNotBlank(newValue)) {
@@ -227,10 +226,10 @@ public class SarLawsInformationServiceImpl extends ServiceImpl<SarLawsInformatio
String fieldName = field.getName().substring(0, 1).toUpperCase() + field.getName().substring(1);
Method method = SarLawsInformation.class.getMethod("get" + fieldName + "Name");
Object oldTypeName = method.invoke(oldInfo);
changes.add(field.getName() + "由\"" + oldTypeName + "\"\"改为\"\"" + String.join(",",fileNameList) + "\"");
changes.add(field.getName() + "由\"" + oldTypeName + "\"改为\"" + String.join(",",fileNameList) + "\"");
}
else {
changes.add("\"" + field.getName() + "\"由\"" + oldValue + "\"\"改为\"\"" + newValue + "\"");
changes.add("\"" + field.getName() + "\"由\"" + oldValue + "\"改为\"" + newValue + "\"");
}
}
} catch (IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {