diff --git a/src/org/redkale/service/RetResult.java b/src/org/redkale/service/RetResult.java index 6ef71b90b..43a681614 100644 --- a/src/org/redkale/service/RetResult.java +++ b/src/org/redkale/service/RetResult.java @@ -129,7 +129,7 @@ public class RetResult { */ public RetResult attach(String key, Object value) { if (this.attach == null) this.attach = new HashMap<>(); - boolean canstr = value != null && (value instanceof CharSequence || value.getClass().isPrimitive()); + boolean canstr = value != null && (value instanceof CharSequence || value instanceof Number || value.getClass().isPrimitive()); this.attach.put(key, value == null ? null : (canstr ? String.valueOf(value) : JsonConvert.root().convertTo(value))); return this; }