fix: 修复新增序列id重复问题

This commit is contained in:
lhc
2026-02-27 16:00:54 +08:00
parent 7173f56f0f
commit 55573b761f

View File

@@ -896,7 +896,7 @@ public class BaseMapperImpl implements BaseMapper {
if (map == null) {
tableMapper.createHighGoSequence(tableName.toLowerCase(), 1);
} else {
tableMapper.createHighGoSequence(tableName.toLowerCase(), map.get(pkName));
tableMapper.createHighGoSequence(tableName.toLowerCase(), Long.parseLong(String.valueOf(map.get(pkName))) + 1);
}
}
id = tableMapper.getHighGoSequence(tableName.toLowerCase());
@@ -914,7 +914,7 @@ public class BaseMapperImpl implements BaseMapper {
if (map == null) {
tableMapper.createSequence(tableName, 1);
} else {
tableMapper.createSequence(tableName, map.get(pkName));
tableMapper.createSequence(tableName, Long.parseLong(String.valueOf(map.get(pkName))) + 1);
}
id = tableMapper.getSequence(tableName);
}