InpConsulationDetailMapper.xml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3. <mapper namespace="com.xinxin.topro.inpnurseservice.mysqlmapper.InpConsulationDetailMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpConsulationDetail" >
  5. <id column="ICD_ID" property="icdId" jdbcType="INTEGER" />
  6. <result column="ICO_ID" property="icoId" jdbcType="INTEGER" />
  7. <result column="ICD_Code" property="icdCode" jdbcType="VARCHAR" />
  8. <result column="ICD_Name" property="icdName" jdbcType="VARCHAR" />
  9. <result column="ICD_Value" property="icdValue" jdbcType="VARCHAR" />
  10. <result column="ICD_Category_Name" property="icdCategoryName" jdbcType="VARCHAR" />
  11. </resultMap>
  12. <sql id="Base_Column_List" >
  13. ICD_ID, ICO_ID, ICD_Code, ICD_Name, ICD_Value, ICD_Category_Name
  14. </sql>
  15. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  16. select
  17. <include refid="Base_Column_List" />
  18. from inp_consulation_detail
  19. where ICD_ID = #{icdId,jdbcType=INTEGER}
  20. </select>
  21. <select id="selectByIcoId" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  22. select
  23. <include refid="Base_Column_List" />
  24. from inp_consulation_detail
  25. where ICO_ID = #{icoId,jdbcType=INTEGER}
  26. </select>
  27. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  28. delete from inp_consulation_detail
  29. where ICD_ID = #{icdId,jdbcType=INTEGER}
  30. </delete>
  31. <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpConsulationDetail" >
  32. insert into inp_consulation_detail (ICD_ID, ICO_ID, ICD_Code,
  33. ICD_Name, ICD_Value, ICD_Category_Name
  34. )
  35. values (#{icdId,jdbcType=INTEGER}, #{icoId,jdbcType=INTEGER}, #{icdCode,jdbcType=VARCHAR},
  36. #{icdName,jdbcType=VARCHAR}, #{icdValue,jdbcType=VARCHAR}, #{icdCategoryName,jdbcType=VARCHAR}
  37. )
  38. </insert>
  39. <insert id="batchInsert" parameterType="java.util.List" >
  40. insert into inp_consulation_detail (ICO_ID, ICD_Code,
  41. ICD_Name, ICD_Value, ICD_Category_Name)
  42. values
  43. <foreach collection="list" item="item" separator="," index="index">
  44. (#{item.icoId,jdbcType=INTEGER}, #{item.icdCode,jdbcType=VARCHAR},
  45. #{item.icdName,jdbcType=VARCHAR}, #{item.icdValue,jdbcType=VARCHAR}, #{item.icdCategoryName,jdbcType=VARCHAR})
  46. </foreach>
  47. </insert>
  48. <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpConsulationDetail" >
  49. insert into inp_consulation_detail
  50. <trim prefix="(" suffix=")" suffixOverrides="," >
  51. <if test="icdId != null" >
  52. ICD_ID,
  53. </if>
  54. <if test="icoId != null" >
  55. ICO_ID,
  56. </if>
  57. <if test="icdCode != null" >
  58. ICD_Code,
  59. </if>
  60. <if test="icdName != null" >
  61. ICD_Name,
  62. </if>
  63. <if test="icdValue != null" >
  64. ICD_Value,
  65. </if>
  66. <if test="icdCategoryName != null" >
  67. ICD_Category_Name,
  68. </if>
  69. </trim>
  70. <trim prefix="values (" suffix=")" suffixOverrides="," >
  71. <if test="icdId != null" >
  72. #{icdId,jdbcType=INTEGER},
  73. </if>
  74. <if test="icoId != null" >
  75. #{icoId,jdbcType=INTEGER},
  76. </if>
  77. <if test="icdCode != null" >
  78. #{icdCode,jdbcType=VARCHAR},
  79. </if>
  80. <if test="icdName != null" >
  81. #{icdName,jdbcType=VARCHAR},
  82. </if>
  83. <if test="icdValue != null" >
  84. #{icdValue,jdbcType=VARCHAR},
  85. </if>
  86. <if test="icdCategoryName != null" >
  87. #{icdCategoryName,jdbcType=VARCHAR},
  88. </if>
  89. </trim>
  90. </insert>
  91. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpConsulationDetail" >
  92. update inp_consulation_detail
  93. <set >
  94. <if test="icoId != null" >
  95. ICO_ID = #{icoId,jdbcType=INTEGER},
  96. </if>
  97. <if test="icdCode != null" >
  98. ICD_Code = #{icdCode,jdbcType=VARCHAR},
  99. </if>
  100. <if test="icdName != null" >
  101. ICD_Name = #{icdName,jdbcType=VARCHAR},
  102. </if>
  103. <if test="icdValue != null" >
  104. ICD_Value = #{icdValue,jdbcType=VARCHAR},
  105. </if>
  106. <if test="icdCategoryName != null" >
  107. ICD_Category_Name = #{icdCategoryName,jdbcType=VARCHAR},
  108. </if>
  109. </set>
  110. where ICD_ID = #{icdId,jdbcType=INTEGER}
  111. </update>
  112. <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpConsulationDetail" >
  113. update inp_consulation_detail
  114. set ICO_ID = #{icoId,jdbcType=INTEGER},
  115. ICD_Code = #{icdCode,jdbcType=VARCHAR},
  116. ICD_Name = #{icdName,jdbcType=VARCHAR},
  117. ICD_Value = #{icdValue,jdbcType=VARCHAR},
  118. ICD_Category_Name = #{icdCategoryName,jdbcType=VARCHAR}
  119. where ICD_ID = #{icdId,jdbcType=INTEGER}
  120. </update>
  121. </mapper>