INSERT INTO BOOK_ASSIST_TEMPLET ( TEMPLET_NAME, COVER_IMG, QRCODE_URL, DESCRIPTION, EFFECT_URL, TEMPLET_URL, TEMPLET_FILE_NAME, TEMPLET_FILE_SIZE, SAMPLE, CREATED_USER, CREATED_DATE, LAST_MODIFIED_USER ) VALUES ( #{templetName}, #{coverImg}, #{qrcodeUrl}, #{description}, #{effectUrl}, #{templetUrl}, #{templetFileName}, #{templetFileSize}, #{sample}, #{createdUser}, NOW(), #{createdUser} )
DELETE FROM BOOK_ASSIST_TEMPLET WHERE ASSIST_TEMPLET_ID = #{assistTempletId}
UPDATE BOOK_ASSIST_TEMPLET COVER_IMG = #{coverImg}, TEMPLET_NAME = #{templetName}, QRCODE_URL = #{qrcodeUrl}, DESCRIPTION = #{description}, EFFECT_URL = #{effectUrl}, TEMPLET_URL = #{templetUrl}, TEMPLET_FILE_NAME = #{templetFileName}, TEMPLET_FILE_SIZE = #{templetFileSize}, SAMPLE = #{sample}, LAST_MODIFIED_USER = #{lastModifiedUser}, VERSION = VERSION+1 WHERE ASSIST_TEMPLET_ID = #{assistTempletId} AND VERSION = #{version}
SELECT ASSIST_TEMPLET_ID, TYPE_CODE, TEMPLET_NAME, COVER_IMG, REMARK, QRCODE_URL, EFFECT_URL, TEMPLET_URL, TEMPLET_FILE_NAME, TEMPLET_FILE_SIZE, SAMPLE, DESCRIPTION, VERSION FROM BOOK_ASSIST_TEMPLET WHERE ASSIST_TEMPLET_ID = #{assistTempletId} ORDER BY CREATED_DATE DESC
SELECT ASSIST_TEMPLET_ID, TYPE_CODE, TEMPLET_NAME, COVER_IMG, QRCODE_URL, REMARK, TEMPLET_URL, TEMPLET_FILE_NAME, TEMPLET_FILE_SIZE, SAMPLE, DESCRIPTION, VERSION FROM BOOK_ASSIST_TEMPLET AND TEMPLET_NAME LIKE CONCAT('%', #{templetName}, '%') AND ASSIST_TEMPLET_ID IN #{item} ORDER BY CREATED_DATE DESC