<?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.zdDictionary.ZdDisDiagStatusMapper" >
  <resultMap id="BaseResultMap" type="com.emr.entity.zdDictionary.ZdDisDiagStatus" >
    <result column="code" property="code" jdbcType="CHAR" />
    <result column="name" property="name" jdbcType="CHAR" />
    <result column="py_code" property="pyCode" jdbcType="CHAR" />
    <result column="d_code" property="dCode" jdbcType="CHAR" />
  </resultMap>
  <insert id="insert" parameterType="com.emr.entity.zdDictionary.ZdDisDiagStatus" >
    insert into zd_dis_diag_status (code, name, py_code, d_code
      )
    values (#{code,jdbcType=CHAR}, #{name,jdbcType=CHAR}, #{pyCode,jdbcType=CHAR}, #{dCode,jdbcType=CHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.emr.entity.zdDictionary.ZdDisDiagStatus" >
    insert into zd_dis_diag_status
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="code != null" >
        code,
      </if>
      <if test="name != null" >
        name,
      </if>
      <if test="pyCode != null" >
        py_code,
      </if>
      <if test="dCode != null" >
        d_code,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="code != null" >
        #{code,jdbcType=CHAR},
      </if>
      <if test="name != null" >
        #{name,jdbcType=CHAR},
      </if>
      <if test="pyCode != null" >
        #{pyCode,jdbcType=CHAR},
      </if>
      <if test="dCode != null" >
        #{dCode,jdbcType=CHAR},
      </if>
    </trim>
  </insert>
  <select id="selectAll" resultMap="BaseResultMap">
      select code,name from zd_dis_diag_status
  </select>
</mapper>