Commit b3fbf47a by 李传峰

Merge branch 'feature/1007236' into 'release'

book慢sql优化转es(段宏超提供)

See merge request rays/pcloud-book!1581
parents bc9aa8a2 aad6386d
...@@ -509,4 +509,16 @@ public interface BookAdviserBiz { ...@@ -509,4 +509,16 @@ public interface BookAdviserBiz {
Integer getBookIsOpenCatalog(Long bookId, Long channelId, Long adviserId); Integer getBookIsOpenCatalog(Long bookId, Long channelId, Long adviserId);
void updateOpenRaysCode(BookAdviser bookAdviser); void updateOpenRaysCode(BookAdviser bookAdviser);
/**
* 从es中查询rays书刊信息
* @param isbn
* @param uniqueNumber
* @param adviserName
* @param agentId
* @param currentPage
* @param numPerPage
* @return
*/
PageBeanNew<ErpAdviserBookVO> listAdviserBook4Erp4ES(String isbn, String uniqueNumber, String adviserName, Long agentId, Integer currentPage, Integer numPerPage);
} }
...@@ -218,7 +218,7 @@ public class BookAdviserFacadeImpl implements BookAdviserFacade { ...@@ -218,7 +218,7 @@ public class BookAdviserFacadeImpl implements BookAdviserFacade {
@RequestParam(value = "currentPage") Integer currentPage, @RequestParam(value = "currentPage") Integer currentPage,
@RequestParam(value = "numPerPage") Integer numPerPage) @RequestParam(value = "numPerPage") Integer numPerPage)
throws PermissionException, JsonParseException, BizException { throws PermissionException, JsonParseException, BizException {
return new ResponseDto<>(bookAdviserBiz.listAdviserBook4Erp(isbn, uniqueNumber, adviserName, agentId, currentPage, numPerPage)); return new ResponseDto<>(bookAdviserBiz.listAdviserBook4Erp4ES(isbn, uniqueNumber, adviserName, agentId, currentPage, numPerPage));
} }
/** /**
......
package com.pcloud.book.consumer.book.elasticsearch; package com.pcloud.book.consumer.book.elasticsearch;
import com.pcloud.book.elasticsearch7.domain.dto.param.BookExtendImgSearchDto; import com.pcloud.book.elasticsearch7.domain.dto.param.BookExtendImgSearchDto;
import com.pcloud.book.elasticsearch7.domain.dto.param.BookSearchDto;
import com.pcloud.book.elasticsearch7.domain.dto.param.PlatformSearchDto; import com.pcloud.book.elasticsearch7.domain.dto.param.PlatformSearchDto;
import com.pcloud.book.elasticsearch7.domain.entity.Es7Book; import com.pcloud.book.elasticsearch7.domain.entity.Es7Book;
import com.pcloud.book.elasticsearch7.service.Es7BookExtendImgService; import com.pcloud.book.elasticsearch7.service.Es7BookExtendImgService;
import com.pcloud.book.elasticsearch7.service.Es7BookSearchService;
import com.pcloud.book.elasticsearch7.service.PlatformBookSearchService; import com.pcloud.book.elasticsearch7.service.PlatformBookSearchService;
import com.pcloud.common.dto.ResponseDto; import com.pcloud.common.dto.ResponseDto;
import com.pcloud.universe.commons.paging.Pagination; import com.pcloud.universe.commons.paging.Pagination;
...@@ -30,6 +32,8 @@ public class BookElasticSearchConsr { ...@@ -30,6 +32,8 @@ public class BookElasticSearchConsr {
private PlatformBookSearchService platformBookSearchService; private PlatformBookSearchService platformBookSearchService;
@Autowired @Autowired
private Es7BookExtendImgService es7BookExtendImgService; private Es7BookExtendImgService es7BookExtendImgService;
@Autowired
private Es7BookSearchService es7BookSearchService;
public Pagination<Es7Book> search(PlatformSearchDto dto) { public Pagination<Es7Book> search(PlatformSearchDto dto) {
try { try {
...@@ -50,4 +54,14 @@ public class BookElasticSearchConsr { ...@@ -50,4 +54,14 @@ public class BookElasticSearchConsr {
} }
return new ArrayList<>(); return new ArrayList<>();
} }
public Pagination<Es7Book> getAdviserBooks4Erp(BookSearchDto param) {
try {
Pagination<Es7Book> r = es7BookSearchService.getAdviserBooks4Erp(param);
return r;
} catch (Exception e) {
logger.error("platform book es search exception.", e);
}
return new Pagination<>();
}
} }
...@@ -2110,6 +2110,7 @@ public class ResourcePageBizImpl implements ResourcePageBiz { ...@@ -2110,6 +2110,7 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
} catch (BizException e) { } catch (BizException e) {
LOGGER.warn("修改一码一资源直接跳转失败"+e.getMsg()); LOGGER.warn("修改一码一资源直接跳转失败"+e.getMsg());
} }
} }
@Override @Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment