BBusiEcardPriceMapper.xml 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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.ruoyi.voluntary.mapper.BBusiEcardPriceMapper">
  6. <resultMap type="BBusiEcardPrice" id="BBusiEcardPriceResult">
  7. <result property="id" column="id" />
  8. <result property="greadId" column="greadId" />
  9. <result property="price" column="price" />
  10. <result property="year" column="year" />
  11. <result property="outTime" column="outTime" />
  12. </resultMap>
  13. <sql id="selectBBusiEcardPriceVo">
  14. select id, greadId, price, year, outTime from b_busi_ecard_price
  15. </sql>
  16. <select id="selectBBusiEcardPriceList" parameterType="BBusiEcardPrice" resultMap="BBusiEcardPriceResult">
  17. <include refid="selectBBusiEcardPriceVo"/>
  18. <where>
  19. <if test="greadId != null "> and greadId = #{greadId}</if>
  20. <if test="price != null "> and price = #{price}</if>
  21. <if test="year != null "> and year = #{year}</if>
  22. <if test="outTime != null "> and outTime = #{outTime}</if>
  23. </where>
  24. </select>
  25. <select id="selectBBusiEcardPriceById" parameterType="Long" resultMap="BBusiEcardPriceResult">
  26. <include refid="selectBBusiEcardPriceVo"/>
  27. where id = #{id}
  28. </select>
  29. <insert id="insertBBusiEcardPrice" parameterType="BBusiEcardPrice" useGeneratedKeys="true" keyProperty="id">
  30. insert into b_busi_ecard_price
  31. <trim prefix="(" suffix=")" suffixOverrides=",">
  32. <if test="greadId != null">greadId,</if>
  33. <if test="price != null">price,</if>
  34. <if test="year != null">year,</if>
  35. <if test="outTime != null">outTime,</if>
  36. </trim>
  37. <trim prefix="values (" suffix=")" suffixOverrides=",">
  38. <if test="greadId != null">#{greadId},</if>
  39. <if test="price != null">#{price},</if>
  40. <if test="year != null">#{year},</if>
  41. <if test="outTime != null">#{outTime},</if>
  42. </trim>
  43. </insert>
  44. <update id="updateBBusiEcardPrice" parameterType="BBusiEcardPrice">
  45. update b_busi_ecard_price
  46. <trim prefix="SET" suffixOverrides=",">
  47. <if test="greadId != null">greadId = #{greadId},</if>
  48. <if test="price != null">price = #{price},</if>
  49. <if test="year != null">year = #{year},</if>
  50. <if test="outTime != null">outTime = #{outTime},</if>
  51. </trim>
  52. where id = #{id}
  53. </update>
  54. <delete id="deleteBBusiEcardPriceById" parameterType="Long">
  55. delete from b_busi_ecard_price where id = #{id}
  56. </delete>
  57. <delete id="deleteBBusiEcardPriceByIds" parameterType="String">
  58. delete from b_busi_ecard_price where id in
  59. <foreach item="id" collection="array" open="(" separator="," close=")">
  60. #{id}
  61. </foreach>
  62. </delete>
  63. </mapper>