fix 运营获取合规文件增加file_id

master
luoyang 5 years ago
parent 0e35c2759b
commit 4dc79f41dd

@ -3062,10 +3062,15 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
JSONObject fileJson = new JSONObject(); JSONObject fileJson = new JSONObject();
if (clientFiles != null && clientFiles.size() > 0) { if (clientFiles != null && clientFiles.size() > 0) {
for (String fileKey : fileKeys) { for (String fileKey : fileKeys) {
List<String> clientFileUrl = clientFiles.stream() List<JSONObject> clientFileUrl = clientFiles.stream()
.filter(json -> (fileKey.equals(json.getString("file_name")))) .filter(json -> (fileKey.equals(json.getString("file_name"))))
.sorted((log1, log2) -> log2.getDate("last_update_date").compareTo(log1.getDate("last_update_date"))) .sorted((log1, log2) -> log2.getDate("last_update_date").compareTo(log1.getDate("last_update_date")))
.map(groupBd -> groupBd.getString("file_value")) .map(json -> {
JSONObject params = new JSONObject();
params.put("file_id", json.getString("file_id"));
params.put("file_value", json.getString("file_value"));
return params;
})
.collect(Collectors.toList()); .collect(Collectors.toList());
if (clientFileUrl != null && clientFileUrl.size() > 0) { if (clientFileUrl != null && clientFileUrl.size() > 0) {
fileJson.put(fileKey, clientFileUrl); fileJson.put(fileKey, clientFileUrl);

Loading…
Cancel
Save