|
|
@ -78,13 +78,15 @@ public class InterfaceLogServiceImpl implements InterfaceLogService { |
|
|
// 构造返回的JSON结构 |
|
|
// 构造返回的JSON结构 |
|
|
Map<String, Object> result = new LinkedHashMap<>(); |
|
|
Map<String, Object> result = new LinkedHashMap<>(); |
|
|
|
|
|
|
|
|
// 处理主表数据(将orderref1-20映射为"接口参数1"-"接口参数20") |
|
|
|
|
|
|
|
|
// 处理主表数据(使用getFieldName映射字段名) |
|
|
if (head != null) { |
|
|
if (head != null) { |
|
|
for (int i = 1; i <= 20; i++) { |
|
|
for (int i = 1; i <= 20; i++) { |
|
|
String key = "orderref" + i; |
|
|
String key = "orderref" + i; |
|
|
Object value = head.get(key); |
|
|
Object value = head.get(key); |
|
|
if (value != null && !value.toString().trim().isEmpty()) { |
|
|
if (value != null && !value.toString().trim().isEmpty()) { |
|
|
result.put("接口参数" + i, value); |
|
|
|
|
|
|
|
|
// 使用getFieldName获取实际的字段名 |
|
|
|
|
|
String fieldName = getFieldName(i, true); |
|
|
|
|
|
result.put(fieldName, value); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -100,7 +102,9 @@ public class InterfaceLogServiceImpl implements InterfaceLogService { |
|
|
String key = "orderref" + i; |
|
|
String key = "orderref" + i; |
|
|
Object value = detail.get(key); |
|
|
Object value = detail.get(key); |
|
|
if (value != null && !value.toString().trim().isEmpty()) { |
|
|
if (value != null && !value.toString().trim().isEmpty()) { |
|
|
detailResult.put("接口参数" + i, value); |
|
|
|
|
|
|
|
|
// 使用getFieldName获取实际的字段名 |
|
|
|
|
|
String fieldName = getFieldName(i, false); |
|
|
|
|
|
detailResult.put(fieldName, value); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|