疯狂的狮子li
2023-02-04 234f74f8f009a9f164639666d8f3e654f1845b7c
ruoyi-common/ruoyi-common-translation/src/main/java/com/ruoyi/common/translation/core/handler/TranslationHandler.java
@@ -41,10 +41,15 @@
            if (StringUtils.isNotBlank(translation.mapper())) {
                value = ReflectUtils.invokeGetter(gen.getCurrentValue(), translation.mapper());
            }
            // 如果为 null 直接写出
            if (ObjectUtil.isNull(value)) {
                gen.writeNull();
                return;
            }
            String result = trans.translation(value, translation.other());
            gen.writeString(StringUtils.isNotBlank(result) ? result : value.toString());
            gen.writeString(result);
        } else {
            gen.writeString(value.toString());
            gen.writeObject(value);
        }
    }