TNftProductMapper.xml 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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.bussiness.mapper.TNftProductMapper">
  6. <resultMap type="TNftProduct" id="TNftProductResult">
  7. <result property="id" column="id" />
  8. <result property="seriesId" column="series_id" />
  9. <result property="imgUrl" column="img_url" />
  10. <result property="userId" column="user_id" />
  11. <result property="price" column="price" />
  12. <result property="chainType" column="chain_type" />
  13. <result property="author" column="author" />
  14. <result property="holdAddress" column="hold_address" />
  15. <result property="handlingFee" column="handling_fee" />
  16. <result property="copyrightFee" column="copyright_fee" />
  17. <result property="des" column="des" />
  18. <result property="status" column="status" />
  19. <result property="saleStatus" column="sale_status" />
  20. <result property="endDate" column="end_date" />
  21. <result property="remark" column="remark" />
  22. <result property="createBy" column="create_by" />
  23. <result property="updateBy" column="update_by" />
  24. <result property="createTime" column="create_time" />
  25. <result property="updateTime" column="update_time" />
  26. <result property="searchValue" column="search_value" />
  27. <result property="delFlag" column="del_flag" />
  28. </resultMap>
  29. <sql id="selectTNftProductVo">
  30. select id, series_id, img_url, user_id, price, chain_type, author, hold_address, handling_fee, copyright_fee, des, status, sale_status, end_date, remark, create_by, update_by, create_time, update_time, search_value, del_flag from t_nft_product
  31. </sql>
  32. <select id="selectTNftProductList" parameterType="TNftProduct" resultMap="TNftProductResult">
  33. <include refid="selectTNftProductVo"/>
  34. <where>
  35. <if test="id != null "> and id = #{id}</if>
  36. <if test="seriesId != null "> and series_id = #{seriesId}</if>
  37. <if test="imgUrl != null and imgUrl != ''"> and img_url = #{imgUrl}</if>
  38. <if test="userId != null "> and user_id = #{userId}</if>
  39. <if test="price != null "> and price = #{price}</if>
  40. <if test="chainType != null and chainType != ''"> and chain_type = #{chainType}</if>
  41. <if test="author != null and author != ''"> and author = #{author}</if>
  42. <if test="holdAddress != null and holdAddress != ''"> and hold_address = #{holdAddress}</if>
  43. <if test="handlingFee != null "> and handling_fee = #{handlingFee}</if>
  44. <if test="copyrightFee != null "> and copyright_fee = #{copyrightFee}</if>
  45. <if test="des != null and des != ''"> and des = #{des}</if>
  46. <if test="status != null "> and status = #{status}</if>
  47. <if test="saleStatus != null and saleStatus != ''"> and sale_status = #{saleStatus}</if>
  48. <if test="endDate != null "> and end_date = #{endDate}</if>
  49. <if test="searchValue != null and searchValue != ''"> and search_value = #{searchValue}</if>
  50. </where>
  51. </select>
  52. <select id="selectTNftProductById" parameterType="Long" resultMap="TNftProductResult">
  53. <include refid="selectTNftProductVo"/>
  54. where id = #{id}
  55. </select>
  56. <insert id="insertTNftProduct" parameterType="TNftProduct" useGeneratedKeys="true" keyProperty="id">
  57. insert into t_nft_product
  58. <trim prefix="(" suffix=")" suffixOverrides=",">
  59. <if test="seriesId != null">series_id,</if>
  60. <if test="imgUrl != null">img_url,</if>
  61. <if test="userId != null">user_id,</if>
  62. <if test="price != null">price,</if>
  63. <if test="chainType != null">chain_type,</if>
  64. <if test="author != null">author,</if>
  65. <if test="holdAddress != null">hold_address,</if>
  66. <if test="handlingFee != null">handling_fee,</if>
  67. <if test="copyrightFee != null">copyright_fee,</if>
  68. <if test="des != null">des,</if>
  69. <if test="status != null">status,</if>
  70. <if test="saleStatus != null">sale_status,</if>
  71. <if test="endDate != null">end_date,</if>
  72. <if test="remark != null">remark,</if>
  73. <if test="createBy != null">create_by,</if>
  74. <if test="updateBy != null">update_by,</if>
  75. <if test="createTime != null">create_time,</if>
  76. <if test="updateTime != null">update_time,</if>
  77. <if test="searchValue != null">search_value,</if>
  78. <if test="delFlag != null">del_flag,</if>
  79. </trim>
  80. <trim prefix="values (" suffix=")" suffixOverrides=",">
  81. <if test="seriesId != null">#{seriesId},</if>
  82. <if test="imgUrl != null">#{imgUrl},</if>
  83. <if test="userId != null">#{userId},</if>
  84. <if test="price != null">#{price},</if>
  85. <if test="chainType != null">#{chainType},</if>
  86. <if test="author != null">#{author},</if>
  87. <if test="holdAddress != null">#{holdAddress},</if>
  88. <if test="handlingFee != null">#{handlingFee},</if>
  89. <if test="copyrightFee != null">#{copyrightFee},</if>
  90. <if test="des != null">#{des},</if>
  91. <if test="status != null">#{status},</if>
  92. <if test="saleStatus != null">#{saleStatus},</if>
  93. <if test="endDate != null">#{endDate},</if>
  94. <if test="remark != null">#{remark},</if>
  95. <if test="createBy != null">#{createBy},</if>
  96. <if test="updateBy != null">#{updateBy},</if>
  97. <if test="createTime != null">#{createTime},</if>
  98. <if test="updateTime != null">#{updateTime},</if>
  99. <if test="searchValue != null">#{searchValue},</if>
  100. <if test="delFlag != null">#{delFlag},</if>
  101. </trim>
  102. </insert>
  103. <update id="updateTNftProduct" parameterType="TNftProduct">
  104. update t_nft_product
  105. <trim prefix="SET" suffixOverrides=",">
  106. <if test="seriesId != null">series_id = #{seriesId},</if>
  107. <if test="imgUrl != null">img_url = #{imgUrl},</if>
  108. <if test="userId != null">user_id = #{userId},</if>
  109. <if test="price != null">price = #{price},</if>
  110. <if test="chainType != null">chain_type = #{chainType},</if>
  111. <if test="author != null">author = #{author},</if>
  112. <if test="holdAddress != null">hold_address = #{holdAddress},</if>
  113. <if test="handlingFee != null">handling_fee = #{handlingFee},</if>
  114. <if test="copyrightFee != null">copyright_fee = #{copyrightFee},</if>
  115. <if test="des != null">des = #{des},</if>
  116. <if test="status != null">status = #{status},</if>
  117. <if test="saleStatus != null">sale_status = #{saleStatus},</if>
  118. <if test="endDate != null">end_date = #{endDate},</if>
  119. <if test="remark != null">remark = #{remark},</if>
  120. <if test="createBy != null">create_by = #{createBy},</if>
  121. <if test="updateBy != null">update_by = #{updateBy},</if>
  122. <if test="createTime != null">create_time = #{createTime},</if>
  123. <if test="updateTime != null">update_time = #{updateTime},</if>
  124. <if test="searchValue != null">search_value = #{searchValue},</if>
  125. <if test="delFlag != null">del_flag = #{delFlag},</if>
  126. </trim>
  127. where id = #{id}
  128. </update>
  129. <delete id="deleteTNftProductById" parameterType="Long">
  130. delete from t_nft_product where id = #{id}
  131. </delete>
  132. <delete id="deleteTNftProductByIds" parameterType="String">
  133. delete from t_nft_product where id in
  134. <foreach item="id" collection="array" open="(" separator="," close=")">
  135. #{id}
  136. </foreach>
  137. </delete>
  138. </mapper>