DicCatheterMapper.xml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  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.DicCatheterMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.DicCatheter" >
  5. <id column="DC_ID" property="dcId" jdbcType="INTEGER" />
  6. <result column="HI_ID" property="hiId" jdbcType="INTEGER" />
  7. <result column="DC_Catheter_Name" property="dcCatheterName" jdbcType="VARCHAR" />
  8. <result column="DC_PinyinCode" property="dcPinyincode" jdbcType="VARCHAR" />
  9. <result column="DC_WubiCode" property="dcWubicode" jdbcType="VARCHAR" />
  10. <result column="DC_OtherCode" property="dcOthercode" jdbcType="VARCHAR" />
  11. <result column="DC_Sort" property="dcSort" jdbcType="INTEGER" />
  12. <result column="DC_Material" property="dcMaterial" jdbcType="VARCHAR" />
  13. <result column="DC_Way" property="dcWay" jdbcType="VARCHAR" />
  14. <result column="DC_Category" property="dcCategory" jdbcType="VARCHAR" />
  15. <result column="DC_Valid_Time" property="dcValidTime" jdbcType="INTEGER" />
  16. <result column="DC_IsDel" property="dcIsdel" jdbcType="INTEGER" />
  17. <result column="DC_IsVein" property="dcIsVein" jdbcType="INTEGER" />
  18. <result column="DC_Crisis" property="dcCrisis" jdbcType="INTEGER" />
  19. </resultMap>
  20. <sql id="Base_Column_List" >
  21. DC_ID, HI_ID, DC_Catheter_Name, DC_PinyinCode, DC_WubiCode, DC_OtherCode,
  22. DC_Sort, DC_Material, DC_Way, DC_Category, DC_Valid_Time, DC_IsDel, DC_IsVein, DC_Crisis
  23. </sql>
  24. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  25. select
  26. <include refid="Base_Column_List" />
  27. from dic_catheter
  28. where DC_IsDel = 0 and DC_ID = #{dcId,jdbcType=INTEGER}
  29. </select>
  30. <select id="selectIds" resultMap="BaseResultMap" parameterType="List" >
  31. select
  32. <include refid="Base_Column_List" />
  33. from dic_catheter
  34. where DC_IsDel = 0 and DC_ID in
  35. <foreach collection="list" item="item" index="index" separator="," open="(" close=")">
  36. #{item,jdbcType=INTEGER}
  37. </foreach>
  38. order by DC_Sort desc
  39. </select>
  40. <select id="selectAll" resultMap="BaseResultMap">
  41. select
  42. <include refid="Base_Column_List" />
  43. from dic_catheter
  44. where DC_IsDel = 0 and HI_ID = #{hiId,jdbcType=INTEGER}
  45. order by DC_Sort desc
  46. </select>
  47. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  48. delete from dic_catheter
  49. where DC_ID = #{dcId,jdbcType=INTEGER}
  50. </delete>
  51. <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicCatheter" >
  52. insert into dic_catheter
  53. <trim prefix="(" suffix=")" suffixOverrides="," >
  54. <if test="dcId != null" >
  55. DC_ID,
  56. </if>
  57. <if test="hiId != null" >
  58. HI_ID,
  59. </if>
  60. <if test="dcCatheterName != null" >
  61. DC_Catheter_Name,
  62. </if>
  63. <if test="dcPinyincode != null" >
  64. DC_PinyinCode,
  65. </if>
  66. <if test="dcWubicode != null" >
  67. DC_WubiCode,
  68. </if>
  69. <if test="dcOthercode != null" >
  70. DC_OtherCode,
  71. </if>
  72. <if test="dcSort != null" >
  73. DC_Sort,
  74. </if>
  75. <if test="dcMaterial != null" >
  76. DC_Material,
  77. </if>
  78. <if test="dcWay != null" >
  79. DC_Way,
  80. </if>
  81. <if test="dcCategory != null" >
  82. DC_Category,
  83. </if>
  84. <if test="dcValidTime != null" >
  85. DC_Valid_Time,
  86. </if>
  87. <if test="dcIsdel != null" >
  88. DC_IsDel,
  89. </if>
  90. </trim>
  91. <trim prefix="values (" suffix=")" suffixOverrides="," >
  92. <if test="dcId != null" >
  93. #{dcId,jdbcType=INTEGER},
  94. </if>
  95. <if test="hiId != null" >
  96. #{hiId,jdbcType=INTEGER},
  97. </if>
  98. <if test="dcCatheterName != null" >
  99. #{dcCatheterName,jdbcType=VARCHAR},
  100. </if>
  101. <if test="dcPinyincode != null" >
  102. #{dcPinyincode,jdbcType=VARCHAR},
  103. </if>
  104. <if test="dcWubicode != null" >
  105. #{dcWubicode,jdbcType=VARCHAR},
  106. </if>
  107. <if test="dcOthercode != null" >
  108. #{dcOthercode,jdbcType=VARCHAR},
  109. </if>
  110. <if test="dcSort != null" >
  111. #{dcSort,jdbcType=INTEGER},
  112. </if>
  113. <if test="dcMaterial != null" >
  114. #{dcMaterial,jdbcType=VARCHAR},
  115. </if>
  116. <if test="dcWay != null" >
  117. #{dcWay,jdbcType=VARCHAR},
  118. </if>
  119. <if test="dcCategory != null" >
  120. #{dcCategory,jdbcType=VARCHAR},
  121. </if>
  122. <if test="dcValidTime != null" >
  123. #{dcValidTime,jdbcType=INTEGER},
  124. </if>
  125. <if test="dcIsdel != null" >
  126. #{dcIsdel,jdbcType=INTEGER},
  127. </if>
  128. </trim>
  129. </insert>
  130. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicCatheter" >
  131. update dic_catheter
  132. <set >
  133. <if test="hiId != null" >
  134. HI_ID = #{hiId,jdbcType=INTEGER},
  135. </if>
  136. <if test="dcCatheterName != null" >
  137. DC_Catheter_Name = #{dcCatheterName,jdbcType=VARCHAR},
  138. </if>
  139. <if test="dcPinyincode != null" >
  140. DC_PinyinCode = #{dcPinyincode,jdbcType=VARCHAR},
  141. </if>
  142. <if test="dcWubicode != null" >
  143. DC_WubiCode = #{dcWubicode,jdbcType=VARCHAR},
  144. </if>
  145. <if test="dcOthercode != null" >
  146. DC_OtherCode = #{dcOthercode,jdbcType=VARCHAR},
  147. </if>
  148. <if test="dcSort != null" >
  149. DC_Sort = #{dcSort,jdbcType=INTEGER},
  150. </if>
  151. <if test="dcMaterial != null" >
  152. DC_Material = #{dcMaterial,jdbcType=VARCHAR},
  153. </if>
  154. <if test="dcWay != null" >
  155. DC_Way = #{dcWay,jdbcType=VARCHAR},
  156. </if>
  157. <if test="dcCategory != null" >
  158. DC_Category = #{dcCategory,jdbcType=VARCHAR},
  159. </if>
  160. <if test="dcValidTime != null" >
  161. DC_Valid_Time = #{dcValidTime,jdbcType=INTEGER},
  162. </if>
  163. <if test="dcIsdel != null" >
  164. DC_IsDel = #{dcIsdel,jdbcType=INTEGER},
  165. </if>
  166. </set>
  167. where DC_ID = #{dcId,jdbcType=INTEGER}
  168. </update>
  169. <select id="selectListByHiId" resultMap="BaseResultMap">
  170. select
  171. <include refid="Base_Column_List" />
  172. from dic_catheter
  173. where DC_IsDel = 0
  174. and HI_ID = #{hiId,jdbcType=INTEGER}
  175. <if test="dcIsVein != null">
  176. and DC_IsVein = #{dcIsVein,jdbcType=INTEGER}
  177. </if>
  178. order by DC_Sort
  179. </select>
  180. </mapper>