first commit
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
<?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.mhd.system.mapper.SysMsgPushMapper">
|
||||
|
||||
<resultMap type="com.mhd.system.domain.SysMsgPush" id="SysMsgPushResult">
|
||||
<id property="msgPushId" column="msg_push_id" />
|
||||
<result property="title" column="title" />
|
||||
<result property="content" column="content" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysMsgPushVo">
|
||||
select msg_push_id, title, content,create_by, create_time, update_by, update_time from sys_msg_push
|
||||
</sql>
|
||||
|
||||
<select id="selectSysMsgPushList" parameterType="com.mhd.system.domain.dto.SysMsgPushDTO" resultMap="SysMsgPushResult">
|
||||
<include refid="selectSysMsgPushVo"/>
|
||||
<where>
|
||||
del_flag = 0
|
||||
<if test="title != null and title != ''"> and title like concat('%', #{title} , '%') </if>
|
||||
<if test="content != null and content != ''"> and content = #{content}</if>
|
||||
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy} , '%')</if>
|
||||
<if test="params.begincreateTime != null and params.begincreateTime != ''">
|
||||
AND date_format(create_time,'%y%m%d') >= date_format(#{params.begincreateTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="params.endcreateTime != null and params.endcreateTime != ''"><!-- 结束时间检索 -->
|
||||
AND date_format(create_time,'%y%m%d') <= date_format(#{params.endcreateTime},'%y%m%d')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectSysMsgPushByMsgPushId" parameterType="Long" resultMap="SysMsgPushResult">
|
||||
<include refid="selectSysMsgPushVo"/>
|
||||
where msg_push_id = #{msgPushId}
|
||||
</select>
|
||||
|
||||
<insert id="insertSysMsgPush" parameterType="com.mhd.system.domain.SysMsgPush" useGeneratedKeys="true" keyProperty="msgPushId">
|
||||
insert into sys_msg_push
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="title != null">title,</if>
|
||||
<if test="content != null">content,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="title != null">#{title},</if>
|
||||
<if test="content != null">#{content},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysMsgPush" parameterType="com.mhd.system.domain.SysMsgPush">
|
||||
update sys_msg_push
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="title != null">title = #{title},</if>
|
||||
<if test="content != null">content = #{content},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where msg_push_id = #{msgPushId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysMsgPushByMsgId" parameterType="Long">
|
||||
delete from sys_msg_push where msg_push_id = #{msgPushId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysMsgPushByMsgIds" parameterType="String">
|
||||
delete from sys_msg_push where msg_push_id in
|
||||
<foreach item="msgPushId" collection="array" open="(" separator="," close=")">
|
||||
#{msgPushId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user