DicIoUnitMapper.xml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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.DicIoUnitMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.DicIoUnit" >
  5. <id column="DIU_ID" property="diuId" jdbcType="INTEGER" />
  6. <result column="DIO_ID" property="dioId" jdbcType="INTEGER" />
  7. <result column="DIU_UnitCode" property="diuUnitcode" jdbcType="VARCHAR" />
  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. DIU_ID, DIO_ID, DIU_UnitCode, 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_unit
  19. where DIU_IsDel = 0 and DIU_ID = #{diuId,jdbcType=INTEGER}
  20. </select>
  21. <select id="selectByDioId" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  22. select
  23. <include refid="Base_Column_List" />
  24. from dic_io_unit
  25. where DIU_IsDel = 0 and DIO_ID = #{dioId,jdbcType=INTEGER}
  26. </select>
  27. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  28. delete from dic_io_unit
  29. where DIU_ID = #{diuId,jdbcType=INTEGER}
  30. </delete>
  31. <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicIoUnit" >
  32. insert into dic_io_unit
  33. <trim prefix="(" suffix=")" suffixOverrides="," >
  34. <if test="diuId != null" >
  35. DIU_ID,
  36. </if>
  37. <if test="dioId != null" >
  38. DIO_ID,
  39. </if>
  40. <if test="diuUnitcode != null" >
  41. DIU_UnitCode,
  42. </if>
  43. <if test="diuOperationTime != null" >
  44. DIU_Operation_Time,
  45. </if>
  46. <if test="diuOperator != null" >
  47. DIU_Operator,
  48. </if>
  49. <if test="diuIsdel != null" >
  50. DIU_IsDel,
  51. </if>
  52. </trim>
  53. <trim prefix="values (" suffix=")" suffixOverrides="," >
  54. <if test="diuId != null" >
  55. #{diuId,jdbcType=INTEGER},
  56. </if>
  57. <if test="dioId != null" >
  58. #{dioId,jdbcType=INTEGER},
  59. </if>
  60. <if test="diuUnitcode != null" >
  61. #{diuUnitcode,jdbcType=VARCHAR},
  62. </if>
  63. <if test="diuOperationTime != null" >
  64. #{diuOperationTime,jdbcType=TIMESTAMP},
  65. </if>
  66. <if test="diuOperator != null" >
  67. #{diuOperator,jdbcType=VARCHAR},
  68. </if>
  69. <if test="diuIsdel != null" >
  70. #{diuIsdel,jdbcType=INTEGER},
  71. </if>
  72. </trim>
  73. </insert>
  74. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.DicIoUnit" >
  75. update dic_io_unit
  76. <set >
  77. <if test="dioId != null" >
  78. DIO_ID = #{dioId,jdbcType=INTEGER},
  79. </if>
  80. <if test="diuUnitcode != null" >
  81. DIU_UnitCode = #{diuUnitcode,jdbcType=VARCHAR},
  82. </if>
  83. <if test="diuOperationTime != null" >
  84. DIU_Operation_Time = #{diuOperationTime,jdbcType=TIMESTAMP},
  85. </if>
  86. <if test="diuOperator != null" >
  87. DIU_Operator = #{diuOperator,jdbcType=VARCHAR},
  88. </if>
  89. <if test="diuIsdel != null" >
  90. DIU_IsDel = #{diuIsdel,jdbcType=INTEGER},
  91. </if>
  92. </set>
  93. where DIU_ID = #{diuId,jdbcType=INTEGER}
  94. </update>
  95. <select id="selectAllUnit" resultMap="BaseResultMap" >
  96. select
  97. <include refid="Base_Column_List" />
  98. from dic_io_unit
  99. where DIU_IsDel = 0
  100. </select>
  101. </mapper>