DicConsulationMapper.xml 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  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.DicConsulationMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.DicConsulation" >
  5. <id column="DCO_ID" property="dcoId" jdbcType="INTEGER" />
  6. <result column="HI_ID" property="hiId" jdbcType="INTEGER" />
  7. <result column="DCO_Code" property="dcoCode" jdbcType="VARCHAR" />
  8. <result column="DCO_Name" property="dcoName" jdbcType="VARCHAR" />
  9. <result column="DCO_PinyinCode" property="dcoPinyincode" jdbcType="VARCHAR" />
  10. <result column="DCO_WubiCode" property="dcoWubicode" jdbcType="VARCHAR" />
  11. <result column="DCO_OtherCode" property="dcoOthercode" jdbcType="VARCHAR" />
  12. <result column="DCO_Operation_Time" property="dcoOperationTime" jdbcType="TIMESTAMP" />
  13. <result column="DCO_Operator" property="dcoOperator" jdbcType="VARCHAR" />
  14. <result column="DCO_IsDel" property="dcoIsdel" jdbcType="INTEGER" />
  15. <result column="DCO_Remark" property="dcoRemark" jdbcType="VARCHAR" />
  16. </resultMap>
  17. <sql id="Base_Column_List" >
  18. DCO_ID, HI_ID, DCO_Code, DCO_Name, DCO_PinyinCode, DCO_WubiCode, DCO_OtherCode, DCO_Operation_Time,
  19. DCO_Operator, DCO_IsDel, DCO_Remark
  20. </sql>
  21. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  22. select
  23. <include refid="Base_Column_List" />
  24. from dic_consulation
  25. where DCO_IsDel = 0 and DCO_ID = #{dcoId,jdbcType=INTEGER}
  26. </select>
  27. <select id="selectByCode" resultMap="BaseResultMap" parameterType="java.lang.String" >
  28. select
  29. <include refid="Base_Column_List" />
  30. from dic_consulation
  31. where DCO_IsDel = 0 and DCO_Code = #{code,jdbcType=VARCHAR}
  32. </select>
  33. <select id="selectAll" resultMap="BaseResultMap">
  34. select
  35. <include refid="Base_Column_List" />
  36. from dic_consulation
  37. where DCO_IsDel = 0
  38. </select>
  39. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  40. delete from dic_consulation
  41. where DCO_ID = #{dcoId,jdbcType=INTEGER}
  42. </delete>
  43. <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicConsulation" >
  44. insert into dic_consulation (DCO_ID, HI_ID, DCO_Code,
  45. DCO_Name, DCO_PinyinCode, DCO_WubiCode,
  46. DCO_OtherCode, DCO_Operation_Time, DCO_Operator,
  47. DCO_IsDel, DCO_Remark)
  48. values (#{dcoId,jdbcType=INTEGER}, #{hiId,jdbcType=INTEGER}, #{dcoCode,jdbcType=VARCHAR},
  49. #{dcoName,jdbcType=VARCHAR}, #{dcoPinyincode,jdbcType=VARCHAR}, #{dcoWubicode,jdbcType=VARCHAR},
  50. #{dcoOthercode,jdbcType=VARCHAR}, #{dcoOperationTime,jdbcType=TIMESTAMP}, #{dcoOperator,jdbcType=VARCHAR},
  51. #{dcoIsdel,jdbcType=INTEGER}, #{dcoRemark,jdbcType=VARCHAR})
  52. </insert>
  53. <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicConsulation" >
  54. insert into dic_consulation
  55. <trim prefix="(" suffix=")" suffixOverrides="," >
  56. <if test="dcoId != null" >
  57. DCO_ID,
  58. </if>
  59. <if test="hiId != null" >
  60. HI_ID,
  61. </if>
  62. <if test="dcoCode != null" >
  63. DCO_Code,
  64. </if>
  65. <if test="dcoName != null" >
  66. DCO_Name,
  67. </if>
  68. <if test="dcoPinyincode != null" >
  69. DCO_PinyinCode,
  70. </if>
  71. <if test="dcoWubicode != null" >
  72. DCO_WubiCode,
  73. </if>
  74. <if test="dcoOthercode != null" >
  75. DCO_OtherCode,
  76. </if>
  77. <if test="dcoOperationTime != null" >
  78. DCO_Operation_Time,
  79. </if>
  80. <if test="dcoOperator != null" >
  81. DCO_Operator,
  82. </if>
  83. <if test="dcoIsdel != null" >
  84. DCO_IsDel,
  85. </if>
  86. <if test="dcoRemark != null" >
  87. DCO_Remark,
  88. </if>
  89. </trim>
  90. <trim prefix="values (" suffix=")" suffixOverrides="," >
  91. <if test="dcoId != null" >
  92. #{dcoId,jdbcType=INTEGER},
  93. </if>
  94. <if test="hiId != null" >
  95. #{hiId,jdbcType=INTEGER},
  96. </if>
  97. <if test="dcoCode != null" >
  98. #{dcoCode,jdbcType=VARCHAR},
  99. </if>
  100. <if test="dcoName != null" >
  101. #{dcoName,jdbcType=VARCHAR},
  102. </if>
  103. <if test="dcoPinyincode != null" >
  104. #{dcoPinyincode,jdbcType=VARCHAR},
  105. </if>
  106. <if test="dcoWubicode != null" >
  107. #{dcoWubicode,jdbcType=VARCHAR},
  108. </if>
  109. <if test="dcoOthercode != null" >
  110. #{dcoOthercode,jdbcType=VARCHAR},
  111. </if>
  112. <if test="dcoOperationTime != null" >
  113. #{dcoOperationTime,jdbcType=TIMESTAMP},
  114. </if>
  115. <if test="dcoOperator != null" >
  116. #{dcoOperator,jdbcType=VARCHAR},
  117. </if>
  118. <if test="dcoIsdel != null" >
  119. #{dcoIsdel,jdbcType=INTEGER},
  120. </if>
  121. <if test="dcoRemark != null" >
  122. #{dcoRemark,jdbcType=VARCHAR},
  123. </if>
  124. </trim>
  125. </insert>
  126. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicConsulation" >
  127. update dic_consulation
  128. <set >
  129. <if test="hiId != null" >
  130. HI_ID = #{hiId,jdbcType=INTEGER},
  131. </if>
  132. <if test="dcoCode != null" >
  133. DCO_Code = #{dcoCode,jdbcType=VARCHAR},
  134. </if>
  135. <if test="dcoName != null" >
  136. DCO_Name = #{dcoName,jdbcType=VARCHAR},
  137. </if>
  138. <if test="dcoPinyincode != null" >
  139. DCO_PinyinCode = #{dcoPinyincode,jdbcType=VARCHAR},
  140. </if>
  141. <if test="dcoWubicode != null" >
  142. DCO_WubiCode = #{dcoWubicode,jdbcType=VARCHAR},
  143. </if>
  144. <if test="dcoOthercode != null" >
  145. DCO_OtherCode = #{dcoOthercode,jdbcType=VARCHAR},
  146. </if>
  147. <if test="dcoOperationTime != null" >
  148. DCO_Operation_Time = #{dcoOperationTime,jdbcType=TIMESTAMP},
  149. </if>
  150. <if test="dcoOperator != null" >
  151. DCO_Operator = #{dcoOperator,jdbcType=VARCHAR},
  152. </if>
  153. <if test="dcoIsdel != null" >
  154. DCO_IsDel = #{dcoIsdel,jdbcType=INTEGER},
  155. </if>
  156. <if test="dcoRemark != null" >
  157. DCO_Remark = #{dcoRemark,jdbcType=VARCHAR},
  158. </if>
  159. </set>
  160. where DCO_ID = #{dcoId,jdbcType=INTEGER}
  161. </update>
  162. <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicConsulation" >
  163. update dic_consulation
  164. set HI_ID = #{hiId,jdbcType=INTEGER},
  165. DCO_Code = #{dcoCode,jdbcType=VARCHAR},
  166. DCO_Name = #{dcoName,jdbcType=VARCHAR},
  167. DCO_PinyinCode = #{dcoPinyincode,jdbcType=VARCHAR},
  168. DCO_WubiCode = #{dcoWubicode,jdbcType=VARCHAR},
  169. DCO_OtherCode = #{dcoOthercode,jdbcType=VARCHAR},
  170. DCO_Operation_Time = #{dcoOperationTime,jdbcType=TIMESTAMP},
  171. DCO_Operator = #{dcoOperator,jdbcType=VARCHAR},
  172. DCO_IsDel = #{dcoIsdel,jdbcType=INTEGER},
  173. DCO_Remark = #{dcoRemark,jdbcType=VARCHAR}
  174. where DCO_ID = #{dcoId,jdbcType=INTEGER}
  175. </update>
  176. </mapper>