<?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="cn.com.basic.panel.entity.Cp_Notice_User">
|
<resultMap id="BaseResultMap" type="cn.com.basic.panel.entity.Cp_Notice_User">
|
<id column="id" property="id" jdbcType="VARCHAR" />
|
<result column="userid" property="userid" jdbcType="VARCHAR" />
|
<result column="noticeid" property="noticeid" jdbcType="VARCHAR" />
|
<result column="status" property="status" jdbcType="TINYINT" />
|
<result column="is_valid" property="isValid" jdbcType="TINYINT" />
|
</resultMap>
|
<sql id="Base_Column_List">
|
id, userid, noticeid, status,is_valid
|
</sql>
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap"
|
parameterType="java.lang.String">
|
select
|
<include refid="Base_Column_List" />
|
from cp_notice_user
|
where id = #{id,jdbcType=VARCHAR}
|
</select>
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
delete from cp_notice_user
|
where id = #{id,jdbcType=VARCHAR}
|
</delete>
|
<insert id="insert" parameterType="cn.com.basic.panel.entity.Cp_Notice_User">
|
insert into cp_notice_user (id, userid, noticeid,
|
status,is_valid)
|
values (#{id,jdbcType=VARCHAR}, #{userid,jdbcType=VARCHAR},
|
#{noticeid,jdbcType=VARCHAR},
|
#{status,jdbcType=TINYINT},#{isValid,jdbcType=TINYINT})
|
</insert>
|
|
<update id="updateByPrimaryKeySelective" parameterType="cn.com.basic.panel.entity.Cp_Notice_User">
|
update cp_notice_user
|
<set>
|
<if test="userid != null">
|
userid = #{userid,jdbcType=VARCHAR},
|
</if>
|
<if test="noticeid != null">
|
noticeid = #{noticeid,jdbcType=VARCHAR},
|
</if>
|
<if test="status != null">
|
status = #{status,jdbcType=TINYINT},
|
</if>
|
<if test="isValid != null">
|
is_valid = #{isValid,jdbcType=TINYINT},
|
</if>
|
</set>
|
where id = #{id,jdbcType=VARCHAR}
|
</update>
|
<update id="updateByPrimaryKey" parameterType="cn.com.basic.panel.entity.Cp_Notice_User">
|
update cp_notice_user
|
set userid = #{userid,jdbcType=VARCHAR},
|
noticeid = #{noticeid,jdbcType=VARCHAR},
|
status = #{status,jdbcType=TINYINT},
|
is_valid = #{isValid,jdbcType=TINYINT}
|
where id = #{id,jdbcType=VARCHAR}
|
</update>
|
|
<update id="updateByUserIdAndNoticeIdSelective" parameterType="cn.com.basic.panel.entity.Cp_Notice_User">
|
update cp_notice_user
|
<set>
|
<if test="status != null">
|
status = #{status,jdbcType=TINYINT},
|
</if>
|
<if test="isValid != null">
|
is_valid = #{isValid,jdbcType=TINYINT},
|
</if>
|
</set>
|
where noticeid = #{noticeid,jdbcType=VARCHAR}
|
<if test="userid != null">
|
and userid = #{userid,jdbcType=VARCHAR}
|
</if>
|
</update>
|
</mapper>
|