|
|
@@ -1,5 +1,7 @@
|
|
|
package cn.reghao.tnb.content.app.vod.service.impl;
|
|
|
|
|
|
+import cn.reghao.bnt.admin.api.dto.VideoSummary;
|
|
|
+import cn.reghao.bnt.admin.api.iface.DataSearchService;
|
|
|
import cn.reghao.jutil.jdk.db.Page;
|
|
|
import cn.reghao.jutil.jdk.db.PageList;
|
|
|
import cn.reghao.tnb.common.auth.UserContext;
|
|
|
@@ -15,6 +17,7 @@ import cn.reghao.tnb.content.app.vod.service.ContentPermission;
|
|
|
import cn.reghao.tnb.content.app.vod.service.SearchService;
|
|
|
import cn.reghao.tnb.content.app.vod.service.VideoPostQuery;
|
|
|
import cn.reghao.tnb.content.app.util.redis.ds.RedisString;
|
|
|
+import org.apache.dubbo.config.annotation.DubboReference;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.List;
|
|
|
@@ -26,6 +29,9 @@ import java.util.stream.Collectors;
|
|
|
*/
|
|
|
@Service
|
|
|
public class SearchServiceImpl implements SearchService {
|
|
|
+ @DubboReference(check = false, retries = 1, timeout = 60_000)
|
|
|
+ private DataSearchService dataSearchService;
|
|
|
+
|
|
|
private final int pageSize = 12;
|
|
|
private final VideoPostMapper videoPostMapper;
|
|
|
private final SearchRecordMapper searchRecordMapper;
|
|
|
@@ -55,6 +61,8 @@ public class SearchServiceImpl implements SearchService {
|
|
|
}
|
|
|
|
|
|
public PageList<VideoCard> searchByKeyword(String keyword, String nextIdStr, int pageNumber) {
|
|
|
+ PageList<VideoSummary> pageList = dataSearchService.searchVideo(keyword, nextIdStr, pageNumber);
|
|
|
+
|
|
|
List<Integer> scopes = contentPermission.getUserScopes();
|
|
|
SearchCriteria searchCriteria = new SearchCriteria.Builder().scope(scopes).title(keyword).build();
|
|
|
/*int total = getTotal(keyword);
|