SysHospitalInfoMapper.xml 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  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.common.dao.mysqlmapper.SysHospitalInfoMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.common.dao.mysqlmodel.SysHospitalInfo" >
  5. <id column="HI_ID" property="hiId" jdbcType="INTEGER" />
  6. <result column="HI_Name" property="hiName" jdbcType="VARCHAR" />
  7. <result column="HI_ShortName" property="hiShortName" jdbcType="VARCHAR" />
  8. <result column="HI_FullName" property="hiFullName" jdbcType="VARCHAR" />
  9. <result column="HI_Address" property="hiAddress" jdbcType="VARCHAR" />
  10. <result column="HI_Tel" property="hiTel" jdbcType="VARCHAR" />
  11. <result column="HI_Intro" property="hiIntro" jdbcType="VARCHAR" />
  12. <result column="HI_PinyinCode" property="hiPinyinCode" jdbcType="VARCHAR" />
  13. <result column="HI_WubiCode" property="hiWubiCode" jdbcType="VARCHAR" />
  14. <result column="HI_OtherCode" property="hiOtherCode" jdbcType="VARCHAR" />
  15. <result column="HI_ISDel" property="hiIsDel" jdbcType="INTEGER" />
  16. <result column="HI_SupID" property="hiSupId" jdbcType="INTEGER" />
  17. <result column="HI_Auth_Code" property="hiAuthCode" jdbcType="VARCHAR" />
  18. <result column="HI_Active_Time" property="hiActiveTime" jdbcType="TIMESTAMP" />
  19. <result column="HI_Aging_Time" property="hiAgingTime" jdbcType="TIMESTAMP" />
  20. </resultMap>
  21. <sql id="Base_Column_List" >
  22. HI_ID, HI_Name, HI_ShortName, HI_FullName, HI_Address, HI_Tel, HI_Intro, HI_PinyinCode,
  23. HI_WubiCode, HI_OtherCode, HI_ISDel, HI_SupID, HI_Auth_Code, HI_Active_Time, HI_Aging_Time
  24. </sql>
  25. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  26. select
  27. <include refid="Base_Column_List" />
  28. from sys_hospitalinfo
  29. where HI_ID = #{hiId,jdbcType=INTEGER}
  30. </select>
  31. <insert id="insert" parameterType="com.xinxin.topro.common.dao.mysqlmodel.SysHospitalInfo" >
  32. insert into sys_hospitalinfo (HI_ID, HI_Name, HI_ShortName,
  33. HI_FullName, HI_Address, HI_Tel,
  34. HI_Intro, HI_PinyinCode, HI_WubiCode,
  35. HI_OtherCode, HI_ISDel, HI_SupID,
  36. HI_Auth_Code, HI_Active_Time, HI_Aging_Time
  37. )
  38. values (#{hiId,jdbcType=INTEGER}, #{hiName,jdbcType=VARCHAR}, #{hiShortName,jdbcType=VARCHAR},
  39. #{hiFullName,jdbcType=VARCHAR}, #{hiAddress,jdbcType=VARCHAR}, #{hiTel,jdbcType=VARCHAR},
  40. #{hiIntro,jdbcType=VARCHAR}, #{hiPinyinCode,jdbcType=VARCHAR}, #{hiWubiCode,jdbcType=VARCHAR},
  41. #{hiOtherCode,jdbcType=VARCHAR}, #{hiIsDel,jdbcType=INTEGER}, #{hiSupId,jdbcType=INTEGER},
  42. #{hiAuthCode,jdbcType=VARCHAR}, #{hiActiveTime,jdbcType=TIMESTAMP}, #{hiAgingTime,jdbcType=TIMESTAMP}
  43. )
  44. </insert>
  45. <insert id="insertSelective" parameterType="com.xinxin.topro.common.dao.mysqlmodel.SysHospitalInfo" >
  46. insert into sys_hospitalinfo
  47. <trim prefix="(" suffix=")" suffixOverrides="," >
  48. <if test="hiId != null" >
  49. HI_ID,
  50. </if>
  51. <if test="hiName != null" >
  52. HI_Name,
  53. </if>
  54. <if test="hiShortName != null" >
  55. HI_ShortName,
  56. </if>
  57. <if test="hiFullName != null" >
  58. HI_FullName,
  59. </if>
  60. <if test="hiAddress != null" >
  61. HI_Address,
  62. </if>
  63. <if test="hiTel != null" >
  64. HI_Tel,
  65. </if>
  66. <if test="hiIntro != null" >
  67. HI_Intro,
  68. </if>
  69. <if test="hiPinyinCode != null" >
  70. HI_PinyinCode,
  71. </if>
  72. <if test="hiWubiCode != null" >
  73. HI_WubiCode,
  74. </if>
  75. <if test="hiOtherCode != null" >
  76. HI_OtherCode,
  77. </if>
  78. <if test="hiIsDel != null" >
  79. HI_ISDel,
  80. </if>
  81. <if test="hiSupId != null" >
  82. HI_SupID,
  83. </if>
  84. <if test="hiAuthCode != null" >
  85. HI_Auth_Code,
  86. </if>
  87. <if test="hiActiveTime != null" >
  88. HI_Active_Time,
  89. </if>
  90. <if test="hiAgingTime != null" >
  91. HI_Aging_Time,
  92. </if>
  93. </trim>
  94. <trim prefix="values (" suffix=")" suffixOverrides="," >
  95. <if test="hiId != null" >
  96. #{hiId,jdbcType=INTEGER},
  97. </if>
  98. <if test="hiName != null" >
  99. #{hiName,jdbcType=VARCHAR},
  100. </if>
  101. <if test="hiShortName != null" >
  102. #{hiShortName,jdbcType=VARCHAR},
  103. </if>
  104. <if test="hiFullName != null" >
  105. #{hiFullName,jdbcType=VARCHAR},
  106. </if>
  107. <if test="hiAddress != null" >
  108. #{hiAddress,jdbcType=VARCHAR},
  109. </if>
  110. <if test="hiTel != null" >
  111. #{hiTel,jdbcType=VARCHAR},
  112. </if>
  113. <if test="hiIntro != null" >
  114. #{hiIntro,jdbcType=VARCHAR},
  115. </if>
  116. <if test="hiPinyinCode != null" >
  117. #{hiPinyinCode,jdbcType=VARCHAR},
  118. </if>
  119. <if test="hiWubiCode != null" >
  120. #{hiWubiCode,jdbcType=VARCHAR},
  121. </if>
  122. <if test="hiOtherCode != null" >
  123. #{hiOtherCode,jdbcType=VARCHAR},
  124. </if>
  125. <if test="hiIsDel != null" >
  126. #{hiIsDel,jdbcType=INTEGER},
  127. </if>
  128. <if test="hiSupId != null" >
  129. #{hiSupId,jdbcType=INTEGER},
  130. </if>
  131. <if test="hiAuthCode != null" >
  132. #{hiAuthCode,jdbcType=VARCHAR},
  133. </if>
  134. <if test="hiActiveTime != null" >
  135. #{hiActiveTime,jdbcType=TIMESTAMP},
  136. </if>
  137. <if test="hiAgingTime != null" >
  138. #{hiAgingTime,jdbcType=TIMESTAMP},
  139. </if>
  140. </trim>
  141. </insert>
  142. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.common.dao.mysqlmodel.SysHospitalInfo" >
  143. update sys_hospitalinfo
  144. <set >
  145. <if test="hiName != null" >
  146. HI_Name = #{hiName,jdbcType=VARCHAR},
  147. </if>
  148. <if test="hiShortName != null" >
  149. HI_ShortName = #{hiShortName,jdbcType=VARCHAR},
  150. </if>
  151. <if test="hiFullName != null" >
  152. HI_FullName = #{hiFullName,jdbcType=VARCHAR},
  153. </if>
  154. <if test="hiAddress != null" >
  155. HI_Address = #{hiAddress,jdbcType=VARCHAR},
  156. </if>
  157. <if test="hiTel != null" >
  158. HI_Tel = #{hiTel,jdbcType=VARCHAR},
  159. </if>
  160. <if test="hiIntro != null" >
  161. HI_Intro = #{hiIntro,jdbcType=VARCHAR},
  162. </if>
  163. <if test="hiPinyinCode != null" >
  164. HI_PinyinCode = #{hiPinyinCode,jdbcType=VARCHAR},
  165. </if>
  166. <if test="hiWubiCode != null" >
  167. HI_WubiCode = #{hiWubiCode,jdbcType=VARCHAR},
  168. </if>
  169. <if test="hiOtherCode != null" >
  170. HI_OtherCode = #{hiOtherCode,jdbcType=VARCHAR},
  171. </if>
  172. <if test="hiIsDel != null" >
  173. HI_ISDel = #{hiIsDel,jdbcType=INTEGER},
  174. </if>
  175. <if test="hiSupId != null" >
  176. HI_SupID = #{hiSupId,jdbcType=INTEGER},
  177. </if>
  178. <if test="hiAuthCode != null" >
  179. HI_Auth_Code = #{hiAuthCode,jdbcType=VARCHAR},
  180. </if>
  181. <if test="hiActiveTime != null" >
  182. HI_Active_Time = #{hiActiveTime,jdbcType=TIMESTAMP},
  183. </if>
  184. <if test="hiAgingTime != null" >
  185. HI_Aging_Time = #{hiAgingTime,jdbcType=TIMESTAMP},
  186. </if>
  187. </set>
  188. where HI_ID = #{hiId,jdbcType=INTEGER}
  189. </update>
  190. <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.common.dao.mysqlmodel.SysHospitalInfo" >
  191. update sys_hospitalinfo
  192. set HI_Name = #{hiName,jdbcType=VARCHAR},
  193. HI_ShortName = #{hiShortName,jdbcType=VARCHAR},
  194. HI_FullName = #{hiFullName,jdbcType=VARCHAR},
  195. HI_Address = #{hiAddress,jdbcType=VARCHAR},
  196. HI_Tel = #{hiTel,jdbcType=VARCHAR},
  197. HI_Intro = #{hiIntro,jdbcType=VARCHAR},
  198. HI_PinyinCode = #{hiPinyinCode,jdbcType=VARCHAR},
  199. HI_WubiCode = #{hiWubiCode,jdbcType=VARCHAR},
  200. HI_OtherCode = #{hiOtherCode,jdbcType=VARCHAR},
  201. HI_ISDel = #{hiIsDel,jdbcType=INTEGER},
  202. HI_SupID = #{hiSupId,jdbcType=INTEGER},
  203. HI_Auth_Code = #{hiAuthCode,jdbcType=VARCHAR},
  204. HI_Active_Time = #{hiActiveTime,jdbcType=TIMESTAMP},
  205. HI_Aging_Time = #{hiAgingTime,jdbcType=TIMESTAMP}
  206. where HI_ID = #{hiId,jdbcType=INTEGER}
  207. </update>
  208. <select id="selectHospitalNameById" resultType="java.lang.String" parameterType="java.lang.Integer">
  209. select HI_Name from sys_hospitalinfo where HI_ID = #{hiId,jdbcType=INTEGER}
  210. </select>
  211. </mapper>