Commit 0593bc27 by 郑勇

bug: [none] es里面数据查了不对

parent 0187351d
......@@ -1060,16 +1060,20 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
adviserIdList=allAdvisers4Agent;
}
}
//PageBeanNew<ErpAdviserBookVO> pageBeanNew = bookAdviserDao.listPageNew(new PageParam(currentPage, numPerPage), paramMap, "listAdviserBook4Erp");
Page<ESBookAndAdviser> page= esBookAndAdviserBiz.getESBooks4Erp(isbn,uniqueNumber, listName,adviserIdList,currentPage,numPerPage);
if(null==page){
PageBeanNew<ErpAdviserBookVO> pageBeanNew = bookAdviserDao.listPageNew(new PageParam(currentPage, numPerPage), paramMap, "listAdviserBook4Erp");
// Page<ESBookAndAdviser> page= esBookAndAdviserBiz.getESBooks4Erp(isbn,uniqueNumber, listName,adviserIdList,currentPage,numPerPage);
/*if(null==page){
return new PageBeanNew<>(currentPage, numPerPage,0, new ArrayList<>());
}
if(CollUtil.isEmpty(page.getContent())){
return new PageBeanNew<>(currentPage, numPerPage,Long.valueOf(page.getTotalElements()).intValue(), new ArrayList<>());
}
List<ESBookAndAdviser> esBookAndAdvisers = page.getContent();
List<ErpAdviserBookVO> bookVOS = changeToErpBookVO(esBookAndAdvisers);
List<ErpAdviserBookVO> bookVOS = changeToErpBookVO(esBookAndAdvisers);*/
if(null==pageBeanNew || CollUtil.isEmpty(pageBeanNew.getRecordList())){
return new PageBeanNew<>(currentPage, numPerPage,null==pageBeanNew ? 0 : pageBeanNew.getTotalCount(), new ArrayList<>());
}
List<ErpAdviserBookVO> bookVOS=pageBeanNew.getRecordList();
if(!CollectionUtils.isEmpty(bookVOS)) {
Set<Long> setAdviserIds=new HashSet<>();
Set<Long> setChannelIds=new HashSet<>();
......@@ -1108,7 +1112,7 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
} catch (InterruptedException | TimeoutException | ExecutionException e) {
LOGGER.error("[exportMonthReport] 并行导出word失败! err:{}", e.getMessage(), e);
}
//List<Long> list = bookFundBiz.listHaveFundBooks(bookIds);
List<Long> list = bookFundBiz.listHaveFundBooks(bookIds);
for (ErpAdviserBookVO bookVO : bookVOS) {
Long adviserId = bookVO.getAdviserId();
if(adviserId != null && MapUtils.isNotEmpty(userLoginInfoMap) && userLoginInfoMap.containsKey(adviserId)) {
......@@ -1129,13 +1133,14 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
BookDto bookDto = bookDtoMapMap.get(bookVO.getBookId());
bookVO.setCoverImg(Optional.ofNullable(bookDto).map(a->a.getCoverImg()).orElse(null));
}
/*bookVO.setIsFundSupport(false);
bookVO.setIsFundSupport(false);
if(!ListUtils.isEmpty(list) && list.contains(bookVO.getBookId())) {
bookVO.setIsFundSupport(true);
}*/
}
}
return new PageBeanNew<>(currentPage, numPerPage, (int) page.getTotalElements(), bookVOS);
}
//return new PageBeanNew<>(currentPage, numPerPage, (int) page.getTotalElements(), bookVOS);
return new PageBeanNew<>(currentPage, numPerPage, pageBeanNew.getTotalCount(), bookVOS);
}
private <E> void addIfNonNull(Collection<E> s, E v) {
......
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