mirror of
https://github.com/getrebuild/rebuild.git
synced 2024-09-20 07:25:54 +08:00
hotfix: ALWAYS_PARSE_INTEGRAL_NUMBER_INTO_DECIMAL
This commit is contained in:
parent
d35dd2c7b8
commit
2ab6fd9b73
|
@ -47,6 +47,7 @@ import org.apache.commons.collections4.CollectionUtils;
|
|||
import org.apache.commons.lang.BooleanUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
@ -456,7 +457,7 @@ public class FieldWriteback extends FieldAggregation {
|
|||
// 数字字段置 `0`
|
||||
if (varField != null
|
||||
&& (varField.getType() == FieldType.LONG || varField.getType() == FieldType.DECIMAL)) {
|
||||
value = 0;
|
||||
value = 0L;
|
||||
} else if (fieldVarsN2NPath.contains(fieldName)
|
||||
|| (isN2NField != null && isN2NField.getType() == FieldType.REFERENCE_LIST)) {
|
||||
// Keep NULL
|
||||
|
@ -477,6 +478,10 @@ public class FieldWriteback extends FieldAggregation {
|
|||
value = value.toString();
|
||||
}
|
||||
|
||||
// v3.6.3 强制使用 BigDecimal 高精度
|
||||
if (value instanceof Long) value = BigDecimal.valueOf((Long) value);
|
||||
else if (value instanceof Integer) value = BigDecimal.valueOf((Integer) value);
|
||||
|
||||
envMap.put(fieldName, value);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue