|
|
|
@ -78,7 +78,7 @@ public class SearchController {
|
|
|
|
|
@VerifyParam(required = true) FuzzySearchReq query) throws InterruptedException, ExecutionException {
|
|
|
|
|
PageRequest pageRequest = PageRequest.of(getPageNum(query.getPageNum()), getPageSize(query.getPageSize()));
|
|
|
|
|
|
|
|
|
|
Page<SongInfo> pageResults=songInfoService.fuzzySearch(query.getKeyword(),pageRequest);
|
|
|
|
|
List<SongInfo> pageResults=songInfoService.fuzzySearch(query.getKeyword(),pageRequest);
|
|
|
|
|
List<SongRespDTO> list = pageResults.stream().map(SongMapper::getSongRespDTO)
|
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
return Result.success(new PageResult<SongRespDTO>(Long.valueOf(list.size()), list));
|
|
|
|
@ -99,7 +99,7 @@ public class SearchController {
|
|
|
|
|
@RequestHeader(value = "Authorization", required = false) String authorization,
|
|
|
|
|
@VerifyParam(required = true) FuzzySearchReq query) throws InterruptedException, ExecutionException {
|
|
|
|
|
PageRequest pageRequest = PageRequest.of(getPageNum(query.getPageNum()), getPageSize(query.getPageSize()));
|
|
|
|
|
Page<Journal> pageResults=journalService.fuzzySearch(query.getKeyword(),pageRequest);
|
|
|
|
|
List<Journal> pageResults=journalService.fuzzySearch(query.getKeyword(),pageRequest);
|
|
|
|
|
List<JournalRespDTO> list = pageResults.stream().map(JournalMapper::getJournalRespDTO)
|
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
return Result.success(new PageResult<JournalRespDTO>(Long.valueOf(list.size()), list));
|
|
|
|
|