DicIoCatheterMapper.xml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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.DicIoCatheterMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.DicIoCatheter" >
  5. <id column="IOC_ID" property="iocId" jdbcType="INTEGER" />
  6. <result column="DIO_ID" property="dioId" jdbcType="INTEGER" />
  7. <result column="DC_ID" property="dcId" jdbcType="INTEGER" />
  8. <result column="DIU_Operation_Time" property="diuOperationTime" jdbcType="TIMESTAMP" />
  9. <result column="DIU_Operator" property="diuOperator" jdbcType="VARCHAR" />
  10. <result column="DIU_IsDel" property="diuIsdel" jdbcType="INTEGER" />
  11. </resultMap>
  12. <sql id="Base_Column_List" >
  13. IOC_ID, DIO_ID, DC_ID, DIU_Operation_Time, DIU_Operator, DIU_IsDel
  14. </sql>
  15. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  16. select
  17. <include refid="Base_Column_List" />
  18. from dic_io_catheter
  19. where DIU_IsDel = 0 and IOC_ID = #{iocId,jdbcType=INTEGER}
  20. </select>
  21. <select id="selectByDioId" resultType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicCatheter" parameterType="java.lang.Integer" >
  22. select
  23. dc.DC_ID as dcId,
  24. dc.HI_ID as hiId,
  25. dc.DC_Catheter_Name as dcCatheterName
  26. from dic_catheter dc
  27. LEFT JOIN dic_io_catheter dic
  28. on dc.DC_ID = dic.DC_ID
  29. where dc.DC_IsDel = 0 and dic.DIU_IsDel = 0
  30. and dic.DIO_ID = #{dioId,jdbcType=INTEGER}
  31. </select>
  32. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  33. delete from dic_io_catheter
  34. where IOC_ID = #{iocId,jdbcType=INTEGER}
  35. </delete>
  36. <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicIoCatheter" >
  37. insert into dic_io_catheter
  38. <trim prefix="(" suffix=")" suffixOverrides="," >
  39. <if test="iocId != null" >
  40. IOC_ID,
  41. </if>
  42. <if test="dioId != null" >
  43. DIO_ID,
  44. </if>
  45. <if test="dcId != null" >
  46. DC_ID,
  47. </if>
  48. <if test="diuOperationTime != null" >
  49. DIU_Operation_Time,
  50. </if>
  51. <if test="diuOperator != null" >
  52. DIU_Operator,
  53. </if>
  54. <if test="diuIsdel != null" >
  55. DIU_IsDel,
  56. </if>
  57. </trim>
  58. <trim prefix="values (" suffix=")" suffixOverrides="," >
  59. <if test="iocId != null" >
  60. #{iocId,jdbcType=INTEGER},
  61. </if>
  62. <if test="dioId != null" >
  63. #{dioId,jdbcType=INTEGER},
  64. </if>
  65. <if test="dcId != null" >
  66. #{dcId,jdbcType=INTEGER},
  67. </if>
  68. <if test="diuOperationTime != null" >
  69. #{diuOperationTime,jdbcType=TIMESTAMP},
  70. </if>
  71. <if test="diuOperator != null" >
  72. #{diuOperator,jdbcType=VARCHAR},
  73. </if>
  74. <if test="diuIsdel != null" >
  75. #{diuIsdel,jdbcType=INTEGER},
  76. </if>
  77. </trim>
  78. </insert>
  79. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicIoCatheter" >
  80. update dic_io_catheter
  81. <set >
  82. <if test="dioId != null" >
  83. DIO_ID = #{dioId,jdbcType=INTEGER},
  84. </if>
  85. <if test="dcId != null" >
  86. DC_ID = #{dcId,jdbcType=INTEGER},
  87. </if>
  88. <if test="diuOperationTime != null" >
  89. DIU_Operation_Time = #{diuOperationTime,jdbcType=TIMESTAMP},
  90. </if>
  91. <if test="diuOperator != null" >
  92. DIU_Operator = #{diuOperator,jdbcType=VARCHAR},
  93. </if>
  94. <if test="diuIsdel != null" >
  95. DIU_IsDel = #{diuIsdel,jdbcType=INTEGER},
  96. </if>
  97. </set>
  98. where IOC_ID = #{iocId,jdbcType=INTEGER}
  99. </update>
  100. </mapper>