JavaScript: Number.MAX_SAFE_INTEGER ~ Number.MIN_SAFE_INTEGER

This commit is contained in:
TommyLemon 2024-05-19 23:29:02 +08:00 committed by GitHub
parent aab39ff28d
commit 75902360ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1081,7 +1081,7 @@ public abstract class AbstractSQLExecutor<T extends Object> implements SQLExecut
// return value.toString();
// }
// JavaScript: Number.MAX_SAFE_INTEGER ~ Number.MIN_SAFE_INTEGER
if (v > 9007199254740991L || v < -9007199254740991) { // 避免前端/客户端拿到精度丢失甚至严重失真的值
if (v > 9007199254740991L || v < -9007199254740991L) { // 避免前端/客户端拿到精度丢失甚至严重失真的值
return value.toString();
}