Commit 9be3d377 by zhuyajie

接口优化getHotBookList4H5

parent 8beb06bf
...@@ -39,22 +39,22 @@ ...@@ -39,22 +39,22 @@
<select id="getHotBookList" parameterType="map" resultType="com.pcloud.book.book.entity.HotBook"> <select id="getHotBookList" parameterType="map" resultType="com.pcloud.book.book.entity.HotBook">
select select
t1.id, h.id,
t1.book_id bookId, h.book_id bookId,
t1.seq_num seqNum, h.seq_num seqNum,
t1.create_time createTime, h.create_time createTime,
t2.book_name bookName, b.BOOK_NAME bookName,
t3.adviser_id adviserId, a.ADVISER_ID adviserId,
count(t4.id) searchCount count(r.id) searchCount
from hot_book t1 from hot_book h
left join search_record t4 LEFT JOIN search_record r
on t1.id=t4.hot_book_id on h.id=r.hot_book_id
left join book t2 INNER JOIN book b
on t1.book_id=t2.book_id on h.book_id=b.BOOK_ID
left join book_adviser t3 INNER JOIN book_adviser a
on t1.book_id=t3.book_id ON h.book_id=a.BOOK_ID
group by t1.id group by h.id
order by seq_num order by h.seq_num
</select> </select>
<update id="updateSeqNum" parameterType="map" > <update id="updateSeqNum" parameterType="map" >
......
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