<?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.project.tr.JpushMsg.mapper.JpushMsgMapper">
|
|
<resultMap type="JpushMsg" id="JpushMsgResult">
|
<result property="jpushMsgId" column="jpush_msg_id" />
|
<result property="title" column="title" />
|
<result property="content" column="content" />
|
<result property="methodType" column="method_type" />
|
<result property="userId" column="user_id" />
|
<result property="status" column="status" />
|
<result property="createBy" column="create_by" />
|
<result property="createTime" column="create_time" />
|
<result property="updateBy" column="update_by" />
|
<result property="updateTime" column="update_time" />
|
<result property="remark" column="remark" />
|
</resultMap>
|
|
<sql id="selectJpushMsgVo">
|
select jpush_msg_id, title, content, method_type, user_id, status, create_by, create_time, update_by, update_time, remark from tr_jpush_msg
|
</sql>
|
|
<select id="selectJpushMsgList" parameterType="JpushMsg" resultMap="JpushMsgResult">
|
<include refid="selectJpushMsgVo"/>
|
<where>
|
<if test="title != null and title != ''"> and title = #{title}</if>
|
<if test="content != null and content != ''"> and content = #{content}</if>
|
<if test="methodType != null and methodType != ''"> and method_type = #{methodType}</if>
|
<if test="userId != null and userId != ''"> and user_id = #{userId}</if>
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
</where>
|
</select>
|
|
<select id="selectJpushMsgById" parameterType="Integer" resultMap="JpushMsgResult">
|
<include refid="selectJpushMsgVo"/>
|
where jpush_msg_id = #{jpushMsgId}
|
</select>
|
|
<insert id="insertJpushMsg" parameterType="JpushMsg" useGeneratedKeys="true" keyProperty="jpushMsgId">
|
insert into tr_jpush_msg
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="title != null and title != ''">title,</if>
|
<if test="content != null and content != ''">content,</if>
|
<if test="methodType != null and methodType != ''">method_type,</if>
|
<if test="userId != null and userId != ''">user_id,</if>
|
<if test="status != null and status != ''">status,</if>
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
<if test="createTime != null ">create_time,</if>
|
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
<if test="updateTime != null ">update_time,</if>
|
<if test="remark != null and remark != ''">remark,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="title != null and title != ''">#{title},</if>
|
<if test="content != null and content != ''">#{content},</if>
|
<if test="methodType != null and methodType != ''">#{methodType},</if>
|
<if test="userId != null and userId != ''">#{userId},</if>
|
<if test="status != null and status != ''">#{status},</if>
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
<if test="createTime != null ">#{createTime},</if>
|
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
<if test="updateTime != null ">#{updateTime},</if>
|
<if test="remark != null and remark != ''">#{remark},</if>
|
</trim>
|
</insert>
|
|
<update id="updateJpushMsg" parameterType="JpushMsg">
|
update tr_jpush_msg
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="title != null and title != ''">title = #{title},</if>
|
<if test="content != null and content != ''">content = #{content},</if>
|
<if test="methodType != null and methodType != ''">method_type = #{methodType},</if>
|
<if test="userId != null and userId != ''">user_id = #{userId},</if>
|
<if test="status != null and status != ''">status = #{status},</if>
|
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
<if test="createTime != null ">create_time = #{createTime},</if>
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
<if test="updateTime != null ">update_time = #{updateTime},</if>
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
</trim>
|
where jpush_msg_id = #{jpushMsgId}
|
</update>
|
|
<delete id="deleteJpushMsgById" parameterType="Integer">
|
delete from tr_jpush_msg where jpush_msg_id = #{jpushMsgId}
|
</delete>
|
|
<delete id="deleteJpushMsgByIds" parameterType="String">
|
delete from tr_jpush_msg where jpush_msg_id in
|
<foreach item="jpushMsgId" collection="array" open="(" separator="," close=")">
|
#{jpushMsgId}
|
</foreach>
|
</delete>
|
|
</mapper>
|