id,book_id,seq_num,create_time
insert into hot_book book_id, seq_num, create_time #{bookId,jdbcType=BIGINT}, #{seqNum,jdbcType=INTEGER}, NOW()
select ifnull(max(seq_num),0) from hot_book
delete from hot_book where id=#{id}
select h.id, h.book_id bookId, h.seq_num seqNum, h.create_time createTime, b.BOOK_NAME bookName, b.COVER_IMG coverImg, b.author, b.publish, a.ADVISER_ID adviserId, a.channel_id channelId, count(r.id) searchCount, a.TEMPLET_ID templetId from hot_book h LEFT JOIN search_record r on h.id=r.hot_book_id INNER JOIN book b on h.book_id=b.BOOK_ID INNER JOIN book_adviser a ON h.book_id=a.BOOK_ID INNER JOIN applet_book_classify_relation group by h.id order by h.seq_num
update hot_book set seq_num=#{seqNum} where id=#{id}