| | |
| | | |
| | | |
| | | <select id="selectEmailTemplatePage" resultMap="emailTemplateResultMap"> |
| | | select * from blade_email_template where is_deleted = 0 |
| | | select * from blade_email_template |
| | | <where> |
| | | <if test="id != null ">and id = #{id}</if> |
| | | <if test="title != null and title != ''">and title like CONCAT('%', #{title},'%')</if> |
| | | <if test="content != null and content != ''">and content = #{content}</if> |
| | | <if test="createTime != null ">and create_time = #{createTime}</if> |
| | | <if test="updateTime != null ">and update_time = #{updateTime}</if> |
| | | <if test="isDeleted != null ">and is_deleted = #{isDeleted}</if> |
| | | <if test="createBy != null ">and create_by = #{createBy}</if> |
| | | and is_deleted = 0 |
| | | </where> |
| | | </select> |
| | | |
| | | <resultMap type="org.springblade.modules.email.dto.EmailTemplateDTO" id="BladeEmailTemplateDTOResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="title" column="title" /> |
| | | <result property="content" column="content" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="isDelete" column="is_delete" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="id" column="id"/> |
| | | <result property="title" column="title"/> |
| | | <result property="content" column="content"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="isDeleted" column="is_deleted"/> |
| | | <result property="createBy" column="create_by"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectBladeEmailTemplate"> |
| | | select |
| | | id, |
| | | title, |
| | | content, |
| | | create_time, |
| | | update_time, |
| | | is_delete, |
| | | create_by |
| | | from |
| | | blade_email_template |
| | | select id, |
| | | title, |
| | | content, |
| | | create_time, |
| | | update_time, |
| | | is_deleted, |
| | | create_by |
| | | from blade_email_template |
| | | </sql> |
| | | |
| | | <select id="selectBladeEmailTemplateById" parameterType="int" resultMap="BladeEmailTemplateDTOResult"> |
| | |
| | | id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectBladeEmailTemplateList" parameterType="org.springblade.modules.email.dto.EmailTemplateDTO" resultMap="BladeEmailTemplateDTOResult"> |
| | | <select id="selectBladeEmailTemplateList" parameterType="org.springblade.modules.email.dto.EmailTemplateDTO" |
| | | resultMap="BladeEmailTemplateDTOResult"> |
| | | <include refid="selectBladeEmailTemplate"/> |
| | | <where> |
| | | <if test="id != null "> and id = #{id}</if> |
| | | <if test="title != null and title != ''"> and title = #{title}</if> |
| | | <if test="content != null and content != ''"> and content = #{content}</if> |
| | | <if test="createTime != null "> and create_time = #{createTime}</if> |
| | | <if test="updateTime != null "> and update_time = #{updateTime}</if> |
| | | <if test="isDelete != null "> and is_delete = #{isDelete}</if> |
| | | <if test="createBy != null "> and create_by = #{createBy}</if> |
| | | <if test="id != null ">and id = #{id}</if> |
| | | <if test="title != null and title != ''">and title = #{title}</if> |
| | | <if test="content != null and content != ''">and content = #{content}</if> |
| | | <if test="createTime != null ">and create_time = #{createTime}</if> |
| | | <if test="updateTime != null ">and update_time = #{updateTime}</if> |
| | | <if test="isDeleted != null ">and is_deleted = #{isDeleted}</if> |
| | | <if test="createBy != null ">and create_by = #{createBy}</if> |
| | | </where> |
| | | </select> |
| | | |