<?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.emrPdfWaterSet.EmrPdfWaterSetMapper" >
  <resultMap id="BaseResultMap" type="com.emr.entity.emrPdfWaterSet.EmrPdfWaterSet" >
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="effective" property="effective" jdbcType="SMALLINT" />
    <result column="download_effective" property="downloadEffective" jdbcType="SMALLINT" />
    <result column="up_or_under" property="upOrUnder" jdbcType="SMALLINT" />
    <result column="transparent" property="transparent" jdbcType="REAL" />
    <result column="text" property="text" jdbcType="NVARCHAR" />
    <result column="text_x" property="textX" jdbcType="INTEGER" />
    <result column="text_y" property="textY" jdbcType="INTEGER" />
    <result column="text_color" property="textColor" jdbcType="NVARCHAR" />
    <result column="text_size" property="textSize" jdbcType="INTEGER" />
    <result column="text_rotation" property="textRotation" jdbcType="INTEGER" />
    <result column="is_img" property="isImg" jdbcType="SMALLINT" />
    <result column="download_is_img" property="downloadIsImg" jdbcType="SMALLINT" />
    <result column="img_file" property="imgFile" jdbcType="NVARCHAR" />
    <result column="img_width" property="imgWidth" jdbcType="INTEGER" />
    <result column="img_height" property="imgHeight" jdbcType="INTEGER" />
    <result column="img_x" property="imgX" jdbcType="INTEGER" />
    <result column="img_y" property="imgY" jdbcType="INTEGER" />
    <result column="unique_id" property="uniqueId" jdbcType="NVARCHAR" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, effective, download_effective, up_or_under, transparent, text, text_x, text_y, 
    text_color, text_size, text_rotation, is_img, download_is_img, img_file, img_width, 
    img_height, img_x, img_y, unique_id
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
    select
    <include refid="Base_Column_List" />
    from emr_pdf_water_set
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
    delete from emr_pdf_water_set
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.emr.entity.emrPdfWaterSet.EmrPdfWaterSet" >
    insert into emr_pdf_water_set (id, effective, download_effective, 
      up_or_under, transparent, text, 
      text_x, text_y, text_color, 
      text_size, text_rotation, is_img, 
      download_is_img, img_file, img_width, 
      img_height, img_x, img_y, 
      unique_id)
    values (#{id,jdbcType=INTEGER}, #{effective,jdbcType=SMALLINT}, #{downloadEffective,jdbcType=SMALLINT}, 
      #{upOrUnder,jdbcType=SMALLINT}, #{transparent,jdbcType=REAL}, #{text,jdbcType=NVARCHAR}, 
      #{textX,jdbcType=INTEGER}, #{textY,jdbcType=INTEGER}, #{textColor,jdbcType=NVARCHAR}, 
      #{textSize,jdbcType=INTEGER}, #{textRotation,jdbcType=INTEGER}, #{isImg,jdbcType=SMALLINT}, 
      #{downloadIsImg,jdbcType=SMALLINT}, #{imgFile,jdbcType=NVARCHAR}, #{imgWidth,jdbcType=INTEGER}, 
      #{imgHeight,jdbcType=INTEGER}, #{imgX,jdbcType=INTEGER}, #{imgY,jdbcType=INTEGER}, 
      #{uniqueId,jdbcType=NVARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.emr.entity.emrPdfWaterSet.EmrPdfWaterSet" >
    insert into emr_pdf_water_set
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        id,
      </if>
      <if test="effective != null" >
        effective,
      </if>
      <if test="downloadEffective != null" >
        download_effective,
      </if>
      <if test="upOrUnder != null" >
        up_or_under,
      </if>
      <if test="transparent != null" >
        transparent,
      </if>
      <if test="text != null" >
        text,
      </if>
      <if test="textX != null" >
        text_x,
      </if>
      <if test="textY != null" >
        text_y,
      </if>
      <if test="textColor != null" >
        text_color,
      </if>
      <if test="textSize != null" >
        text_size,
      </if>
      <if test="textRotation != null" >
        text_rotation,
      </if>
      <if test="isImg != null" >
        is_img,
      </if>
      <if test="downloadIsImg != null" >
        download_is_img,
      </if>
      <if test="imgFile != null" >
        img_file,
      </if>
      <if test="imgWidth != null" >
        img_width,
      </if>
      <if test="imgHeight != null" >
        img_height,
      </if>
      <if test="imgX != null" >
        img_x,
      </if>
      <if test="imgY != null" >
        img_y,
      </if>
      <if test="uniqueId != null" >
        unique_id,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=INTEGER},
      </if>
      <if test="effective != null" >
        #{effective,jdbcType=SMALLINT},
      </if>
      <if test="downloadEffective != null" >
        #{downloadEffective,jdbcType=SMALLINT},
      </if>
      <if test="upOrUnder != null" >
        #{upOrUnder,jdbcType=SMALLINT},
      </if>
      <if test="transparent != null" >
        #{transparent,jdbcType=REAL},
      </if>
      <if test="text != null" >
        #{text,jdbcType=NVARCHAR},
      </if>
      <if test="textX != null" >
        #{textX,jdbcType=INTEGER},
      </if>
      <if test="textY != null" >
        #{textY,jdbcType=INTEGER},
      </if>
      <if test="textColor != null" >
        #{textColor,jdbcType=NVARCHAR},
      </if>
      <if test="textSize != null" >
        #{textSize,jdbcType=INTEGER},
      </if>
      <if test="textRotation != null" >
        #{textRotation,jdbcType=INTEGER},
      </if>
      <if test="isImg != null" >
        #{isImg,jdbcType=SMALLINT},
      </if>
      <if test="downloadIsImg != null" >
        #{downloadIsImg,jdbcType=SMALLINT},
      </if>
      <if test="imgFile != null" >
        #{imgFile,jdbcType=NVARCHAR},
      </if>
      <if test="imgWidth != null" >
        #{imgWidth,jdbcType=INTEGER},
      </if>
      <if test="imgHeight != null" >
        #{imgHeight,jdbcType=INTEGER},
      </if>
      <if test="imgX != null" >
        #{imgX,jdbcType=INTEGER},
      </if>
      <if test="imgY != null" >
        #{imgY,jdbcType=INTEGER},
      </if>
      <if test="uniqueId != null" >
        #{uniqueId,jdbcType=NVARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.emr.entity.emrPdfWaterSet.EmrPdfWaterSet" >
    update emr_pdf_water_set
    <set >
      <if test="effective != null" >
        effective = #{effective,jdbcType=SMALLINT},
      </if>
      <if test="downloadEffective != null" >
        download_effective = #{downloadEffective,jdbcType=SMALLINT},
      </if>
      <if test="upOrUnder != null" >
        up_or_under = #{upOrUnder,jdbcType=SMALLINT},
      </if>
      <if test="transparent != null" >
        transparent = #{transparent,jdbcType=REAL},
      </if>
      <if test="text != null" >
        text = #{text,jdbcType=NVARCHAR},
      </if>
      <if test="textX != null" >
        text_x = #{textX,jdbcType=INTEGER},
      </if>
      <if test="textY != null" >
        text_y = #{textY,jdbcType=INTEGER},
      </if>
      <if test="textColor != null" >
        text_color = #{textColor,jdbcType=NVARCHAR},
      </if>
      <if test="textSize != null" >
        text_size = #{textSize,jdbcType=INTEGER},
      </if>
      <if test="textRotation != null" >
        text_rotation = #{textRotation,jdbcType=INTEGER},
      </if>
      <if test="isImg != null" >
        is_img = #{isImg,jdbcType=SMALLINT},
      </if>
      <if test="downloadIsImg != null" >
        download_is_img = #{downloadIsImg,jdbcType=SMALLINT},
      </if>
      <if test="imgFile != null" >
        img_file = #{imgFile,jdbcType=NVARCHAR},
      </if>
      <if test="imgWidth != null" >
        img_width = #{imgWidth,jdbcType=INTEGER},
      </if>
      <if test="imgHeight != null" >
        img_height = #{imgHeight,jdbcType=INTEGER},
      </if>
      <if test="imgX != null" >
        img_x = #{imgX,jdbcType=INTEGER},
      </if>
      <if test="imgY != null" >
        img_y = #{imgY,jdbcType=INTEGER},
      </if>
      <if test="uniqueId != null" >
        unique_id = #{uniqueId,jdbcType=NVARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.emr.entity.emrPdfWaterSet.EmrPdfWaterSet" >
    update emr_pdf_water_set
    set effective = #{effective,jdbcType=SMALLINT},
      download_effective = #{downloadEffective,jdbcType=SMALLINT},
      up_or_under = #{upOrUnder,jdbcType=SMALLINT},
      transparent = #{transparent,jdbcType=REAL},
      text = #{text,jdbcType=NVARCHAR},
      text_x = #{textX,jdbcType=INTEGER},
      text_y = #{textY,jdbcType=INTEGER},
      text_color = #{textColor,jdbcType=NVARCHAR},
      text_size = #{textSize,jdbcType=INTEGER},
      text_rotation = #{textRotation,jdbcType=INTEGER},
      is_img = #{isImg,jdbcType=SMALLINT},
      download_is_img = #{downloadIsImg,jdbcType=SMALLINT},
      img_file = #{imgFile,jdbcType=NVARCHAR},
      img_width = #{imgWidth,jdbcType=INTEGER},
      img_height = #{imgHeight,jdbcType=INTEGER},
      img_x = #{imgX,jdbcType=INTEGER},
      img_y = #{imgY,jdbcType=INTEGER},
      unique_id = #{uniqueId,jdbcType=NVARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>