--修改datatools工具类bug

This commit is contained in:
2025-10-22 16:49:03 +08:00
parent e1eb5018ff
commit 37331a465d
6 changed files with 9 additions and 51 deletions

View File

@ -317,7 +317,7 @@ public class DataLogTools {
T old = BeanUtils.newInstance(klazz);
BeanUtil.copyProperties(entity,old,true);
List<DataChangeLog> logs = CollectionUtils.newArrayList();
tabInfo.setFieldValue(entity,"valid",YesOrNoEnum.YES.getTextCode());
BeanUtils.setFieldValue("valid", YesOrNoEnum.YES.getTextCode(), entity);
mapper.updateById(entity);
T dto = (T)tabInfo.toDto(entity);
DataChangeLog datalog = createLog(klazz,OperationType.UPDATE);
@ -343,7 +343,7 @@ public class DataLogTools {
T old = BeanUtils.newInstance(klazz);
BeanUtil.copyProperties(entity,old,true);
List<DataChangeLog> logs = CollectionUtils.newArrayList();
tabInfo.setFieldValue(entity,"valid",YesOrNoEnum.NO.getTextCode());
BeanUtils.setFieldValue("valid",YesOrNoEnum.NO.getTextCode(), entity);
mapper.updateById(entity);
T dto = (T)tabInfo.toDto(entity);
DataChangeLog datalog = createLog(klazz,OperationType.UPDATE);