提交 7c943de6 authored 作者: liupengfei's avatar liupengfei

--no commit message

上级 5ab97434
......@@ -232,14 +232,11 @@ public interface FgEbookMapper extends BaseMapper<Ebook>{
@Select("<script>"
+ "SELECT DISTINCT bb.id, bb.name, a.authorId, a.author, bb.translatorId, bb.translator, "
+ "bb.publisher,DATE_FORMAT(bb.publishTime,'%Y-%m-%d') publishTime, bb.status, bb.resourceType, be.priceOption, be.realPrice,be.price,be.cover, be.bookStatus, be.browseNum,"
+ "d.score,d.num,qr.qrCode "
+ "qr.qrCode "
+ "FROM hxwza_resource.res_book bb "
+ "LEFT JOIN hxwza_resource.res_ebook be ON bb.id = be.id "
+ "LEFT JOIN hxwza_resource.res_qr_code qr ON be.id = qr.resourceId "
+ "LEFT JOIN (SELECT resourceId,authorId,author FROM res_relation_author GROUP BY resourceId) a on be.id = a.resourceId "
+ "LEFT JOIN (SELECT CEILING(AVG(score))score ,resourceId,resourceName,resourceType,COUNT(resourceId) num "
+ "FROM hxwza_resource.res_comment c "
+ "WHERE STATUS = 1 AND mainId = 0 AND resourceType =1 GROUP BY resourceId ORDER BY score DESC )d ON bb.id = d.resourceId "
+ "WHERE be.bookStatus = 1 "
+ "<if test='form.ids != null and form.ids.size > 0' >"
+ "and bb.id not in "
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论