<?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.dgtis.dorm.manager.db.dao.DemandSensitiveWordMapper" >
  <resultMap id="BaseResultMap" type="com.dgtis.dorm.manager.db.domain.DemandSensitiveWord" >
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="badword" property="badword" jdbcType="VARCHAR" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, badword
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
    select
    <include refid="Base_Column_List" />
    from demand_sensitive_word
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
    delete from demand_sensitive_word
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.dgtis.dorm.manager.db.domain.DemandSensitiveWord" >
    insert into demand_sensitive_word (id, badword)
    values (#{id,jdbcType=INTEGER}, #{badword,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.dgtis.dorm.manager.db.domain.DemandSensitiveWord" >
    insert into demand_sensitive_word
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        id,
      </if>
      <if test="badword != null" >
        badword,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=INTEGER},
      </if>
      <if test="badword != null" >
        #{badword,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.dgtis.dorm.manager.db.domain.DemandSensitiveWord" >
    update demand_sensitive_word
    <set >
      <if test="badword != null" >
        badword = #{badword,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.dgtis.dorm.manager.db.domain.DemandSensitiveWord" >
    update demand_sensitive_word
    set badword = #{badword,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>

  <select id="selectDemandSensitiveWord" resultType="java.lang.String">
    select badword from demand_sensitive_word order by id
  </select>

</mapper>