HospitalInfoMapper.xml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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.base.mysqlmapper.HospitalInfoMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.base.mysqlmodel.HospitalInfo" >
  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. </resultMap>
  18. <sql id="Base_Column_List" >
  19. HI_ID, HI_Name, HI_ShortName, HI_FullName, HI_Address, HI_Tel, HI_Intro, HI_PinyinCode,
  20. HI_WubiCode, HI_OtherCode, HI_ISDel, HI_SupID
  21. </sql>
  22. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  23. select
  24. <include refid="Base_Column_List" />
  25. from sys_hospitalinfo
  26. where HI_ID = #{hiId,jdbcType=INTEGER}
  27. </select>
  28. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  29. delete from sys_hospitalinfo
  30. where HI_ID = #{hiId,jdbcType=INTEGER}
  31. </delete>
  32. <insert id="insertSelective" parameterType="com.xinxin.topro.base.mysqlmodel.HospitalInfo" >
  33. insert into sys_hospitalinfo
  34. <trim prefix="(" suffix=")" suffixOverrides="," >
  35. <if test="hiId != null" >
  36. HI_ID,
  37. </if>
  38. <if test="hiName != null" >
  39. HI_Name,
  40. </if>
  41. <if test="hiShortname != null" >
  42. HI_ShortName,
  43. </if>
  44. <if test="hiFullname != null" >
  45. HI_FullName,
  46. </if>
  47. <if test="hiAddress != null" >
  48. HI_Address,
  49. </if>
  50. <if test="hiTel != null" >
  51. HI_Tel,
  52. </if>
  53. <if test="hiIntro != null" >
  54. HI_Intro,
  55. </if>
  56. <if test="hiPinyincode != null" >
  57. HI_PinyinCode,
  58. </if>
  59. <if test="hiWubicode != null" >
  60. HI_WubiCode,
  61. </if>
  62. <if test="hiOthercode != null" >
  63. HI_OtherCode,
  64. </if>
  65. <if test="hiIsdel != null" >
  66. HI_ISDel,
  67. </if>
  68. <if test="hiSupid != null" >
  69. HI_SupID,
  70. </if>
  71. </trim>
  72. <trim prefix="values (" suffix=")" suffixOverrides="," >
  73. <if test="hiId != null" >
  74. #{hiId,jdbcType=INTEGER},
  75. </if>
  76. <if test="hiName != null" >
  77. #{hiName,jdbcType=VARCHAR},
  78. </if>
  79. <if test="hiShortname != null" >
  80. #{hiShortname,jdbcType=VARCHAR},
  81. </if>
  82. <if test="hiFullname != null" >
  83. #{hiFullname,jdbcType=VARCHAR},
  84. </if>
  85. <if test="hiAddress != null" >
  86. #{hiAddress,jdbcType=VARCHAR},
  87. </if>
  88. <if test="hiTel != null" >
  89. #{hiTel,jdbcType=VARCHAR},
  90. </if>
  91. <if test="hiIntro != null" >
  92. #{hiIntro,jdbcType=VARCHAR},
  93. </if>
  94. <if test="hiPinyincode != null" >
  95. #{hiPinyincode,jdbcType=VARCHAR},
  96. </if>
  97. <if test="hiWubicode != null" >
  98. #{hiWubicode,jdbcType=VARCHAR},
  99. </if>
  100. <if test="hiOthercode != null" >
  101. #{hiOthercode,jdbcType=VARCHAR},
  102. </if>
  103. <if test="hiIsdel != null" >
  104. #{hiIsdel,jdbcType=INTEGER},
  105. </if>
  106. <if test="hiSupid != null" >
  107. #{hiSupid,jdbcType=INTEGER},
  108. </if>
  109. </trim>
  110. </insert>
  111. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.base.mysqlmodel.HospitalInfo" >
  112. update sys_hospitalinfo
  113. <set >
  114. <if test="hiName != null" >
  115. HI_Name = #{hiName,jdbcType=VARCHAR},
  116. </if>
  117. <if test="hiShortname != null" >
  118. HI_ShortName = #{hiShortname,jdbcType=VARCHAR},
  119. </if>
  120. <if test="hiFullname != null" >
  121. HI_FullName = #{hiFullname,jdbcType=VARCHAR},
  122. </if>
  123. <if test="hiAddress != null" >
  124. HI_Address = #{hiAddress,jdbcType=VARCHAR},
  125. </if>
  126. <if test="hiTel != null" >
  127. HI_Tel = #{hiTel,jdbcType=VARCHAR},
  128. </if>
  129. <if test="hiIntro != null" >
  130. HI_Intro = #{hiIntro,jdbcType=VARCHAR},
  131. </if>
  132. <if test="hiPinyincode != null" >
  133. HI_PinyinCode = #{hiPinyincode,jdbcType=VARCHAR},
  134. </if>
  135. <if test="hiWubicode != null" >
  136. HI_WubiCode = #{hiWubicode,jdbcType=VARCHAR},
  137. </if>
  138. <if test="hiOthercode != null" >
  139. HI_OtherCode = #{hiOthercode,jdbcType=VARCHAR},
  140. </if>
  141. <if test="hiIsdel != null" >
  142. HI_ISDel = #{hiIsdel,jdbcType=INTEGER},
  143. </if>
  144. <if test="hiSupid != null" >
  145. HI_SupID = #{hiSupid,jdbcType=INTEGER},
  146. </if>
  147. </set>
  148. where HI_ID = #{hiId,jdbcType=INTEGER}
  149. </update>
  150. </mapper>