fix 修复date_id长度问题

master
管理员 11 months ago
parent a82b2dbc79
commit a40fb073c0

@ -531,7 +531,7 @@ public class MongoUtil {
ReflectUtil.setFieldValue(entity, f, IdUtils.nextId(entity.getClass()).intValue());
} else if (f.getType() == Long.class) {
if (type == FillIdType.date_id) {
ReflectUtil.setFieldValue(entity, f, IdUtils.nextDateIdLong(entity.getClass(), 18));
ReflectUtil.setFieldValue(entity, f, IdUtils.nextDateIdLong(entity.getClass(), 17));
} else {
if (!IdUtils.nextIdInit(entity.getClass())) {
IdUtils.nextIdInit(entity.getClass(), findMaxId(entity.getClass()));
@ -540,7 +540,7 @@ public class MongoUtil {
}
} else if (f.getType() == String.class) {
if (type == FillIdType.date_id) {
ReflectUtil.setFieldValue(entity, f, IdUtils.nextDateId(entity.getClass(), 18));
ReflectUtil.setFieldValue(entity, f, IdUtils.nextDateId(entity.getClass(), 17));
} else {
ReflectUtil.setFieldValue(entity, f, UUID.fastUUID().toString(true));
}

Loading…
Cancel
Save