Commit 9f397c42 by 裴大威

Merge branch 'fix-zp-1002692new' into 'master'

1002692 查询本编辑下的书刊

See merge request rays/pcloud-book!632
parents 1477b6c4 202bd013
...@@ -643,7 +643,7 @@ public interface BookBiz { ...@@ -643,7 +643,7 @@ public interface BookBiz {
*/ */
void updateBookQualifyInfo(BookQualifyInfoVO bookQualifyInfo, Long adviserId); void updateBookQualifyInfo(BookQualifyInfoVO bookQualifyInfo, Long adviserId);
PageBeanNew<BookQualifyVO> getAddBookQualifyList(Integer currentPage, Integer numPerPage, String name,Integer isShowQualifyInfo); PageBeanNew<BookQualifyVO> getAddBookQualifyList(Integer currentPage, Integer numPerPage, String name,Integer isShowQualifyInfo,Long adviserId);
SearchBookVO getBookInfoByBookGroupId(Long bookGroupId); SearchBookVO getBookInfoByBookGroupId(Long bookGroupId);
} }
...@@ -2085,10 +2085,11 @@ public class BookBizImpl implements BookBiz { ...@@ -2085,10 +2085,11 @@ public class BookBizImpl implements BookBiz {
} }
@Override @Override
public PageBeanNew<BookQualifyVO> getAddBookQualifyList(Integer currentPage, Integer numPerPage, String name, Integer isShowQualifyInfo) { public PageBeanNew<BookQualifyVO> getAddBookQualifyList(Integer currentPage, Integer numPerPage, String name, Integer isShowQualifyInfo,Long adviserId) {
Map<String, Object> paramMap = new HashMap<>(); Map<String, Object> paramMap = new HashMap<>();
paramMap.put("isShowQualifyInfo", isShowQualifyInfo); paramMap.put("isShowQualifyInfo", isShowQualifyInfo);
paramMap.put("name", name); paramMap.put("name", name);
paramMap.put("adviserId", adviserId);
PageBeanNew<BookQualifyVO> pageBeanNew = bookDao.listPageNew(new PageParam(currentPage, numPerPage), paramMap, "getAddBookQualifyList"); PageBeanNew<BookQualifyVO> pageBeanNew = bookDao.listPageNew(new PageParam(currentPage, numPerPage), paramMap, "getAddBookQualifyList");
if (null==pageBeanNew || ListUtils.isEmpty(pageBeanNew.getRecordList())){ if (null==pageBeanNew || ListUtils.isEmpty(pageBeanNew.getRecordList())){
return new PageBeanNew<>(currentPage,numPerPage,0,new ArrayList<>()); return new PageBeanNew<>(currentPage,numPerPage,0,new ArrayList<>());
......
...@@ -1016,8 +1016,8 @@ public class BookFacadeImpl implements BookFacade { ...@@ -1016,8 +1016,8 @@ public class BookFacadeImpl implements BookFacade {
@RequestParam(value = "name", required = false) String name, @RequestParam(value = "name", required = false) String name,
@RequestParam(value = "isShowQualifyInfo", required = false) Integer isShowQualifyInfo @RequestParam(value = "isShowQualifyInfo", required = false) Integer isShowQualifyInfo
) throws PermissionException, JsonParseException, BizException{ ) throws PermissionException, JsonParseException, BizException{
Long channelId = (Long) SessionUtil.getVlaue(token,SessionUtil.PARTY_ID); Long adviserId = (Long) SessionUtil.getVlaue(token,SessionUtil.PARTY_ID);
PageBeanNew<BookQualifyVO> pageBean = bookBiz.getAddBookQualifyList(currentPage,numPerPage,name,isShowQualifyInfo); PageBeanNew<BookQualifyVO> pageBean = bookBiz.getAddBookQualifyList(currentPage,numPerPage,name,isShowQualifyInfo,adviserId);
return new ResponseDto<>(pageBean); return new ResponseDto<>(pageBean);
} }
......
...@@ -2208,9 +2208,11 @@ ...@@ -2208,9 +2208,11 @@
select a.BOOK_ID bookId,a.COVER_IMG coverImg,a.BOOK_NAME bookName,a.ISBN isbn,b.id bookGroupId ,d.resourceCount from book a select a.BOOK_ID bookId,a.COVER_IMG coverImg,a.BOOK_NAME bookName,a.ISBN isbn,b.id bookGroupId ,d.resourceCount from book a
LEFT JOIN book_group b on a.book_id=b.book_id LEFT JOIN book_group b on a.book_id=b.book_id
LEFT JOIN (select book_group_id as bookGroupId,COUNT(1) as resourceCount from book_group_serve GROUP BY book_group_id ) d on b.id=d.bookGroupId LEFT JOIN (select book_group_id as bookGroupId,COUNT(1) as resourceCount from book_group_serve GROUP BY book_group_id ) d on b.id=d.bookGroupId
left join book_adviser c on a.book_id=c.book_id
where a.IS_DELETE=0 where a.IS_DELETE=0
and b.is_delete=0 and b.is_delete=0
AND b.join_group_type =4 AND b.join_group_type =4
and c.adviser_id=#{adviserId}
<if test="name != null"> <if test="name != null">
AND (a.BOOK_NAME LIKE CONCAT('%',#{name},'%') OR a.ISBN LIKE CONCAT(#{name},'%')) AND (a.BOOK_NAME LIKE CONCAT('%',#{name},'%') OR a.ISBN LIKE CONCAT(#{name},'%'))
</if> </if>
......
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