InpIoPropertyMapper.xml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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.InpIoPropertyMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpIoProperty" >
  5. <id column="IOP_ID" property="iopId" jdbcType="INTEGER" />
  6. <result column="IIO_ID" property="iioId" jdbcType="INTEGER" />
  7. <result column="DIP_ID" property="dipId" jdbcType="INTEGER" />
  8. <result column="IOP_Value" property="iopValue" jdbcType="VARCHAR" />
  9. <result column="IOP_IsDel" property="iopIsdel" jdbcType="INTEGER" />
  10. </resultMap>
  11. <sql id="Base_Column_List" >
  12. IOP_ID, IIO_ID, DIP_ID, IOP_Value, IOP_IsDel
  13. </sql>
  14. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  15. select
  16. <include refid="Base_Column_List" />
  17. from inp_io_property
  18. where IOP_ID = #{iopId,jdbcType=INTEGER}
  19. </select>
  20. <select id="selectBatchIo" resultMap="BaseResultMap" parameterType="List" >
  21. select
  22. <include refid="Base_Column_List" />
  23. from inp_io_property
  24. where IOP_IsDel = 0 and IIO_ID in
  25. <foreach collection="list" item="item" index="index" separator="," open="(" close=")">
  26. #{item,jdbcType=INTEGER}
  27. </foreach>
  28. </select>
  29. <select id="selectByDIOID" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  30. select
  31. <include refid="Base_Column_List" />
  32. from inp_io_property
  33. where IOP_IsDel = 0 and IIO_ID = #{dioId,jdbcType=INTEGER}
  34. </select>
  35. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  36. delete from inp_io_property
  37. where IOP_ID = #{iopId,jdbcType=INTEGER}
  38. </delete>
  39. <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpIoProperty" >
  40. insert into inp_io_property
  41. <trim prefix="(" suffix=")" suffixOverrides="," >
  42. <if test="iopId != null" >
  43. IOP_ID,
  44. </if>
  45. <if test="iioId != null" >
  46. IIO_ID,
  47. </if>
  48. <if test="dipId != null" >
  49. DIP_ID,
  50. </if>
  51. <if test="iopValue != null" >
  52. IOP_Value,
  53. </if>
  54. <if test="iopIsdel != null" >
  55. IOP_IsDel,
  56. </if>
  57. </trim>
  58. <trim prefix="values (" suffix=")" suffixOverrides="," >
  59. <if test="iopId != null" >
  60. #{iopId,jdbcType=INTEGER},
  61. </if>
  62. <if test="iioId != null" >
  63. #{iioId,jdbcType=INTEGER},
  64. </if>
  65. <if test="dipId != null" >
  66. #{dipId,jdbcType=INTEGER},
  67. </if>
  68. <if test="iopValue != null" >
  69. #{iopValue,jdbcType=VARCHAR},
  70. </if>
  71. <if test="iopIsdel != null" >
  72. #{iopIsdel,jdbcType=INTEGER},
  73. </if>
  74. </trim>
  75. </insert>
  76. <insert id="batchInsert" parameterType="java.util.List">
  77. insert into inp_io_property (IIO_ID, DIP_ID,IOP_Value)
  78. values
  79. <foreach collection="list" item="item" separator=",">
  80. (#{item.iioId,jdbcType=INTEGER}, #{item.dipId,jdbcType=INTEGER}, #{item.iopValue,jdbcType=VARCHAR})
  81. </foreach>
  82. </insert>
  83. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpIoProperty" >
  84. update inp_io_property
  85. <set >
  86. <if test="iioId != null" >
  87. IIO_ID = #{iioId,jdbcType=INTEGER},
  88. </if>
  89. <if test="dipId != null" >
  90. DIP_ID = #{dipId,jdbcType=INTEGER},
  91. </if>
  92. <if test="iopValue != null" >
  93. IOP_Value = #{iopValue,jdbcType=VARCHAR},
  94. </if>
  95. <if test="iopIsdel != null" >
  96. IOP_IsDel = #{iopIsdel,jdbcType=INTEGER},
  97. </if>
  98. </set>
  99. where IOP_ID = #{iopId,jdbcType=INTEGER}
  100. </update>
  101. <update id="updateByStatus" parameterType="java.lang.Integer" >
  102. update inp_io_property
  103. set IOP_IsDel = -1
  104. where IIO_ID = #{iioId,jdbcType=INTEGER}
  105. </update>
  106. </mapper>