DicInterventionMapper.xml 5.8 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.inpnurseservice.mysqlmapper.DicInterventionMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.DicIntervention" >
  5. <id column="DI_ID" property="diId" jdbcType="INTEGER" />
  6. <result column="HI_ID" property="hiId" jdbcType="INTEGER" />
  7. <result column="DI_NIC_Code" property="diNicCode" jdbcType="VARCHAR" />
  8. <result column="DI_NIC_Name" property="diNicName" jdbcType="VARCHAR" />
  9. <result column="DI_PinyinCode" property="diPinyincode" jdbcType="VARCHAR" />
  10. <result column="DI_WubiCode" property="diWubicode" jdbcType="VARCHAR" />
  11. <result column="DI_OtherCode" property="diOthercode" jdbcType="VARCHAR" />
  12. <result column="DI_UserId" property="diUserid" jdbcType="VARCHAR" />
  13. <result column="DI_UpdateTime" property="diUpdatetime" jdbcType="TIMESTAMP" />
  14. <result column="DI_IsDel" property="diIsdel" jdbcType="INTEGER" />
  15. </resultMap>
  16. <sql id="Base_Column_List" >
  17. DI_ID, HI_ID, DI_NIC_Code, DI_NIC_Name, DI_PinyinCode, DI_WubiCode, DI_OtherCode,
  18. DI_UserId, DI_UpdateTime, DI_IsDel
  19. </sql>
  20. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  21. select
  22. <include refid="Base_Column_List" />
  23. from dic_intervention
  24. where DI_ID = #{diId,jdbcType=INTEGER}
  25. </select>
  26. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  27. delete from dic_intervention
  28. where DI_ID = #{diId,jdbcType=INTEGER}
  29. </delete>
  30. <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicIntervention" >
  31. insert into dic_intervention (DI_ID, HI_ID, DI_NIC_Code,
  32. DI_NIC_Name, DI_PinyinCode, DI_WubiCode,
  33. DI_OtherCode, DI_UserId, DI_UpdateTime,
  34. DI_IsDel)
  35. values (#{diId,jdbcType=INTEGER}, #{hiId,jdbcType=INTEGER}, #{diNicCode,jdbcType=VARCHAR},
  36. #{diNicName,jdbcType=VARCHAR}, #{diPinyincode,jdbcType=VARCHAR}, #{diWubicode,jdbcType=VARCHAR},
  37. #{diOthercode,jdbcType=VARCHAR}, #{diUserid,jdbcType=VARCHAR}, #{diUpdatetime,jdbcType=TIMESTAMP},
  38. #{diIsdel,jdbcType=INTEGER})
  39. </insert>
  40. <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicIntervention" >
  41. insert into dic_intervention
  42. <trim prefix="(" suffix=")" suffixOverrides="," >
  43. <if test="diId != null" >
  44. DI_ID,
  45. </if>
  46. <if test="hiId != null" >
  47. HI_ID,
  48. </if>
  49. <if test="diNicCode != null" >
  50. DI_NIC_Code,
  51. </if>
  52. <if test="diNicName != null" >
  53. DI_NIC_Name,
  54. </if>
  55. <if test="diPinyincode != null" >
  56. DI_PinyinCode,
  57. </if>
  58. <if test="diWubicode != null" >
  59. DI_WubiCode,
  60. </if>
  61. <if test="diOthercode != null" >
  62. DI_OtherCode,
  63. </if>
  64. <if test="diUserid != null" >
  65. DI_UserId,
  66. </if>
  67. <if test="diUpdatetime != null" >
  68. DI_UpdateTime,
  69. </if>
  70. <if test="diIsdel != null" >
  71. DI_IsDel,
  72. </if>
  73. </trim>
  74. <trim prefix="values (" suffix=")" suffixOverrides="," >
  75. <if test="diId != null" >
  76. #{diId,jdbcType=INTEGER},
  77. </if>
  78. <if test="hiId != null" >
  79. #{hiId,jdbcType=INTEGER},
  80. </if>
  81. <if test="diNicCode != null" >
  82. #{diNicCode,jdbcType=VARCHAR},
  83. </if>
  84. <if test="diNicName != null" >
  85. #{diNicName,jdbcType=VARCHAR},
  86. </if>
  87. <if test="diPinyincode != null" >
  88. #{diPinyincode,jdbcType=VARCHAR},
  89. </if>
  90. <if test="diWubicode != null" >
  91. #{diWubicode,jdbcType=VARCHAR},
  92. </if>
  93. <if test="diOthercode != null" >
  94. #{diOthercode,jdbcType=VARCHAR},
  95. </if>
  96. <if test="diUserid != null" >
  97. #{diUserid,jdbcType=VARCHAR},
  98. </if>
  99. <if test="diUpdatetime != null" >
  100. #{diUpdatetime,jdbcType=TIMESTAMP},
  101. </if>
  102. <if test="diIsdel != null" >
  103. #{diIsdel,jdbcType=INTEGER},
  104. </if>
  105. </trim>
  106. </insert>
  107. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicIntervention" >
  108. update dic_intervention
  109. <set >
  110. <if test="hiId != null" >
  111. HI_ID = #{hiId,jdbcType=INTEGER},
  112. </if>
  113. <if test="diNicCode != null" >
  114. DI_NIC_Code = #{diNicCode,jdbcType=VARCHAR},
  115. </if>
  116. <if test="diNicName != null" >
  117. DI_NIC_Name = #{diNicName,jdbcType=VARCHAR},
  118. </if>
  119. <if test="diPinyincode != null" >
  120. DI_PinyinCode = #{diPinyincode,jdbcType=VARCHAR},
  121. </if>
  122. <if test="diWubicode != null" >
  123. DI_WubiCode = #{diWubicode,jdbcType=VARCHAR},
  124. </if>
  125. <if test="diOthercode != null" >
  126. DI_OtherCode = #{diOthercode,jdbcType=VARCHAR},
  127. </if>
  128. <if test="diUserid != null" >
  129. DI_UserId = #{diUserid,jdbcType=VARCHAR},
  130. </if>
  131. <if test="diUpdatetime != null" >
  132. DI_UpdateTime = #{diUpdatetime,jdbcType=TIMESTAMP},
  133. </if>
  134. <if test="diIsdel != null" >
  135. DI_IsDel = #{diIsdel,jdbcType=INTEGER},
  136. </if>
  137. </set>
  138. where DI_ID = #{diId,jdbcType=INTEGER}
  139. </update>
  140. <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicIntervention" >
  141. update dic_intervention
  142. set HI_ID = #{hiId,jdbcType=INTEGER},
  143. DI_NIC_Code = #{diNicCode,jdbcType=VARCHAR},
  144. DI_NIC_Name = #{diNicName,jdbcType=VARCHAR},
  145. DI_PinyinCode = #{diPinyincode,jdbcType=VARCHAR},
  146. DI_WubiCode = #{diWubicode,jdbcType=VARCHAR},
  147. DI_OtherCode = #{diOthercode,jdbcType=VARCHAR},
  148. DI_UserId = #{diUserid,jdbcType=VARCHAR},
  149. DI_UpdateTime = #{diUpdatetime,jdbcType=TIMESTAMP},
  150. DI_IsDel = #{diIsdel,jdbcType=INTEGER}
  151. where DI_ID = #{diId,jdbcType=INTEGER}
  152. </update>
  153. </mapper>