提交 22bc70af authored 作者: jiashixiong's avatar jiashixiong

前台公共资源接口添加查询专家

上级 3d282b63
......@@ -3,6 +3,7 @@ package com.zrqx.resource.fg.controller.recommend;
import java.util.List;
import java.util.stream.Collectors;
import com.zrqx.resource.commons.vo.fg.authorlibrary.FgAuthorLibraryListVO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -123,10 +124,7 @@ public class FgRecommendController {
}
//首页-专家团队
if ("PC_home05".equals(query.getCode())) {
FgQueryRecommedEbookForm form = new FgQueryRecommedEbookForm();
form.setIds(ids);
PageInfo<FgEbookListVO> result = ebookService.getRecommendList(
form, pageParam);
PageInfo<FgAuthorLibraryListVO> result = authorLibraryService.queryRecommendAuthorPage(ids, pageParam);
vo.setRecommendResourcePage(result);
return CallBack.success(vo);
}
......
......@@ -55,15 +55,17 @@ public interface FgAuthorLibraryMapper extends BaseMapper<AuthorLibrary> {
List<FgAuthorLibraryListVO> queryRecommendAuthor(@Param("form")FgQueryRecommedAuthorForm form);
@Select("<script>"
+ "select id,name,institutionName,sex,education,department,title,post,synopsis,img,uploadTime,browseNum "
+ "FROM res_author_library "
+ "where status = 1 "
+ "select a.id,a.name,a.institutionName,a.sex,a.education,a.department,a.title,a.post,a.synopsis,a.img,a.uploadTime,a.browseNum,a.expertise "
+ "FROM res_author_library a "
+ "left join res_recommend_resource b on a.id = b.resId "
+ "where a.status = 1 "
+ "<if test='ids != null and ids.size > 0' >"
+ "and id in "
+ "and a.id in "
+ " <foreach collection=\"ids\" index=\"index\" item=\"id\" open=\"(\" separator=\",\" close=\")\">"
+ "#{id}"
+ "</foreach>"
+ "</if>"
+ "</if>"
+ "ORDER BY b.sort "
+ "</script>")
List<FgAuthorLibraryListVO> queryRecommendAuthorByIds(@Param("ids")List<String> ids);
......
......@@ -30,7 +30,7 @@ public interface FgEbookMapper extends BaseMapper<Ebook>{
*/
@Select("<script>"
+ "select bb.id, bb.name, bb.authorId, bb.author, bb.translatorId, bb.translator, "
+ "bb.publishTime, bb.status, bb.resourceType, be.priceOption, be.realPrice,be.price,be.bookCover, be.summary, be.bookStatus, be.browseNum ,be.isContainEntity, be.entityRealPrice, be.entityPrice "
+ "bb.publishTime, bb.status, bb.resourceType, be.priceOption, be.realPrice,be.price,be.img, be.synopsis, be.bookStatus, be.browseNum ,be.isContainEntity, be.entityRealPrice, be.entityPrice "
+ "FROM res_book bb "
+ "LEFT JOIN res_ebook be ON bb.id = be.id "
+ "LEFT JOIN res_ebook_diy_type diy ON be.id = diy.ebookId "
......@@ -76,7 +76,7 @@ public interface FgEbookMapper extends BaseMapper<Ebook>{
*/
@Select("<script>"
+ "select bb.id, bb.name, bb.authorId, bb.author, bb.translatorId, bb.translator, "
+ "bb.publishTime, bb.status, bb.resourceType, be.priceOption, be.price,be.realPrice, be.bookCover, be.summary, be.bookStatus, be.browseNum,be.isContainEntity, be.entityRealPrice, be.entityPrice "
+ "bb.publishTime, bb.status, bb.resourceType, be.priceOption, be.price,be.realPrice, be.img, be.synopsis, be.bookStatus, be.browseNum,be.isContainEntity, be.entityRealPrice, be.entityPrice "
+ "FROM res_book bb "
+ "LEFT JOIN res_ebook be ON bb.id = be.id "
+ "LEFT JOIN res_ebook_diy_type diy ON be.id = diy.ebookId "
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论