DicConsultationTeamMapper.xml 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  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.DicConsultationTeamMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.DicConsultationTeam" >
  5. <id column="DCT_ID" property="dctId" jdbcType="INTEGER" />
  6. <result column="HI_ID" property="hiId" jdbcType="INTEGER" />
  7. <result column="DCT_Name" property="dctName" jdbcType="VARCHAR" />
  8. <result column="DCT_Recordor" property="dctRecordor" jdbcType="VARCHAR" />
  9. <result column="DCT_Record_Time" property="dctRecordTime" jdbcType="TIMESTAMP" />
  10. <result column="DCT_IsDel" property="dctIsdel" jdbcType="INTEGER" />
  11. <result column="DCT_Type" property="dctType" jdbcType="INTEGER" />
  12. <result column="DCT_PinyinCode" property="dctPinyincode" jdbcType="VARCHAR" />
  13. <result column="DCT_WubiCode" property="dctWubicode" jdbcType="VARCHAR" />
  14. <result column="DCT_OtherCode" property="dctOthercode" jdbcType="VARCHAR" />
  15. <result column="DCT_Ward" property="dctWard" jdbcType="VARCHAR" />
  16. <result column="DCT_Dept" property="dctDept" jdbcType="VARCHAR" />
  17. <result column="DCT_Consultation_Code" property="dctConsultationCode" jdbcType="VARCHAR" />
  18. <result column="DCT_SORT" property="dctSort" jdbcType="VARCHAR" />
  19. </resultMap>
  20. <sql id="Base_Column_List" >
  21. DCT_ID, HI_ID, DCT_Name, DCT_Recordor, DCT_Record_Time, DCT_IsDel, DCT_Type, DCT_PinyinCode,
  22. DCT_WubiCode, DCT_OtherCode, DCT_Ward, DCT_Dept, DCT_Consultation_Code
  23. </sql>
  24. <select id="selectByType" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  25. select
  26. <include refid="Base_Column_List" />
  27. from dic_consultation_team
  28. where DCT_IsDel = 0 and DCT_Type = #{type,jdbcType=INTEGER}
  29. order by DCT_SORT
  30. </select>
  31. <select id="selectAll" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  32. select
  33. <include refid="Base_Column_List" />
  34. from dic_consultation_team
  35. where DCT_IsDel = 0 and HI_ID = #{hiId,jdbcType=INTEGER}
  36. </select>
  37. <select id="selectByIds" resultMap="BaseResultMap">
  38. select
  39. <include refid="Base_Column_List" />
  40. from dic_consultation_team
  41. where DCT_IsDel = 0 and DCT_ID
  42. in <foreach collection="list" open="(" close=")" item="item" index="index" separator=",">
  43. #{item,jdbcType=INTEGER}
  44. </foreach>
  45. </select>
  46. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  47. select
  48. <include refid="Base_Column_List" />
  49. from dic_consultation_team
  50. where DCT_IsDel = 0 and DCT_ID = #{dctId,jdbcType=INTEGER}
  51. </select>
  52. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  53. delete from dic_consultation_team
  54. where DCT_ID = #{dctId,jdbcType=INTEGER}
  55. </delete>
  56. <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicConsultationTeam" >
  57. insert into dic_consultation_team (DCT_ID, HI_ID, DCT_Name,
  58. DCT_Recordor, DCT_Record_Time,
  59. DCT_IsDel, DCT_Type, DCT_PinyinCode, DCT_WubiCode,
  60. DCT_OtherCode, DCT_Ward, DCT_Dept, DCT_Consultation_Code)
  61. values (#{dctId,jdbcType=INTEGER}, #{hiId,jdbcType=INTEGER}, #{dctName,jdbcType=VARCHAR},
  62. #{dctRecordor,jdbcType=VARCHAR}, #{dctRecordTime,jdbcType=TIMESTAMP},
  63. #{dctIsdel,jdbcType=INTEGER}, #{dctType,jdbcType=INTEGER}, #{dctPinyincode,jdbcType=VARCHAR}, #{dctWubicode,jdbcType=VARCHAR},
  64. #{dctOthercode,jdbcType=VARCHAR}, #{dctWard,jdbcType=VARCHAR}, #{dctDept,jdbcType=VARCHAR}, #{dctConsultationCode,jdbcType=VARCHAR})
  65. </insert>
  66. <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicConsultationTeam" >
  67. insert into dic_consultation_team
  68. <trim prefix="(" suffix=")" suffixOverrides="," >
  69. <if test="dctId != null" >
  70. DCT_ID,
  71. </if>
  72. <if test="hiId != null" >
  73. HI_ID,
  74. </if>
  75. <if test="dctName != null" >
  76. DCT_Name,
  77. </if>
  78. <if test="dctRecordor != null" >
  79. DCT_Recordor,
  80. </if>
  81. <if test="dctRecordTime != null" >
  82. DCT_Record_Time,
  83. </if>
  84. <if test="dctIsdel != null" >
  85. DCT_IsDel,
  86. </if>
  87. <if test="dctType != null" >
  88. DCT_Type,
  89. </if>
  90. <if test="dctPinyincode != null" >
  91. DCT_PinyinCode,
  92. </if>
  93. <if test="dctWubicode != null" >
  94. DCT_WubiCode,
  95. </if>
  96. <if test="dctOthercode != null" >
  97. DCT_OtherCode,
  98. </if>
  99. <if test="dctWard != null" >
  100. DCT_Ward,
  101. </if>
  102. <if test="dctDept != null" >
  103. DCT_Dept,
  104. </if>
  105. <if test="dctConsultationCode != null" >
  106. DCT_Consultation_Code,
  107. </if>
  108. </trim>
  109. <trim prefix="values (" suffix=")" suffixOverrides="," >
  110. <if test="dctId != null" >
  111. #{dctId,jdbcType=INTEGER},
  112. </if>
  113. <if test="hiId != null" >
  114. #{hiId,jdbcType=INTEGER},
  115. </if>
  116. <if test="dctName != null" >
  117. #{dctName,jdbcType=VARCHAR},
  118. </if>
  119. <if test="dctRecordor != null" >
  120. #{dctRecordor,jdbcType=VARCHAR},
  121. </if>
  122. <if test="dctRecordTime != null" >
  123. #{dctRecordTime,jdbcType=TIMESTAMP},
  124. </if>
  125. <if test="dctIsdel != null" >
  126. #{dctIsdel,jdbcType=INTEGER},
  127. </if>
  128. <if test="dctType != null" >
  129. #{dctType,jdbcType=INTEGER},
  130. </if>
  131. <if test="dctPinyincode != null" >
  132. #{dctPinyincode,jdbcType=VARCHAR},
  133. </if>
  134. <if test="dctWubicode != null" >
  135. #{dctWubicode,jdbcType=VARCHAR},
  136. </if>
  137. <if test="dctOthercode != null" >
  138. #{dctOthercode,jdbcType=VARCHAR},
  139. </if>
  140. <if test="dctWard != null" >
  141. #{dctWard,jdbcType=VARCHAR},
  142. </if>
  143. <if test="dctDept != null" >
  144. #{dctDept,jdbcType=VARCHAR},
  145. </if>
  146. <if test="dctConsultationCode != null" >
  147. #{dctConsultationCode,jdbcType=VARCHAR},
  148. </if>
  149. </trim>
  150. </insert>
  151. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicConsultationTeam" >
  152. update dic_consultation_team
  153. <set >
  154. <if test="hiId != null" >
  155. HI_ID = #{hiId,jdbcType=INTEGER},
  156. </if>
  157. <if test="dctName != null" >
  158. DCT_Name = #{dctName,jdbcType=VARCHAR},
  159. </if>
  160. <if test="dctRecordor != null" >
  161. DCT_Recordor = #{dctRecordor,jdbcType=VARCHAR},
  162. </if>
  163. <if test="dctRecordTime != null" >
  164. DCT_Record_Time = #{dctRecordTime,jdbcType=TIMESTAMP},
  165. </if>
  166. <if test="dctIsdel != null" >
  167. DCT_IsDel = #{dctIsdel,jdbcType=INTEGER},
  168. </if>
  169. <if test="dctType != null" >
  170. DCT_Type = #{dctType,jdbcType=INTEGER},
  171. </if>
  172. <if test="dctPinyincode != null" >
  173. DCT_PinyinCode = #{dctPinyincode,jdbcType=VARCHAR},
  174. </if>
  175. <if test="dctWubicode != null" >
  176. DCT_WubiCode = #{dctWubicode,jdbcType=VARCHAR},
  177. </if>
  178. <if test="dctOthercode != null" >
  179. DCT_OtherCode = #{dctOthercode,jdbcType=VARCHAR},
  180. </if>
  181. <if test="dctWard != null" >
  182. DCT_Ward = #{dctWard,jdbcType=VARCHAR},
  183. </if>
  184. <if test="dctDept != null" >
  185. DCT_Dept = #{dctDept,jdbcType=VARCHAR},
  186. </if>
  187. <if test="dctConsultationCode != null" >
  188. DCT_Consultation_Code = #{dctConsultationCode,jdbcType=VARCHAR},
  189. </if>
  190. </set>
  191. where DCT_ID = #{dctId,jdbcType=INTEGER}
  192. </update>
  193. <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicConsultationTeam" >
  194. update dic_consultation_team
  195. set HI_ID = #{hiId,jdbcType=INTEGER},
  196. DCT_Name = #{dctName,jdbcType=VARCHAR},
  197. DCT_Recordor = #{dctRecordor,jdbcType=VARCHAR},
  198. DCT_Record_Time = #{dctRecordTime,jdbcType=TIMESTAMP},
  199. DCT_IsDel = #{dctIsdel,jdbcType=INTEGER},
  200. DCT_Type = #{dctType,jdbcType=INTEGER},
  201. DCT_PinyinCode = #{dctPinyincode,jdbcType=VARCHAR},
  202. DCT_WubiCode = #{dctWubicode,jdbcType=VARCHAR},
  203. DCT_OtherCode = #{dctOthercode,jdbcType=VARCHAR},
  204. DCT_Ward = #{dctWard,jdbcType=VARCHAR},
  205. DCT_Dept = #{dctDept,jdbcType=VARCHAR},
  206. DCT_Consultation_Code = #{dctConsultationCode,jdbcType=VARCHAR}
  207. where DCT_ID = #{dctId,jdbcType=INTEGER}
  208. </update>
  209. </mapper>