DicCatheterModelMapper.xml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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.DicCatheterModelMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.DicCatheterModel" >
  5. <id column="DCM_ID" property="dcmId" jdbcType="INTEGER" />
  6. <result column="DC_ID" property="dcId" jdbcType="INTEGER" />
  7. <result column="DCM_Model" property="dcmModel" jdbcType="VARCHAR" />
  8. <result column="DCM_Operation_Time" property="dcmOperationTime" jdbcType="TIMESTAMP" />
  9. <result column="DCM_Operator" property="dcmOperator" jdbcType="VARCHAR" />
  10. <result column="DCM_IsDel" property="dcmIsdel" jdbcType="INTEGER" />
  11. </resultMap>
  12. <sql id="Base_Column_List" >
  13. DCM_ID, DC_ID, DCM_Model, DCM_Operation_Time, DCM_Operator, DCM_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_model
  19. where DCM_IsDel = 0 and DCM_ID = #{dcmId,jdbcType=INTEGER}
  20. </select>
  21. <select id="selectAllDcId" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  22. select
  23. <include refid="Base_Column_List" />
  24. from dic_catheter_model
  25. where DCM_IsDel = 0 and DC_ID = #{dcId,jdbcType=INTEGER}
  26. </select>
  27. <select id="selectAll" resultMap="BaseResultMap" parameterType="List" >
  28. select
  29. <include refid="Base_Column_List" />
  30. from dic_catheter_model
  31. where DCM_IsDel = 0
  32. and DC_ID in
  33. <foreach collection="list" item="item" separator="," index="index" open="(" close=")">
  34. #{item}
  35. </foreach>
  36. </select>
  37. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  38. delete from dic_catheter_model
  39. where DCM_ID = #{dcmId,jdbcType=INTEGER}
  40. </delete>
  41. <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicCatheterModel" >
  42. insert into dic_catheter_model (DCM_ID, DC_ID, DCM_Model,
  43. DCM_Operation_Time, DCM_Operator, DCM_IsDel
  44. )
  45. values (#{dcmId,jdbcType=INTEGER}, #{dcId,jdbcType=INTEGER}, #{dcmModel,jdbcType=VARCHAR},
  46. #{dcmOperationTime,jdbcType=TIMESTAMP}, #{dcmOperator,jdbcType=VARCHAR}, #{dcmIsdel,jdbcType=INTEGER}
  47. )
  48. </insert>
  49. <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicCatheterModel" >
  50. insert into dic_catheter_model
  51. <trim prefix="(" suffix=")" suffixOverrides="," >
  52. <if test="dcmId != null" >
  53. DCM_ID,
  54. </if>
  55. <if test="dcId != null" >
  56. DC_ID,
  57. </if>
  58. <if test="dcmModel != null" >
  59. DCM_Model,
  60. </if>
  61. <if test="dcmOperationTime != null" >
  62. DCM_Operation_Time,
  63. </if>
  64. <if test="dcmOperator != null" >
  65. DCM_Operator,
  66. </if>
  67. <if test="dcmIsdel != null" >
  68. DCM_IsDel,
  69. </if>
  70. </trim>
  71. <trim prefix="values (" suffix=")" suffixOverrides="," >
  72. <if test="dcmId != null" >
  73. #{dcmId,jdbcType=INTEGER},
  74. </if>
  75. <if test="dcId != null" >
  76. #{dcId,jdbcType=INTEGER},
  77. </if>
  78. <if test="dcmModel != null" >
  79. #{dcmModel,jdbcType=VARCHAR},
  80. </if>
  81. <if test="dcmOperationTime != null" >
  82. #{dcmOperationTime,jdbcType=TIMESTAMP},
  83. </if>
  84. <if test="dcmOperator != null" >
  85. #{dcmOperator,jdbcType=VARCHAR},
  86. </if>
  87. <if test="dcmIsdel != null" >
  88. #{dcmIsdel,jdbcType=INTEGER},
  89. </if>
  90. </trim>
  91. </insert>
  92. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicCatheterModel" >
  93. update dic_catheter_model
  94. <set >
  95. <if test="dcId != null" >
  96. DC_ID = #{dcId,jdbcType=INTEGER},
  97. </if>
  98. <if test="dcmModel != null" >
  99. DCM_Model = #{dcmModel,jdbcType=VARCHAR},
  100. </if>
  101. <if test="dcmOperationTime != null" >
  102. DCM_Operation_Time = #{dcmOperationTime,jdbcType=TIMESTAMP},
  103. </if>
  104. <if test="dcmOperator != null" >
  105. DCM_Operator = #{dcmOperator,jdbcType=VARCHAR},
  106. </if>
  107. <if test="dcmIsdel != null" >
  108. DCM_IsDel = #{dcmIsdel,jdbcType=INTEGER},
  109. </if>
  110. </set>
  111. where DCM_ID = #{dcmId,jdbcType=INTEGER}
  112. </update>
  113. <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicCatheterModel" >
  114. update dic_catheter_model
  115. set DC_ID = #{dcId,jdbcType=INTEGER},
  116. DCM_Model = #{dcmModel,jdbcType=VARCHAR},
  117. DCM_Operation_Time = #{dcmOperationTime,jdbcType=TIMESTAMP},
  118. DCM_Operator = #{dcmOperator,jdbcType=VARCHAR},
  119. DCM_IsDel = #{dcmIsdel,jdbcType=INTEGER}
  120. where DCM_ID = #{dcmId,jdbcType=INTEGER}
  121. </update>
  122. </mapper>