select
id,cat_id,cat_name,book_name,author_id,author_name,word_count,last_index_id,last_index_name,score,pic_url,book_status,last_index_update_time,book_desc
from book where word_count > 0
and (book_name like concat('%',#{keyword},'%') or author_name like concat('%',#{keyword},'%'))
and work_direction = #{workDirection}
and cat_id = #{catId}
and is_vip = #{isVip}
and book_status = #{bookStatus}
and word_count >= #{wordCountMin}
and word_count #{wordCountMax}
and last_index_update_time >= #{updateTimeMin}
update book set visit_count = visit_count + 1 , update_time = #{date}
where id = #{bookId}
select id,pic_url,book_name,book_desc
from book
where cat_id = #{catId}
order by RAND() LIMIT 4
select
id,pic_url from book
where pic_url like 'http%'
limit #{offset},#{limit}
select id,book_name,author_name,pic_url,book_desc,score from book ORDER BY score,RAND() LIMIT #{limit};