DicCatheterPartMapper.xml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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.DicCatheterPartMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.DicCatheterPart" >
  5. <id column="DCP_ID" property="dcpId" jdbcType="INTEGER" />
  6. <result column="DC_ID" property="dcId" jdbcType="INTEGER" />
  7. <result column="DCP_Part" property="dcpPart" jdbcType="VARCHAR" />
  8. <result column="DIP_Operation_Time" property="dipOperationTime" jdbcType="TIMESTAMP" />
  9. <result column="DIP_Operator" property="dipOperator" jdbcType="VARCHAR" />
  10. <result column="DIP_IsDel" property="dipIsdel" jdbcType="INTEGER" />
  11. </resultMap>
  12. <sql id="Base_Column_List" >
  13. DCP_ID, DC_ID, DCP_Part, DIP_Operation_Time, DIP_Operator, DIP_IsDel
  14. </sql>
  15. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  16. select
  17. <include refid="Base_Column_List" />
  18. from dic_catheter_part
  19. where DIP_IsDel = 0 and DCP_ID = #{dcpId,jdbcType=INTEGER}
  20. </select>
  21. <select id="selectByCId" resultType="com.xinxin.topro.inpnurseservice.response.SysDictionaryDetailInfoResponse" parameterType="java.lang.Integer" >
  22. select
  23. d.SDD_ID as sddId,
  24. d.SDD_Detail_Code as sddDetailCode,
  25. d.SDD_Detail_Name as sddDetailName
  26. from dic_catheter_part a
  27. left join sys_dictionary_detail d on a.DCP_Part = d.SDD_Detail_Code
  28. where a.DIP_IsDel = 0 and a.DC_ID = #{dcId,jdbcType=INTEGER}
  29. </select>
  30. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  31. delete from dic_catheter_part
  32. where DCP_ID = #{dcpId,jdbcType=INTEGER}
  33. </delete>
  34. <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicCatheterPart" >
  35. insert into dic_catheter_part (DCP_ID, DC_ID, DCP_Part,
  36. DIP_Operation_Time, DIP_Operator, DIP_IsDel
  37. )
  38. values (#{dcpId,jdbcType=INTEGER}, #{dcId,jdbcType=INTEGER}, #{dcpPart,jdbcType=VARCHAR},
  39. #{dipOperationTime,jdbcType=TIMESTAMP}, #{dipOperator,jdbcType=VARCHAR}, #{dipIsdel,jdbcType=INTEGER}
  40. )
  41. </insert>
  42. <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicCatheterPart" >
  43. insert into dic_catheter_part
  44. <trim prefix="(" suffix=")" suffixOverrides="," >
  45. <if test="dcpId != null" >
  46. DCP_ID,
  47. </if>
  48. <if test="dcId != null" >
  49. DC_ID,
  50. </if>
  51. <if test="dcpPart != null" >
  52. DCP_Part,
  53. </if>
  54. <if test="dipOperationTime != null" >
  55. DIP_Operation_Time,
  56. </if>
  57. <if test="dipOperator != null" >
  58. DIP_Operator,
  59. </if>
  60. <if test="dipIsdel != null" >
  61. DIP_IsDel,
  62. </if>
  63. </trim>
  64. <trim prefix="values (" suffix=")" suffixOverrides="," >
  65. <if test="dcpId != null" >
  66. #{dcpId,jdbcType=INTEGER},
  67. </if>
  68. <if test="dcId != null" >
  69. #{dcId,jdbcType=INTEGER},
  70. </if>
  71. <if test="dcpPart != null" >
  72. #{dcpPart,jdbcType=VARCHAR},
  73. </if>
  74. <if test="dipOperationTime != null" >
  75. #{dipOperationTime,jdbcType=TIMESTAMP},
  76. </if>
  77. <if test="dipOperator != null" >
  78. #{dipOperator,jdbcType=VARCHAR},
  79. </if>
  80. <if test="dipIsdel != null" >
  81. #{dipIsdel,jdbcType=INTEGER},
  82. </if>
  83. </trim>
  84. </insert>
  85. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicCatheterPart" >
  86. update dic_catheter_part
  87. <set >
  88. <if test="dcId != null" >
  89. DC_ID = #{dcId,jdbcType=INTEGER},
  90. </if>
  91. <if test="dcpPart != null" >
  92. DCP_Part = #{dcpPart,jdbcType=VARCHAR},
  93. </if>
  94. <if test="dipOperationTime != null" >
  95. DIP_Operation_Time = #{dipOperationTime,jdbcType=TIMESTAMP},
  96. </if>
  97. <if test="dipOperator != null" >
  98. DIP_Operator = #{dipOperator,jdbcType=VARCHAR},
  99. </if>
  100. <if test="dipIsdel != null" >
  101. DIP_IsDel = #{dipIsdel,jdbcType=INTEGER},
  102. </if>
  103. </set>
  104. where DCP_ID = #{dcpId,jdbcType=INTEGER}
  105. </update>
  106. <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicCatheterPart" >
  107. update dic_catheter_part
  108. set DC_ID = #{dcId,jdbcType=INTEGER},
  109. DCP_Part = #{dcpPart,jdbcType=VARCHAR},
  110. DIP_Operation_Time = #{dipOperationTime,jdbcType=TIMESTAMP},
  111. DIP_Operator = #{dipOperator,jdbcType=VARCHAR},
  112. DIP_IsDel = #{dipIsdel,jdbcType=INTEGER}
  113. where DCP_ID = #{dcpId,jdbcType=INTEGER}
  114. </update>
  115. </mapper>