Commit ec11bb66 authored by tianbo's avatar tianbo

fix(安全问题追踪): 修复更新操作中的创建日期问题

- 在执行更新操作时,将实体的创建日期设置为 null - 这样可以避免在更新记录时错误地修改创建日期字段
parent bdf92760
...@@ -212,6 +212,7 @@ public class SafetyProblemTracingServiceImpl extends BaseService<SafetyProblemTr ...@@ -212,6 +212,7 @@ public class SafetyProblemTracingServiceImpl extends BaseService<SafetyProblemTr
batchSqlSession.insert(sqlStatement(SqlMethod.INSERT_ONE), entity); batchSqlSession.insert(sqlStatement(SqlMethod.INSERT_ONE), entity);
} else { } else {
Map<String, Object> param = Maps.newHashMap(); Map<String, Object> param = Maps.newHashMap();
entity.setCreateDate(null);
param.put(Constants.ENTITY, entity); param.put(Constants.ENTITY, entity);
param.put(Constants.WRAPPER, queryWrapperFunction.apply(entity)); param.put(Constants.WRAPPER, queryWrapperFunction.apply(entity));
batchSqlSession.update(sqlStatement(SqlMethod.UPDATE), param); batchSqlSession.update(sqlStatement(SqlMethod.UPDATE), param);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment