Skip to content

Commit

Permalink
refactor: 优化列式存储策略数字类型转换逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
zhou-hao committed Nov 6, 2024
1 parent b5944c6 commit d2772e8
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ protected Object convertPropertyValue(Object value, PropertyMetadata metadata) {
return value instanceof String ? String.valueOf(value) : ObjectMappers.toJsonString(value);
}
//数字类型直接返回
if (metadata.getValueType() instanceof NumberType && value instanceof Number) {
return convertNumberValue(((NumberType<?>) metadata.getValueType()), ((Number) value));
if (metadata.getValueType() instanceof NumberType) {
NumberType<?> type = ((NumberType<?>) metadata.getValueType());
return convertNumberValue(type, type.convertOriginalNumber(value));
}
if (metadata.getValueType() instanceof Converter) {
return ((Converter<?>) metadata.getValueType()).convert(value);
Expand Down

0 comments on commit d2772e8

Please sign in to comment.