InpDuctusExceptionMapper.xml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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.InpDuctusExceptionMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpDuctusException" >
  5. <id column="IDE_ID" property="ideId" jdbcType="INTEGER" />
  6. <result column="IDR_ID" property="idrId" jdbcType="INTEGER" />
  7. <result column="IDR_Exception_Code" property="idrExceptionCode" jdbcType="VARCHAR" />
  8. <result column="IDR_Exception" property="idrException" jdbcType="VARCHAR" />
  9. <result column="IDR_Remark" property="idrRemark" jdbcType="VARCHAR" />
  10. <result column="IDR_IsDel" property="idrIsdel" jdbcType="INTEGER" />
  11. </resultMap>
  12. <sql id="Base_Column_List" >
  13. IDE_ID, IDR_ID, IDR_Exception_Code, IDR_Exception, IDR_Remark, IDR_IsDel
  14. </sql>
  15. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  16. select
  17. <include refid="Base_Column_List" />
  18. from inp_ductus_exception
  19. where IDE_ID = #{ideId,jdbcType=INTEGER}
  20. </select>
  21. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  22. delete from inp_ductus_exception
  23. where IDE_ID = #{ideId,jdbcType=INTEGER}
  24. </delete>
  25. <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpDuctusException" >
  26. insert into inp_ductus_exception (IDE_ID, IDR_ID, IDR_Exception_Code,
  27. IDR_Exception, IDR_Remark, IDR_IsDel
  28. )
  29. values (#{ideId,jdbcType=INTEGER}, #{idrId,jdbcType=INTEGER}, #{idrExceptionCode,jdbcType=VARCHAR},
  30. #{idrException,jdbcType=VARCHAR}, #{idrRemark,jdbcType=VARCHAR}, #{idrIsdel,jdbcType=INTEGER}
  31. )
  32. </insert>
  33. <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpDuctusException" >
  34. insert into inp_ductus_exception
  35. <trim prefix="(" suffix=")" suffixOverrides="," >
  36. <if test="ideId != null" >
  37. IDE_ID,
  38. </if>
  39. <if test="idrId != null" >
  40. IDR_ID,
  41. </if>
  42. <if test="idrExceptionCode != null" >
  43. IDR_Exception_Code,
  44. </if>
  45. <if test="idrException != null" >
  46. IDR_Exception,
  47. </if>
  48. <if test="idrRemark != null" >
  49. IDR_Remark,
  50. </if>
  51. <if test="idrIsdel != null" >
  52. IDR_IsDel,
  53. </if>
  54. </trim>
  55. <trim prefix="values (" suffix=")" suffixOverrides="," >
  56. <if test="ideId != null" >
  57. #{ideId,jdbcType=INTEGER},
  58. </if>
  59. <if test="idrId != null" >
  60. #{idrId,jdbcType=INTEGER},
  61. </if>
  62. <if test="idrExceptionCode != null" >
  63. #{idrExceptionCode,jdbcType=VARCHAR},
  64. </if>
  65. <if test="idrException != null" >
  66. #{idrException,jdbcType=VARCHAR},
  67. </if>
  68. <if test="idrRemark != null" >
  69. #{idrRemark,jdbcType=VARCHAR},
  70. </if>
  71. <if test="idrIsdel != null" >
  72. #{idrIsdel,jdbcType=INTEGER},
  73. </if>
  74. </trim>
  75. </insert>
  76. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpDuctusException" >
  77. update inp_ductus_exception
  78. <set >
  79. <if test="idrId != null" >
  80. IDR_ID = #{idrId,jdbcType=INTEGER},
  81. </if>
  82. <if test="idrExceptionCode != null" >
  83. IDR_Exception_Code = #{idrExceptionCode,jdbcType=VARCHAR},
  84. </if>
  85. <if test="idrException != null" >
  86. IDR_Exception = #{idrException,jdbcType=VARCHAR},
  87. </if>
  88. <if test="idrRemark != null" >
  89. IDR_Remark = #{idrRemark,jdbcType=VARCHAR},
  90. </if>
  91. <if test="idrIsdel != null" >
  92. IDR_IsDel = #{idrIsdel,jdbcType=INTEGER},
  93. </if>
  94. </set>
  95. where IDE_ID = #{ideId,jdbcType=INTEGER}
  96. </update>
  97. <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpDuctusException" >
  98. update inp_ductus_exception
  99. set IDR_ID = #{idrId,jdbcType=INTEGER},
  100. IDR_Exception_Code = #{idrExceptionCode,jdbcType=VARCHAR},
  101. IDR_Exception = #{idrException,jdbcType=VARCHAR},
  102. IDR_Remark = #{idrRemark,jdbcType=VARCHAR},
  103. IDR_IsDel = #{idrIsdel,jdbcType=INTEGER}
  104. where IDE_ID = #{ideId,jdbcType=INTEGER}
  105. </update>
  106. <insert id="batchInsert">
  107. insert into inp_ductus_exception (IDR_ID, IDR_Exception_Code,
  108. IDR_Exception, IDR_Remark, IDR_IsDel
  109. )
  110. values
  111. <foreach collection="list" item="item" separator=",">
  112. (#{item.idrId,jdbcType=INTEGER}, #{item.idrExceptionCode,jdbcType=VARCHAR},
  113. #{item.idrException,jdbcType=VARCHAR}, #{item.idrRemark,jdbcType=VARCHAR}, 0
  114. )
  115. </foreach>
  116. </insert>
  117. <update id="delByIdrId">
  118. update inp_ductus_exception
  119. set IDR_IsDel = -1
  120. where IDR_ID = #{idrId,jdbcType=INTEGER}
  121. </update>
  122. </mapper>