fix: 翻译JSON无法解析报错问题
This commit is contained in:
+7
-2
@@ -106,8 +106,13 @@ public class TranslationAspect {
|
|||||||
log.error("json解析失败" + e.getMessage(), e);
|
log.error("json解析失败" + e.getMessage(), e);
|
||||||
return record;
|
return record;
|
||||||
}
|
}
|
||||||
|
JSONObject item;
|
||||||
JSONObject item = JSONObject.parseObject(json);
|
try {
|
||||||
|
item = JSONObject.parseObject(json);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("json解析失败" + e.getMessage(), e);
|
||||||
|
return record;
|
||||||
|
}
|
||||||
|
|
||||||
for (Field field : oConvertUtils.getAllFields(record)) {
|
for (Field field : oConvertUtils.getAllFields(record)) {
|
||||||
field.setAccessible(true);
|
field.setAccessible(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user