DicConsultationTeamMapper.xml 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  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.sysservice.dao.mysqlmapper.DicConsultationTeamMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.sysservice.dao.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="INTEGER" />
  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, DCT_SORT
  23. </sql>
  24. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  25. select
  26. <include refid="Base_Column_List" />
  27. from dic_consultation_team
  28. where DCT_ID = #{dctId,jdbcType=INTEGER}
  29. </select>
  30. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  31. delete from dic_consultation_team
  32. where DCT_ID = #{dctId,jdbcType=INTEGER}
  33. </delete>
  34. <insert id="insert" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.DicConsultationTeam" >
  35. insert into dic_consultation_team (DCT_ID, HI_ID, DCT_Name,
  36. DCT_Recordor, DCT_Record_Time, DCT_IsDel,
  37. DCT_Type, DCT_PinyinCode, DCT_WubiCode,
  38. DCT_OtherCode, DCT_Ward, DCT_Dept,
  39. DCT_Consultation_Code, DCT_SORT)
  40. values (#{dctId,jdbcType=INTEGER}, #{hiId,jdbcType=INTEGER}, #{dctName,jdbcType=VARCHAR},
  41. #{dctRecordor,jdbcType=VARCHAR}, #{dctRecordTime,jdbcType=TIMESTAMP}, #{dctIsdel,jdbcType=INTEGER},
  42. #{dctType,jdbcType=INTEGER}, #{dctPinyincode,jdbcType=VARCHAR}, #{dctWubicode,jdbcType=VARCHAR},
  43. #{dctOthercode,jdbcType=VARCHAR}, #{dctWard,jdbcType=VARCHAR}, #{dctDept,jdbcType=VARCHAR},
  44. #{dctConsultationCode,jdbcType=VARCHAR}, #{dctSort,jdbcType=INTEGER})
  45. </insert>
  46. <insert id="insertSelective" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.DicConsultationTeam" >
  47. insert into dic_consultation_team
  48. <trim prefix="(" suffix=")" suffixOverrides="," >
  49. <if test="dctId != null" >
  50. DCT_ID,
  51. </if>
  52. <if test="hiId != null" >
  53. HI_ID,
  54. </if>
  55. <if test="dctName != null" >
  56. DCT_Name,
  57. </if>
  58. <if test="dctRecordor != null" >
  59. DCT_Recordor,
  60. </if>
  61. <if test="dctRecordTime != null" >
  62. DCT_Record_Time,
  63. </if>
  64. <if test="dctIsdel != null" >
  65. DCT_IsDel,
  66. </if>
  67. <if test="dctType != null" >
  68. DCT_Type,
  69. </if>
  70. <if test="dctPinyincode != null" >
  71. DCT_PinyinCode,
  72. </if>
  73. <if test="dctWubicode != null" >
  74. DCT_WubiCode,
  75. </if>
  76. <if test="dctOthercode != null" >
  77. DCT_OtherCode,
  78. </if>
  79. <if test="dctWard != null" >
  80. DCT_Ward,
  81. </if>
  82. <if test="dctDept != null" >
  83. DCT_Dept,
  84. </if>
  85. <if test="dctConsultationCode != null" >
  86. DCT_Consultation_Code,
  87. </if>
  88. <if test="dctSort != null" >
  89. DCT_SORT,
  90. </if>
  91. </trim>
  92. <trim prefix="values (" suffix=")" suffixOverrides="," >
  93. <if test="dctId != null" >
  94. #{dctId,jdbcType=INTEGER},
  95. </if>
  96. <if test="hiId != null" >
  97. #{hiId,jdbcType=INTEGER},
  98. </if>
  99. <if test="dctName != null" >
  100. #{dctName,jdbcType=VARCHAR},
  101. </if>
  102. <if test="dctRecordor != null" >
  103. #{dctRecordor,jdbcType=VARCHAR},
  104. </if>
  105. <if test="dctRecordTime != null" >
  106. #{dctRecordTime,jdbcType=TIMESTAMP},
  107. </if>
  108. <if test="dctIsdel != null" >
  109. #{dctIsdel,jdbcType=INTEGER},
  110. </if>
  111. <if test="dctType != null" >
  112. #{dctType,jdbcType=INTEGER},
  113. </if>
  114. <if test="dctPinyincode != null" >
  115. #{dctPinyincode,jdbcType=VARCHAR},
  116. </if>
  117. <if test="dctWubicode != null" >
  118. #{dctWubicode,jdbcType=VARCHAR},
  119. </if>
  120. <if test="dctOthercode != null" >
  121. #{dctOthercode,jdbcType=VARCHAR},
  122. </if>
  123. <if test="dctWard != null" >
  124. #{dctWard,jdbcType=VARCHAR},
  125. </if>
  126. <if test="dctDept != null" >
  127. #{dctDept,jdbcType=VARCHAR},
  128. </if>
  129. <if test="dctConsultationCode != null" >
  130. #{dctConsultationCode,jdbcType=VARCHAR},
  131. </if>
  132. <if test="dctSort != null" >
  133. #{dctSort,jdbcType=INTEGER},
  134. </if>
  135. </trim>
  136. </insert>
  137. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.DicConsultationTeam" >
  138. update dic_consultation_team
  139. <set >
  140. <if test="hiId != null" >
  141. HI_ID = #{hiId,jdbcType=INTEGER},
  142. </if>
  143. <if test="dctName != null" >
  144. DCT_Name = #{dctName,jdbcType=VARCHAR},
  145. </if>
  146. <if test="dctRecordor != null" >
  147. DCT_Recordor = #{dctRecordor,jdbcType=VARCHAR},
  148. </if>
  149. <if test="dctRecordTime != null" >
  150. DCT_Record_Time = #{dctRecordTime,jdbcType=TIMESTAMP},
  151. </if>
  152. <if test="dctIsdel != null" >
  153. DCT_IsDel = #{dctIsdel,jdbcType=INTEGER},
  154. </if>
  155. <if test="dctType != null" >
  156. DCT_Type = #{dctType,jdbcType=INTEGER},
  157. </if>
  158. <if test="dctPinyincode != null" >
  159. DCT_PinyinCode = #{dctPinyincode,jdbcType=VARCHAR},
  160. </if>
  161. <if test="dctWubicode != null" >
  162. DCT_WubiCode = #{dctWubicode,jdbcType=VARCHAR},
  163. </if>
  164. <if test="dctOthercode != null" >
  165. DCT_OtherCode = #{dctOthercode,jdbcType=VARCHAR},
  166. </if>
  167. <if test="dctWard != null" >
  168. DCT_Ward = #{dctWard,jdbcType=VARCHAR},
  169. </if>
  170. <if test="dctDept != null" >
  171. DCT_Dept = #{dctDept,jdbcType=VARCHAR},
  172. </if>
  173. <if test="dctConsultationCode != null" >
  174. DCT_Consultation_Code = #{dctConsultationCode,jdbcType=VARCHAR},
  175. </if>
  176. <if test="dctSort != null" >
  177. DCT_SORT = #{dctSort,jdbcType=INTEGER},
  178. </if>
  179. </set>
  180. where DCT_ID = #{dctId,jdbcType=INTEGER}
  181. </update>
  182. <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.DicConsultationTeam" >
  183. update dic_consultation_team
  184. set HI_ID = #{hiId,jdbcType=INTEGER},
  185. DCT_Name = #{dctName,jdbcType=VARCHAR},
  186. DCT_Recordor = #{dctRecordor,jdbcType=VARCHAR},
  187. DCT_Record_Time = #{dctRecordTime,jdbcType=TIMESTAMP},
  188. DCT_IsDel = #{dctIsdel,jdbcType=INTEGER},
  189. DCT_Type = #{dctType,jdbcType=INTEGER},
  190. DCT_PinyinCode = #{dctPinyincode,jdbcType=VARCHAR},
  191. DCT_WubiCode = #{dctWubicode,jdbcType=VARCHAR},
  192. DCT_OtherCode = #{dctOthercode,jdbcType=VARCHAR},
  193. DCT_Ward = #{dctWard,jdbcType=VARCHAR},
  194. DCT_Dept = #{dctDept,jdbcType=VARCHAR},
  195. DCT_Consultation_Code = #{dctConsultationCode,jdbcType=VARCHAR},
  196. DCT_SORT = #{dctSort,jdbcType=INTEGER}
  197. where DCT_ID = #{dctId,jdbcType=INTEGER}
  198. </update>
  199. <select id="selectBySelective" resultMap="BaseResultMap" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.DicConsultationTeam" >
  200. SELECT
  201. <include refid="Base_Column_List" />
  202. FROM dic_consultation_team
  203. WHERE DCT_IsDel = 0
  204. <if test="hiId != null" >
  205. AND HI_ID = #{hiId,jdbcType=INTEGER}
  206. </if>
  207. <if test="dctName != null" >
  208. AND DCT_Name = #{dctName,jdbcType=VARCHAR}
  209. </if>
  210. <if test="dctConsultationCode != null" >
  211. AND DCT_Consultation_Code = #{dctConsultationCode,jdbcType=VARCHAR}
  212. </if>
  213. ORDER BY DCT_SORT ASC
  214. </select>
  215. <select id="selectBySearchKey" resultMap="BaseResultMap">
  216. SELECT
  217. <include refid="Base_Column_List" />
  218. FROM dic_consultation_team
  219. WHERE DCT_IsDel = 0
  220. <if test="hiId != null" >
  221. AND HI_ID = #{hiId,jdbcType=INTEGER}
  222. </if>
  223. <if test="searchKey != null" >
  224. AND (DCT_Consultation_Code = #{searchKey,jdbcType=VARCHAR} OR DCT_Name = #{searchKey,jdbcType=VARCHAR})
  225. </if>
  226. ORDER BY DCT_SORT ASC
  227. </select>
  228. </mapper>