80 lines
3.8 KiB
XML
80 lines
3.8 KiB
XML
<?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.ruoyi.system.mapper.CmsLeaderMailboxMapper">
|
|
|
|
<resultMap type="CmsLeaderMailbox" id="CmsLeaderMailboxResult">
|
|
<result property="id" column="id" />
|
|
<result property="userName" column="user_name" />
|
|
<result property="emailAddr" column="email_addr" />
|
|
<result property="phoneNumber" column="phone_number" />
|
|
<result property="theme" column="theme" />
|
|
<result property="content" column="content" />
|
|
<result property="createTime" column="create_time" />
|
|
</resultMap>
|
|
|
|
<sql id="selectCmsLeaderMailboxVo">
|
|
select id, user_name, email_addr, phone_number, theme, content, create_time from cms_leader_mailbox
|
|
</sql>
|
|
|
|
<select id="selectCmsLeaderMailboxList" parameterType="CmsLeaderMailbox" resultMap="CmsLeaderMailboxResult">
|
|
<include refid="selectCmsLeaderMailboxVo"/>
|
|
<where>
|
|
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
|
<if test="emailAddr != null and emailAddr != ''"> and email_addr = #{emailAddr}</if>
|
|
<if test="phoneNumber != null and phoneNumber != ''"> and phone_number = #{phoneNumber}</if>
|
|
<if test="theme != null and theme != ''"> and theme = #{theme}</if>
|
|
<if test="content != null and content != ''"> and content = #{content}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectCmsLeaderMailboxById" parameterType="Long" resultMap="CmsLeaderMailboxResult">
|
|
<include refid="selectCmsLeaderMailboxVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertCmsLeaderMailbox" parameterType="CmsLeaderMailbox" useGeneratedKeys="true" keyProperty="id">
|
|
insert into cms_leader_mailbox
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="userName != null">user_name,</if>
|
|
<if test="emailAddr != null">email_addr,</if>
|
|
<if test="phoneNumber != null">phone_number,</if>
|
|
<if test="theme != null">theme,</if>
|
|
<if test="content != null">content,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="userName != null">#{userName},</if>
|
|
<if test="emailAddr != null">#{emailAddr},</if>
|
|
<if test="phoneNumber != null">#{phoneNumber},</if>
|
|
<if test="theme != null">#{theme},</if>
|
|
<if test="content != null">#{content},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateCmsLeaderMailbox" parameterType="CmsLeaderMailbox">
|
|
update cms_leader_mailbox
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="userName != null">user_name = #{userName},</if>
|
|
<if test="emailAddr != null">email_addr = #{emailAddr},</if>
|
|
<if test="phoneNumber != null">phone_number = #{phoneNumber},</if>
|
|
<if test="theme != null">theme = #{theme},</if>
|
|
<if test="content != null">content = #{content},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteCmsLeaderMailboxById" parameterType="Long">
|
|
delete from cms_leader_mailbox where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteCmsLeaderMailboxByIds" parameterType="String">
|
|
delete from cms_leader_mailbox where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper> |