InpRecureRecordDetailMapper.xml 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  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.InpRecureRecordDetailMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRecureRecordDetail" >
  5. <id column="id" property="id" jdbcType="INTEGER" />
  6. <result column="irr_id" property="irrId" jdbcType="INTEGER" />
  7. <result column="irtd_time" property="irtdTime" jdbcType="TIMESTAMP" />
  8. <result column="irtd_often" property="irtdOften" jdbcType="VARCHAR" />
  9. <result column="irtd_recure_code" property="irtdRecureCode" jdbcType="VARCHAR" />
  10. <result column="irtd_recure_name" property="irtdRecureName" jdbcType="VARCHAR" />
  11. <result column="irtr_therapist" property="irtrTherapist" jdbcType="VARCHAR" />
  12. <result column="irtr_recordor" property="irtrRecordor" jdbcType="VARCHAR" />
  13. <result column="irtr_record_time" property="irtrRecordTime" jdbcType="TIMESTAMP" />
  14. <result column="irtr_operation_time" property="irtrOperationTime" jdbcType="TIMESTAMP" />
  15. <result column="irtr_operator" property="irtrOperator" jdbcType="VARCHAR" />
  16. <result column="del_flag" property="delFlag" jdbcType="BIT" />
  17. </resultMap>
  18. <sql id="Base_Column_List" >
  19. id, irr_id, irtd_time, irtd_often, irtd_recure_code, irtd_recure_name, irtr_therapist,
  20. irtr_recordor, irtr_record_time, irtr_operation_time, irtr_operator, del_flag
  21. </sql>
  22. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  23. select
  24. <include refid="Base_Column_List" />
  25. from inp_recure_record_detail
  26. where id = #{id,jdbcType=INTEGER}
  27. </select>
  28. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  29. delete from inp_recure_record_detail
  30. where id = #{id,jdbcType=INTEGER}
  31. </delete>
  32. <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRecureRecordDetail" >
  33. insert into inp_recure_record_detail (id, irr_id, irtd_time,
  34. irtd_often, irtd_recure_code, irtd_recure_name,
  35. irtr_therapist, irtr_recordor, irtr_record_time,
  36. irtr_operation_time, irtr_operator, del_flag
  37. )
  38. values (#{id,jdbcType=INTEGER}, #{irrId,jdbcType=INTEGER}, #{irtdTime,jdbcType=TIMESTAMP},
  39. #{irtdOften,jdbcType=VARCHAR}, #{irtdRecureCode,jdbcType=VARCHAR}, #{irtdRecureName,jdbcType=VARCHAR},
  40. #{irtrTherapist,jdbcType=VARCHAR}, #{irtrRecordor,jdbcType=VARCHAR}, #{irtrRecordTime,jdbcType=TIMESTAMP},
  41. #{irtrOperationTime,jdbcType=TIMESTAMP}, #{irtrOperator,jdbcType=VARCHAR}, #{delFlag,jdbcType=BIT}
  42. )
  43. </insert>
  44. <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRecureRecordDetail" >
  45. insert into inp_recure_record_detail
  46. <trim prefix="(" suffix=")" suffixOverrides="," >
  47. <if test="id != null" >
  48. id,
  49. </if>
  50. <if test="irrId != null" >
  51. irr_id,
  52. </if>
  53. <if test="irtdTime != null" >
  54. irtd_time,
  55. </if>
  56. <if test="irtdOften != null" >
  57. irtd_often,
  58. </if>
  59. <if test="irtdRecureCode != null" >
  60. irtd_recure_code,
  61. </if>
  62. <if test="irtdRecureName != null" >
  63. irtd_recure_name,
  64. </if>
  65. <if test="irtrTherapist != null" >
  66. irtr_therapist,
  67. </if>
  68. <if test="irtrRecordor != null" >
  69. irtr_recordor,
  70. </if>
  71. <if test="irtrRecordTime != null" >
  72. irtr_record_time,
  73. </if>
  74. <if test="irtrOperationTime != null" >
  75. irtr_operation_time,
  76. </if>
  77. <if test="irtrOperator != null" >
  78. irtr_operator,
  79. </if>
  80. <if test="delFlag != null" >
  81. del_flag,
  82. </if>
  83. </trim>
  84. <trim prefix="values (" suffix=")" suffixOverrides="," >
  85. <if test="id != null" >
  86. #{id,jdbcType=INTEGER},
  87. </if>
  88. <if test="irrId != null" >
  89. #{irrId,jdbcType=INTEGER},
  90. </if>
  91. <if test="irtdTime != null" >
  92. #{irtdTime,jdbcType=TIMESTAMP},
  93. </if>
  94. <if test="irtdOften != null" >
  95. #{irtdOften,jdbcType=VARCHAR},
  96. </if>
  97. <if test="irtdRecureCode != null" >
  98. #{irtdRecureCode,jdbcType=VARCHAR},
  99. </if>
  100. <if test="irtdRecureName != null" >
  101. #{irtdRecureName,jdbcType=VARCHAR},
  102. </if>
  103. <if test="irtrTherapist != null" >
  104. #{irtrTherapist,jdbcType=VARCHAR},
  105. </if>
  106. <if test="irtrRecordor != null" >
  107. #{irtrRecordor,jdbcType=VARCHAR},
  108. </if>
  109. <if test="irtrRecordTime != null" >
  110. #{irtrRecordTime,jdbcType=TIMESTAMP},
  111. </if>
  112. <if test="irtrOperationTime != null" >
  113. #{irtrOperationTime,jdbcType=TIMESTAMP},
  114. </if>
  115. <if test="irtrOperator != null" >
  116. #{irtrOperator,jdbcType=VARCHAR},
  117. </if>
  118. <if test="delFlag != null" >
  119. #{delFlag,jdbcType=BIT},
  120. </if>
  121. </trim>
  122. </insert>
  123. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRecureRecordDetail" >
  124. update inp_recure_record_detail
  125. <set >
  126. <if test="irrId != null" >
  127. irr_id = #{irrId,jdbcType=INTEGER},
  128. </if>
  129. <if test="irtdTime != null" >
  130. irtd_time = #{irtdTime,jdbcType=TIMESTAMP},
  131. </if>
  132. <if test="irtdOften != null" >
  133. irtd_often = #{irtdOften,jdbcType=VARCHAR},
  134. </if>
  135. <if test="irtdRecureCode != null" >
  136. irtd_recure_code = #{irtdRecureCode,jdbcType=VARCHAR},
  137. </if>
  138. <if test="irtdRecureName != null" >
  139. irtd_recure_name = #{irtdRecureName,jdbcType=VARCHAR},
  140. </if>
  141. <if test="irtrTherapist != null" >
  142. irtr_therapist = #{irtrTherapist,jdbcType=VARCHAR},
  143. </if>
  144. <if test="irtrRecordor != null" >
  145. irtr_recordor = #{irtrRecordor,jdbcType=VARCHAR},
  146. </if>
  147. <if test="irtrRecordTime != null" >
  148. irtr_record_time = #{irtrRecordTime,jdbcType=TIMESTAMP},
  149. </if>
  150. <if test="irtrOperationTime != null" >
  151. irtr_operation_time = #{irtrOperationTime,jdbcType=TIMESTAMP},
  152. </if>
  153. <if test="irtrOperator != null" >
  154. irtr_operator = #{irtrOperator,jdbcType=VARCHAR},
  155. </if>
  156. <if test="delFlag != null" >
  157. del_flag = #{delFlag,jdbcType=BIT},
  158. </if>
  159. </set>
  160. where id = #{id,jdbcType=INTEGER}
  161. </update>
  162. <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRecureRecordDetail" >
  163. update inp_recure_record_detail
  164. set irr_id = #{irrId,jdbcType=INTEGER},
  165. irtd_time = #{irtdTime,jdbcType=TIMESTAMP},
  166. irtd_often = #{irtdOften,jdbcType=VARCHAR},
  167. irtd_recure_code = #{irtdRecureCode,jdbcType=VARCHAR},
  168. irtd_recure_name = #{irtdRecureName,jdbcType=VARCHAR},
  169. irtr_therapist = #{irtrTherapist,jdbcType=VARCHAR},
  170. irtr_recordor = #{irtrRecordor,jdbcType=VARCHAR},
  171. irtr_record_time = #{irtrRecordTime,jdbcType=TIMESTAMP},
  172. irtr_operation_time = #{irtrOperationTime,jdbcType=TIMESTAMP},
  173. irtr_operator = #{irtrOperator,jdbcType=VARCHAR},
  174. del_flag = #{delFlag,jdbcType=BIT}
  175. where id = #{id,jdbcType=INTEGER}
  176. </update>
  177. <select id="selectByIrrId" resultMap="BaseResultMap">
  178. select
  179. <include refid="Base_Column_List" />
  180. from inp_recure_record_detail
  181. where irr_id = #{irrId,jdbcType=INTEGER}
  182. and del_flag = 0
  183. order By irtd_time
  184. </select>
  185. </mapper>