<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="com.cloudroam.mapper.EmailSmtpSettingMapperCustom">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.cloudroam.model.EmailSmtpSettingDO">
|
<id column="id" property="id" />
|
<result column="create_time" property="createTime" />
|
<result column="update_time" property="updateTime" />
|
<result column="delete_time" property="deleteTime" />
|
<result column="smtp_from" property="smtpFrom" />
|
<result column="smtp_host" property="smtpHost" />
|
<result column="smtp_port" property="smtpPort" />
|
<result column="smtp_username" property="smtpUsername" />
|
<result column="smtp_password" property="smtpPassword" />
|
<result column="smtp_type" property="smtpType" />
|
<result column="is_enabled" property="isEnabled" />
|
<result column="remark" property="remark" />
|
<result column="create_user_id" property="createUserId" />
|
<result column="create_user_name" property="createUserName" />
|
<result column="update_user_id" property="updateUserId" />
|
<result column="update_user_name" property="updateUserName" />
|
<result column="is_deleted" property="isDeleted" />
|
<result column="delete_user_id" property="deleteUserId" />
|
<result column="delete_user_name" property="deleteUserName" />
|
</resultMap>
|
<select id="getEmailSmtpSettingPage" resultType="com.cloudroam.bo.EmailSmtpSettingBO">
|
|
select * from (
|
select e.* ,
|
email_enable_flag.label as enable_flag_name,
|
smtp_type.label as smtp_type_name
|
from email_smtp_setting e
|
left join (
|
select id,label,value from sys_dict_item where dict_type='email_enable_flag' and is_deleted=0
|
) email_enable_flag
|
on e.is_enabled=email_enable_flag.`value`
|
left join (
|
select id,label,value from sys_dict_item where dict_type='smtp_type' and is_deleted=0
|
) smtp_type
|
on e.smtp_type=smtp_type.`value`
|
) t
|
where t.is_deleted = 0
|
<if test="smtpFrom != null and smtpFrom != ''">
|
AND t.smtp_from LIKE CONCAT('%', #{smtpFrom}, '%')
|
</if>
|
<if test="smtpHost != null and smtpHost != ''">
|
AND t.smtp_host LIKE CONCAT('%', #{smtpHost}, '%')
|
</if>
|
<if test="smtpPort != null ">
|
AND t.smtp_port = #{smtpPort}
|
</if>
|
<if test="smtpUsername != null and smtpUsername != ''">
|
AND t.smtp_username LIKE CONCAT('%', #{smtpUsername}, '%')
|
</if>
|
<if test="isEnabled != null ">
|
AND t.is_enabled = #{isEnabled}
|
</if>
|
|
<if test="isEnabled != null ">
|
AND t.is_enabled = #{isEnabled}
|
</if>
|
<if test="smtpType != null and smtpType != ''">
|
AND t.smtp_type = #{smtpType}
|
</if>
|
|
</select>
|
|
</mapper>
|