<?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.emr.dao.EmrComomSetMapper" >
  <resultMap id="BaseResultMap" type="com.emr.entity.EmrComomSet" >
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="times" property="times" jdbcType="SMALLINT" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, times
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
    select 
    <include refid="Base_Column_List" />
    from emr_comom_set
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
    delete from emr_comom_set
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.emr.entity.EmrComomSet" >
    insert into emr_comom_set (id, times)
    values (#{id,jdbcType=INTEGER}, #{times,jdbcType=SMALLINT})
  </insert>
  <insert id="insertSelective" parameterType="com.emr.entity.EmrComomSet" >
    insert into emr_comom_set
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        id,
      </if>
      <if test="times != null" >
        times,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=INTEGER},
      </if>
      <if test="times != null" >
        #{times,jdbcType=SMALLINT},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.emr.entity.EmrComomSet" >
    update emr_comom_set
    <set >
      <if test="times != null" >
        times = #{times,jdbcType=SMALLINT},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.emr.entity.EmrComomSet" >
    update emr_comom_set
    set times = #{times,jdbcType=SMALLINT}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>