提交 e56ea868 authored 作者: Whispa's avatar Whispa

commit

上级 88ddfa1f
......@@ -49,7 +49,7 @@ public class ImageSearchController extends Controller {
List<ItemLabel> itemLabels = getItemLabels(url);
List<String> collect = itemLabels.stream().map(ItemLabel::getDescription).collect(Collectors.toList());
String[] strings = collect.toArray(new String[]{});
Page<TbCfStationItem> itemsByImageSearch = repository.getItemsByImageSearch(strings,strings.length/2, PageRequest.of(pageNo, pageSize));
Page<TbCfStationItem> itemsByImageSearch = repository.getItemsByImageSearch(strings, (long) (strings.length/2), PageRequest.of(pageNo, pageSize));
return new Result<>(itemsByImageSearch.toList());
}
......@@ -61,7 +61,7 @@ public class ImageSearchController extends Controller {
List<ItemLabel> itemLabels = getItemLabels(file.getBytes());
List<String> collect = itemLabels.stream().map(ItemLabel::getDescription).collect(Collectors.toList());
String[] strings = collect.toArray(new String[]{});
Page<TbCfStationItem> itemsByImageSearch = repository.getItemsByImageSearch(strings,strings.length/2, PageRequest.of(pageNo, pageSize));
Page<TbCfStationItem> itemsByImageSearch = repository.getItemsByImageSearch(strings, (long) (strings.length / 2), PageRequest.of(pageNo, pageSize));
return new Result<>(itemsByImageSearch.toList());
} catch (IOException e) {
System.out.println(e.getMessage());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论