优化通道数据异常时的入库逻辑

This commit is contained in:
648540858
2024-07-10 15:58:26 +08:00
parent b843958ed7
commit 6ecf8af6ca
2 changed files with 42 additions and 23 deletions

View File

@@ -665,18 +665,18 @@ public class XmlUtil {
}
String value = annotation.value();
boolean subVal = value.contains(".");
Element element1 = element.element(value);
if (element1 == null) {
continue;
}
if (!subVal) {
Element element1 = element.element(value);
if (element1 == null) {
continue;
}
// 无下级数据
Object fieldVal = element1.isTextOnly() ? element1.getText() : loadElement(element1, field.getType());
Object o = simpleTypeDeal(field.getType(), fieldVal);
ReflectionUtils.setField(field, t, o);
} else {
String[] pathArray = value.split(".");
Element subElement = element1;
String[] pathArray = value.split("\\.");
Element subElement = element;
for (String path : pathArray) {
subElement = subElement.element(path);
if (subElement == null) {