InpHandOverDetailMapper.xml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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.InpHandOverDetailMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpHandOverDetail" >
  5. <id column="IHD_ID" property="ihdId" jdbcType="INTEGER" />
  6. <result column="IH_ID" property="ihId" jdbcType="INTEGER" />
  7. <result column="IHD_Code" property="ihdCode" jdbcType="VARCHAR" />
  8. <result column="IHD_Name" property="ihdName" jdbcType="VARCHAR" />
  9. <result column="IHD_Value" property="ihdValue" jdbcType="VARCHAR" />
  10. <result column="IHD_Type" property="ihdType" jdbcType="INTEGER" />
  11. <result column="IHD_Remark" property="ihdRemark" jdbcType="VARCHAR" />
  12. </resultMap>
  13. <sql id="Base_Column_List" >
  14. IHD_ID, IH_ID, IHD_Code, IHD_Name, IHD_Value, IHD_Type, IHD_Remark
  15. </sql>
  16. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  17. select
  18. <include refid="Base_Column_List" />
  19. from inp_handover_detail
  20. where IHD_ID = #{ihdId,jdbcType=INTEGER}
  21. </select>
  22. <select id="selectByHandoverID" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  23. select
  24. <include refid="Base_Column_List" />
  25. from inp_handover_detail
  26. where IH_ID = #{ihId,jdbcType=INTEGER}
  27. </select>
  28. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  29. delete from inp_handover_detail
  30. where IHD_ID = #{ihdId,jdbcType=INTEGER}
  31. </delete>
  32. <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpHandOverDetail" >
  33. insert into inp_handover_detail (IHD_ID, IH_ID, IHD_Code,
  34. IHD_Name, IHD_Value, IHD_Type,
  35. IHD_Remark)
  36. values (#{ihdId,jdbcType=INTEGER}, #{ihId,jdbcType=INTEGER}, #{ihdCode,jdbcType=VARCHAR},
  37. #{ihdName,jdbcType=VARCHAR}, #{ihdValue,jdbcType=VARCHAR}, #{ihdType,jdbcType=INTEGER},
  38. #{ihdRemark,jdbcType=VARCHAR})
  39. </insert>
  40. <insert id="insertList" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpHandOverDetail" >
  41. insert into inp_handover_detail (IHD_ID, IH_ID, IHD_Code,
  42. IHD_Name, IHD_Value, IHD_Type,
  43. IHD_Remark)
  44. values
  45. <foreach collection ="list" item="reddemCode" index= "index" separator =",">
  46. (#{reddemCode.ihdId,jdbcType=INTEGER}, #{reddemCode.ihId,jdbcType=INTEGER}, #{reddemCode.ihdCode,jdbcType=VARCHAR},
  47. #{reddemCode.ihdName,jdbcType=VARCHAR}, #{reddemCode.ihdValue,jdbcType=VARCHAR},
  48. #{reddemCode.ihdType,jdbcType=INTEGER}, #{reddemCode.ihdRemark,jdbcType=VARCHAR}
  49. )
  50. </foreach>
  51. </insert>
  52. <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpHandOverDetail" >
  53. insert into inp_handover_detail
  54. <trim prefix="(" suffix=")" suffixOverrides="," >
  55. <if test="ihdId != null" >
  56. IHD_ID,
  57. </if>
  58. <if test="ihId != null" >
  59. IH_ID,
  60. </if>
  61. <if test="ihdCode != null" >
  62. IHD_Code,
  63. </if>
  64. <if test="ihdName != null" >
  65. IHD_Name,
  66. </if>
  67. <if test="ihdValue != null" >
  68. IHD_Value,
  69. </if>
  70. <if test="ihdType != null" >
  71. IHD_Type,
  72. </if>
  73. <if test="ihdRemark != null" >
  74. IHD_Remark,
  75. </if>
  76. </trim>
  77. <trim prefix="values (" suffix=")" suffixOverrides="," >
  78. <if test="ihdId != null" >
  79. #{ihdId,jdbcType=INTEGER},
  80. </if>
  81. <if test="ihId != null" >
  82. #{ihId,jdbcType=INTEGER},
  83. </if>
  84. <if test="ihdCode != null" >
  85. #{ihdCode,jdbcType=VARCHAR},
  86. </if>
  87. <if test="ihdName != null" >
  88. #{ihdName,jdbcType=VARCHAR},
  89. </if>
  90. <if test="ihdValue != null" >
  91. #{ihdValue,jdbcType=VARCHAR},
  92. </if>
  93. <if test="ihdType != null" >
  94. #{ihdType,jdbcType=INTEGER},
  95. </if>
  96. <if test="ihdRemark != null" >
  97. #{ihdRemark,jdbcType=VARCHAR},
  98. </if>
  99. </trim>
  100. </insert>
  101. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpHandOverDetail" >
  102. update inp_handover_detail
  103. <set >
  104. <if test="ihId != null" >
  105. IH_ID = #{ihId,jdbcType=INTEGER},
  106. </if>
  107. <if test="ihdCode != null" >
  108. IHD_Code = #{ihdCode,jdbcType=VARCHAR},
  109. </if>
  110. <if test="ihdName != null" >
  111. IHD_Name = #{ihdName,jdbcType=VARCHAR},
  112. </if>
  113. <if test="ihdValue != null" >
  114. IHD_Value = #{ihdValue,jdbcType=VARCHAR},
  115. </if>
  116. <if test="ihdType != null" >
  117. IHD_Type = #{ihdType,jdbcType=INTEGER},
  118. </if>
  119. <if test="ihdRemark != null" >
  120. IHD_Remark = #{ihdRemark,jdbcType=VARCHAR},
  121. </if>
  122. </set>
  123. where IHD_ID = #{ihdId,jdbcType=INTEGER}
  124. </update>
  125. <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpHandOverDetail" >
  126. update inp_handover_detail
  127. set IH_ID = #{ihId,jdbcType=INTEGER},
  128. IHD_Code = #{ihdCode,jdbcType=VARCHAR},
  129. IHD_Name = #{ihdName,jdbcType=VARCHAR},
  130. IHD_Value = #{ihdValue,jdbcType=VARCHAR},
  131. IHD_Type = #{ihdType,jdbcType=INTEGER},
  132. IHD_Remark = #{ihdRemark,jdbcType=VARCHAR}
  133. where IHD_ID = #{ihdId,jdbcType=INTEGER}
  134. </update>
  135. </mapper>