96 lines
4.7 KiB
XML
96 lines
4.7 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.muyu.system.mapper.AsNoticeUserMapper">
|
|
|
|
<resultMap type="com.muyu.system.domain.AsNoticeUser" id="AsNoticeUserResult">
|
|
<result property="id" column="id" />
|
|
<result property="noticeId" column="notice_id" />
|
|
<result property="userId" column="user_id" />
|
|
<result property="readStates" column="read_states" />
|
|
<result property="endTime" column="end_time" />
|
|
<result property="outStates" column="out_states" />
|
|
<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="selectAsNoticeUserVo">
|
|
select id, notice_id, user_id, read_states, end_time, out_states, create_by, create_time, update_by, update_time from as_notice_user
|
|
</sql>
|
|
|
|
<select id="selectAsNoticeUserList" parameterType="com.muyu.system.domain.AsNoticeUser" resultMap="AsNoticeUserResult">
|
|
<include refid="selectAsNoticeUserVo"/>
|
|
<where>
|
|
<if test="noticeId != null "> and notice_id = #{noticeId}</if>
|
|
<if test="userId != null "> and user_id = #{userId}</if>
|
|
<if test="readStates != null and readStates != ''"> and read_states = #{readStates}</if>
|
|
<if test="endTime != null "> and end_time = #{endTime}</if>
|
|
<if test="outStates != null and outStates != ''"> and out_states = #{outStates}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectAsNoticeUserById" parameterType="Long" resultMap="AsNoticeUserResult">
|
|
<include refid="selectAsNoticeUserVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertAsNoticeUser" parameterType="com.muyu.system.domain.AsNoticeUser">
|
|
insert into as_notice_user
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">id,</if>
|
|
<if test="noticeId != null">notice_id,</if>
|
|
|
|
<if test="userId != null">user_id,</if>
|
|
<if test="readStates != null and readStates != ''">read_states,</if>
|
|
<if test="endTime != null">end_time,</if>
|
|
<if test="outStates != null and outStates != ''">out_states,</if>
|
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="updateBy != null">update_by,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">#{id},</if>
|
|
<if test="noticeId != null">#{noticeId},</if>
|
|
<if test="userId != null">#{userId},</if>
|
|
<if test="readStates != null and readStates != ''">#{readStates},</if>
|
|
<if test="endTime != null">#{endTime},</if>
|
|
<if test="outStates != null and outStates != ''">#{outStates},</if>
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateAsNoticeUser" parameterType="com.muyu.system.domain.AsNoticeUser">
|
|
update as_notice_user
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="noticeId != null">notice_id = #{noticeId},</if>
|
|
<if test="userId != null">user_id = #{userId},</if>
|
|
<if test="readStates != null and readStates != ''">read_states = #{readStates},</if>
|
|
<if test="endTime != null">end_time = #{endTime},</if>
|
|
<if test="outStates != null and outStates != ''">out_states = #{outStates},</if>
|
|
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteAsNoticeUserById" parameterType="Long">
|
|
delete from as_notice_user where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteAsNoticeUserByIds" parameterType="String">
|
|
delete from as_notice_user where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper>
|