select COVER_ID,TEMPLET_ID,TEMPLET_NAME,COVER_IMG,UPDATE_TIME,CREATED_Time, book_label_id from book_cover
select COVER_ID,TEMPLET_ID,TEMPLET_NAME,COVER_IMG,UPDATE_TIME,CREATED_Time, book_label_id from book_cover where 1=1 AND TEMPLET_ID = #{templetId} and book_label_id IS NULL
insert into book_cover (COVER_ID,TEMPLET_ID,TEMPLET_NAME,COVER_IMG,CREATED_Time,UPDATE_TIME) values (#{coverId,jdbcType=BIGINT}, #{templetId,jdbcType=BIGINT}, #{templetName,jdbcType=VARCHAR}, #{coverImg,jdbcType=VARCHAR}, now(), #{updateTime,jdbcType=TIMESTAMP})
SELECT COVER_ID,TEMPLET_ID,TEMPLET_NAME,COVER_IMG,UPDATE_TIME,CREATED_Time FROM book_cover WHERE COVER_ID = #{coverId}
SELECT COVER_ID,TEMPLET_ID,TEMPLET_NAME,COVER_IMG,UPDATE_TIME,CREATED_Time FROM book_cover WHERE COVER_ID = #{coverId} AND TEMPLET_ID = #{templetId}
delete from book_cover where COVER_ID=#{coverId}
UPDATE book_cover SET TEMPLET_ID = #{templetId,jdbcType=VARCHAR}, COVER_IMG = #{coverImg,jdbcType=VARCHAR}, UPDATE_TIME = now() WHERE COVER_ID=#{coverId}
SELECT COVER_ID, TEMPLET_ID, TEMPLET_NAME, COVER_IMG, UPDATE_TIME, CREATED_Time, book_label_id FROM book_cover WHERE TEMPLET_ID = #{templetId} AND (book_label_id = #{bookLabelId} OR book_label_id IS NULL) ORDER BY book_label_id DESC