1
This commit is contained in:
@@ -214,11 +214,17 @@ public class JDInnerController {
|
|||||||
return error("no comment available");
|
return error("no comment available");
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONObject item = new JSONObject();
|
|
||||||
item.put("commentText", commentToUse.getCommentText());
|
|
||||||
// 解析图片URL并转换webp格式为jpg
|
// 解析图片URL并转换webp格式为jpg
|
||||||
List<String> imageUrls = parsePictureUrls(commentToUse.getPictureUrls());
|
List<String> imageUrls = parsePictureUrls(commentToUse.getPictureUrls());
|
||||||
List<String> convertedImageUrls = imageConvertService.convertImageUrls(imageUrls);
|
List<String> convertedImageUrls = imageConvertService.convertImageUrls(imageUrls);
|
||||||
|
|
||||||
|
// 如果图片列表为空,不返回这个评论
|
||||||
|
if (convertedImageUrls == null || convertedImageUrls.isEmpty()) {
|
||||||
|
return error("no comment with images available");
|
||||||
|
}
|
||||||
|
|
||||||
|
JSONObject item = new JSONObject();
|
||||||
|
item.put("commentText", commentToUse.getCommentText());
|
||||||
item.put("images", convertedImageUrls);
|
item.put("images", convertedImageUrls);
|
||||||
|
|
||||||
JSONArray arr = new JSONArray();
|
JSONArray arr = new JSONArray();
|
||||||
|
|||||||
Reference in New Issue
Block a user