BdglAntiepidemicAmountMapper.xml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.supervision.medicalhealth.mapper.BdglAntiepidemicAmountMapper">
  6. <resultMap type="BdglAntiepidemicAmount" id="BdglAntiepidemicAmountResult">
  7. <result property="id" column="id" />
  8. <result property="durgArchivesId" column="durg_archives_id" />
  9. <result property="unitId" column="unit_id" />
  10. <result property="storeHouse" column="store_house" />
  11. <result property="amount" column="amount" />
  12. <result property="putIn" column="put_in" />
  13. <result property="putOut" column="put_out" />
  14. <result property="adminId" column="admin_id" />
  15. <result property="createtime" column="createtime" />
  16. <result property="updatetime" column="updatetime" />
  17. </resultMap>
  18. <sql id="selectBdglAntiepidemicAmountVo">
  19. select id, durg_archives_id, unit_id, store_house, amount, put_in, put_out, admin_id, createtime, updatetime from bdgl_antiepidemic_amount
  20. </sql>
  21. <select id="selectBdglAntiepidemicAmountList" parameterType="BdglAntiepidemicAmount" resultMap="BdglAntiepidemicAmountResult">
  22. <include refid="selectBdglAntiepidemicAmountVo"/>
  23. <where>
  24. <if test="durgArchivesId != null "> and durg_archives_id = #{durgArchivesId}</if>
  25. <if test="unitId != null "> and unit_id = #{unitId}</if>
  26. <if test="storeHouse != null "> and store_house = #{storeHouse}</if>
  27. <if test="amount != null "> and amount = #{amount}</if>
  28. <if test="putIn != null "> and put_in = #{putIn}</if>
  29. <if test="putOut != null "> and put_out = #{putOut}</if>
  30. <if test="adminId != null "> and admin_id = #{adminId}</if>
  31. <if test="createtime != null and createtime != ''"> and createtime = #{createtime}</if>
  32. <if test="updatetime != null and updatetime != ''"> and updatetime = #{updatetime}</if>
  33. </where>
  34. </select>
  35. <select id="selectBdglAntiepidemicAmountById" parameterType="Long" resultMap="BdglAntiepidemicAmountResult">
  36. <include refid="selectBdglAntiepidemicAmountVo"/>
  37. where id = #{id}
  38. </select>
  39. <insert id="insertBdglAntiepidemicAmount" parameterType="BdglAntiepidemicAmount" useGeneratedKeys="true" keyProperty="id">
  40. insert into bdgl_antiepidemic_amount
  41. <trim prefix="(" suffix=")" suffixOverrides=",">
  42. <if test="durgArchivesId != null">durg_archives_id,</if>
  43. <if test="unitId != null">unit_id,</if>
  44. <if test="storeHouse != null">store_house,</if>
  45. <if test="amount != null">amount,</if>
  46. <if test="putIn != null">put_in,</if>
  47. <if test="putOut != null">put_out,</if>
  48. <if test="adminId != null">admin_id,</if>
  49. <if test="createtime != null">createtime,</if>
  50. <if test="updatetime != null">updatetime,</if>
  51. </trim>
  52. <trim prefix="values (" suffix=")" suffixOverrides=",">
  53. <if test="durgArchivesId != null">#{durgArchivesId},</if>
  54. <if test="unitId != null">#{unitId},</if>
  55. <if test="storeHouse != null">#{storeHouse},</if>
  56. <if test="amount != null">#{amount},</if>
  57. <if test="putIn != null">#{putIn},</if>
  58. <if test="putOut != null">#{putOut},</if>
  59. <if test="adminId != null">#{adminId},</if>
  60. <if test="createtime != null">#{createtime},</if>
  61. <if test="updatetime != null">#{updatetime},</if>
  62. </trim>
  63. </insert>
  64. <update id="updateBdglAntiepidemicAmount" parameterType="BdglAntiepidemicAmount">
  65. update bdgl_antiepidemic_amount
  66. <trim prefix="SET" suffixOverrides=",">
  67. <if test="durgArchivesId != null">durg_archives_id = #{durgArchivesId},</if>
  68. <if test="unitId != null">unit_id = #{unitId},</if>
  69. <if test="storeHouse != null">store_house = #{storeHouse},</if>
  70. <if test="amount != null">amount = #{amount},</if>
  71. <if test="putIn != null">put_in = #{putIn},</if>
  72. <if test="putOut != null">put_out = #{putOut},</if>
  73. <if test="adminId != null">admin_id = #{adminId},</if>
  74. <if test="createtime != null">createtime = #{createtime},</if>
  75. <if test="updatetime != null">updatetime = #{updatetime},</if>
  76. </trim>
  77. where id = #{id}
  78. </update>
  79. <delete id="deleteBdglAntiepidemicAmountById" parameterType="Long">
  80. delete from bdgl_antiepidemic_amount where id = #{id}
  81. </delete>
  82. <delete id="deleteBdglAntiepidemicAmountByIds" parameterType="String">
  83. delete from bdgl_antiepidemic_amount where id in
  84. <foreach item="id" collection="array" open="(" separator="," close=")">
  85. #{id}
  86. </foreach>
  87. </delete>
  88. </mapper>