|
|
@ -201,13 +201,13 @@ public class EnterpriseWeChatUtils { |
|
|
|
public static String markdownTable(String title,String content){ |
|
|
|
public static String markdownTable(String title,String content){ |
|
|
|
List<LinkedHashMap> mapItemsList = JSONUtils.toList(content, LinkedHashMap.class); |
|
|
|
List<LinkedHashMap> mapItemsList = JSONUtils.toList(content, LinkedHashMap.class); |
|
|
|
StringBuilder contents = new StringBuilder(200); |
|
|
|
StringBuilder contents = new StringBuilder(200); |
|
|
|
for (LinkedHashMap mapItems : mapItemsList){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (null != mapItemsList) { |
|
|
|
|
|
|
|
for (LinkedHashMap mapItems : mapItemsList){ |
|
|
|
Set<Map.Entry<String, String>> entries = mapItems.entrySet(); |
|
|
|
Set<Map.Entry<String, String>> entries = mapItems.entrySet(); |
|
|
|
|
|
|
|
|
|
|
|
Iterator<Map.Entry<String, String>> iterator = entries.iterator(); |
|
|
|
Iterator<Map.Entry<String, String>> iterator = entries.iterator(); |
|
|
|
|
|
|
|
|
|
|
|
StringBuilder t = new StringBuilder(String.format("`%s`%s",title,Constants.MARKDOWN_ENTER)); |
|
|
|
StringBuilder t = new StringBuilder(String.format("`%s`%s",title,Constants.MARKDOWN_ENTER)); |
|
|
|
|
|
|
|
|
|
|
|
while (iterator.hasNext()){ |
|
|
|
while (iterator.hasNext()){ |
|
|
|
|
|
|
|
|
|
|
|
Map.Entry<String, String> entry = iterator.next(); |
|
|
|
Map.Entry<String, String> entry = iterator.next(); |
|
|
@ -215,9 +215,9 @@ public class EnterpriseWeChatUtils { |
|
|
|
t.append(entry.getKey()).append(":").append(entry.getValue()); |
|
|
|
t.append(entry.getKey()).append(":").append(entry.getValue()); |
|
|
|
t.append(Constants.MARKDOWN_ENTER); |
|
|
|
t.append(Constants.MARKDOWN_ENTER); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
contents.append(t); |
|
|
|
contents.append(t); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
return contents.toString(); |
|
|
|
return contents.toString(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|