<?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.community.huiju.dao.SysReportReasonMapper" >
  <resultMap id="BaseResultMap" type="com.community.huiju.model.SysReportReason" >
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="reason" property="reason" jdbcType="VARCHAR" />
    <result column="sort" property="sort" jdbcType="INTEGER" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, reason, sort
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
    select 
    <include refid="Base_Column_List" />
    from sys_report_reason
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
    delete from sys_report_reason
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.community.huiju.model.SysReportReason" >
    insert into sys_report_reason (id, reason, sort
      )
    values (#{id,jdbcType=INTEGER}, #{reason,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.community.huiju.model.SysReportReason" >
    insert into sys_report_reason
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        id,
      </if>
      <if test="reason != null" >
        reason,
      </if>
      <if test="sort != null" >
        sort,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=INTEGER},
      </if>
      <if test="reason != null" >
        #{reason,jdbcType=VARCHAR},
      </if>
      <if test="sort != null" >
        #{sort,jdbcType=INTEGER},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.SysReportReason" >
    update sys_report_reason
    <set >
      <if test="reason != null" >
        reason = #{reason,jdbcType=VARCHAR},
      </if>
      <if test="sort != null" >
        sort = #{sort,jdbcType=INTEGER},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.SysReportReason" >
    update sys_report_reason
    set reason = #{reason,jdbcType=VARCHAR},
      sort = #{sort,jdbcType=INTEGER}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>