TMineFinancialMapper.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  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.TMineFinancialMapper">
  6. <resultMap type="TMineFinancial" id="TMineFinancialResult">
  7. <result property="id" column="id" />
  8. <result property="title" column="title" />
  9. <result property="icon" column="icon" />
  10. <result property="status" column="status" />
  11. <result property="days" column="days" />
  12. <result property="defaultOdds" column="default_odds" />
  13. <result property="minOdds" column="min_odds" />
  14. <result property="maxOdds" column="max_odds" />
  15. <result property="timeLimit" column="time_limit" />
  16. <result property="limitMin" column="limit_min" />
  17. <result property="limitMax" column="limit_max" />
  18. <result property="isHot" column="is_hot" />
  19. <result property="sort" column="sort" />
  20. <result property="createBy" column="create_by" />
  21. <result property="createTime" column="create_time" />
  22. <result property="updateBy" column="update_by" />
  23. <result property="updateTime" column="update_time" />
  24. <result property="buyPurchase" column="buy_purchase" />
  25. <result property="avgRate" column="avg_rate" />
  26. <result property="coin" column="coin" />
  27. <result property="classify" column="classify" />
  28. <result property="basicInvestAmount" column="basic_invest_amount" />
  29. <result property="totalInvestAmount" column="total_invest_amount" />
  30. <result property="level" column="level" />
  31. <result property="process" column="process" />
  32. <result property="remainAmount" column="remain_amount" />
  33. <result property="remark" column="remark" />
  34. <result property="purchasedAmount" column="purchased_amount" />
  35. <result property="problem" column="problem" />
  36. <result property="prodectIntroduction" column="prodect_introduction" />
  37. </resultMap>
  38. <sql id="selectTMineFinancialVo">
  39. select id, title, icon, status, days, default_odds, min_odds, max_odds, time_limit, limit_min, limit_max, is_hot, sort, create_by, create_time, update_by, update_time, buy_purchase, avg_rate, coin, classify, basic_invest_amount, total_invest_amount, level, process, remain_amount, remark, purchased_amount, problem, prodect_introduction from t_mine_financial
  40. </sql>
  41. <select id="selectTMineFinancialList" parameterType="TMineFinancial" resultMap="TMineFinancialResult">
  42. <include refid="selectTMineFinancialVo"/>
  43. <where>
  44. <if test="title != null and title != ''"> and title = #{title}</if>
  45. <if test="icon != null and icon != ''"> and icon = #{icon}</if>
  46. <if test="status != null "> and status = #{status}</if>
  47. <if test="days != null and days != ''"> and days = #{days}</if>
  48. <if test="defaultOdds != null "> and default_odds = #{defaultOdds}</if>
  49. <if test="minOdds != null "> and min_odds = #{minOdds}</if>
  50. <if test="maxOdds != null "> and max_odds = #{maxOdds}</if>
  51. <if test="timeLimit != null "> and time_limit = #{timeLimit}</if>
  52. <if test="limitMin != null "> and limit_min = #{limitMin}</if>
  53. <if test="limitMax != null "> and limit_max = #{limitMax}</if>
  54. <if test="isHot != null "> and is_hot = #{isHot}</if>
  55. <if test="sort != null "> and sort = #{sort}</if>
  56. <if test="buyPurchase != null "> and buy_purchase = #{buyPurchase}</if>
  57. <if test="avgRate != null "> and avg_rate = #{avgRate}</if>
  58. <if test="coin != null and coin != ''"> and coin = #{coin}</if>
  59. <if test="classify != null and classify != ''"> and classify = #{classify}</if>
  60. <if test="basicInvestAmount != null "> and basic_invest_amount = #{basicInvestAmount}</if>
  61. <if test="totalInvestAmount != null "> and total_invest_amount = #{totalInvestAmount}</if>
  62. <if test="level != null "> and level = #{level}</if>
  63. <if test="process != null "> and process = #{process}</if>
  64. <if test="remainAmount != null "> and remain_amount = #{remainAmount}</if>
  65. <if test="purchasedAmount != null "> and purchased_amount = #{purchasedAmount}</if>
  66. <if test="problem != null and problem != ''"> and problem = #{problem}</if>
  67. <if test="prodectIntroduction != null and prodectIntroduction != ''"> and prodect_introduction = #{prodectIntroduction}</if>
  68. </where>
  69. </select>
  70. <select id="selectTMineFinancialById" parameterType="Long" resultMap="TMineFinancialResult">
  71. <include refid="selectTMineFinancialVo"/>
  72. where id = #{id}
  73. </select>
  74. <insert id="insertTMineFinancial" parameterType="TMineFinancial" useGeneratedKeys="true" keyProperty="id">
  75. insert into t_mine_financial
  76. <trim prefix="(" suffix=")" suffixOverrides=",">
  77. <if test="title != null and title != ''">title,</if>
  78. <if test="icon != null">icon,</if>
  79. <if test="status != null">status,</if>
  80. <if test="days != null and days != ''">days,</if>
  81. <if test="defaultOdds != null">default_odds,</if>
  82. <if test="minOdds != null">min_odds,</if>
  83. <if test="maxOdds != null">max_odds,</if>
  84. <if test="timeLimit != null">time_limit,</if>
  85. <if test="limitMin != null">limit_min,</if>
  86. <if test="limitMax != null">limit_max,</if>
  87. <if test="isHot != null">is_hot,</if>
  88. <if test="sort != null">sort,</if>
  89. <if test="createBy != null">create_by,</if>
  90. <if test="createTime != null">create_time,</if>
  91. <if test="updateBy != null">update_by,</if>
  92. <if test="updateTime != null">update_time,</if>
  93. <if test="buyPurchase != null">buy_purchase,</if>
  94. <if test="avgRate != null">avg_rate,</if>
  95. <if test="coin != null">coin,</if>
  96. <if test="classify != null">classify,</if>
  97. <if test="basicInvestAmount != null">basic_invest_amount,</if>
  98. <if test="totalInvestAmount != null">total_invest_amount,</if>
  99. <if test="level != null">level,</if>
  100. <if test="process != null">process,</if>
  101. <if test="remainAmount != null">remain_amount,</if>
  102. <if test="remark != null">remark,</if>
  103. <if test="purchasedAmount != null">purchased_amount,</if>
  104. <if test="problem != null">problem,</if>
  105. <if test="prodectIntroduction != null">prodect_introduction,</if>
  106. </trim>
  107. <trim prefix="values (" suffix=")" suffixOverrides=",">
  108. <if test="title != null and title != ''">#{title},</if>
  109. <if test="icon != null">#{icon},</if>
  110. <if test="status != null">#{status},</if>
  111. <if test="days != null and days != ''">#{days},</if>
  112. <if test="defaultOdds != null">#{defaultOdds},</if>
  113. <if test="minOdds != null">#{minOdds},</if>
  114. <if test="maxOdds != null">#{maxOdds},</if>
  115. <if test="timeLimit != null">#{timeLimit},</if>
  116. <if test="limitMin != null">#{limitMin},</if>
  117. <if test="limitMax != null">#{limitMax},</if>
  118. <if test="isHot != null">#{isHot},</if>
  119. <if test="sort != null">#{sort},</if>
  120. <if test="createBy != null">#{createBy},</if>
  121. <if test="createTime != null">#{createTime},</if>
  122. <if test="updateBy != null">#{updateBy},</if>
  123. <if test="updateTime != null">#{updateTime},</if>
  124. <if test="buyPurchase != null">#{buyPurchase},</if>
  125. <if test="avgRate != null">#{avgRate},</if>
  126. <if test="coin != null">#{coin},</if>
  127. <if test="classify != null">#{classify},</if>
  128. <if test="basicInvestAmount != null">#{basicInvestAmount},</if>
  129. <if test="totalInvestAmount != null">#{totalInvestAmount},</if>
  130. <if test="level != null">#{level},</if>
  131. <if test="process != null">#{process},</if>
  132. <if test="remainAmount != null">#{remainAmount},</if>
  133. <if test="remark != null">#{remark},</if>
  134. <if test="purchasedAmount != null">#{purchasedAmount},</if>
  135. <if test="problem != null">#{problem},</if>
  136. <if test="prodectIntroduction != null">#{prodectIntroduction},</if>
  137. </trim>
  138. </insert>
  139. <update id="updateTMineFinancial" parameterType="TMineFinancial">
  140. update t_mine_financial
  141. <trim prefix="SET" suffixOverrides=",">
  142. <if test="title != null and title != ''">title = #{title},</if>
  143. <if test="icon != null">icon = #{icon},</if>
  144. <if test="status != null">status = #{status},</if>
  145. <if test="days != null and days != ''">days = #{days},</if>
  146. <if test="defaultOdds != null">default_odds = #{defaultOdds},</if>
  147. <if test="minOdds != null">min_odds = #{minOdds},</if>
  148. <if test="maxOdds != null">max_odds = #{maxOdds},</if>
  149. <if test="timeLimit != null">time_limit = #{timeLimit},</if>
  150. <if test="limitMin != null">limit_min = #{limitMin},</if>
  151. <if test="limitMax != null">limit_max = #{limitMax},</if>
  152. <if test="isHot != null">is_hot = #{isHot},</if>
  153. <if test="sort != null">sort = #{sort},</if>
  154. <if test="createBy != null">create_by = #{createBy},</if>
  155. <if test="createTime != null">create_time = #{createTime},</if>
  156. <if test="updateBy != null">update_by = #{updateBy},</if>
  157. <if test="updateTime != null">update_time = #{updateTime},</if>
  158. <if test="buyPurchase != null">buy_purchase = #{buyPurchase},</if>
  159. <if test="avgRate != null">avg_rate = #{avgRate},</if>
  160. <if test="coin != null">coin = #{coin},</if>
  161. <if test="classify != null">classify = #{classify},</if>
  162. <if test="basicInvestAmount != null">basic_invest_amount = #{basicInvestAmount},</if>
  163. <if test="totalInvestAmount != null">total_invest_amount = #{totalInvestAmount},</if>
  164. <if test="level != null">level = #{level},</if>
  165. <if test="process != null">process = #{process},</if>
  166. <if test="remainAmount != null">remain_amount = #{remainAmount},</if>
  167. <if test="remark != null">remark = #{remark},</if>
  168. <if test="purchasedAmount != null">purchased_amount = #{purchasedAmount},</if>
  169. <if test="problem != null">problem = #{problem},</if>
  170. <if test="prodectIntroduction != null">prodect_introduction = #{prodectIntroduction},</if>
  171. </trim>
  172. where id = #{id}
  173. </update>
  174. <delete id="deleteTMineFinancialById" parameterType="Long">
  175. delete from t_mine_financial where id = #{id}
  176. </delete>
  177. <delete id="deleteTMineFinancialByIds" parameterType="String">
  178. delete from t_mine_financial where id in
  179. <foreach item="id" collection="array" open="(" separator="," close=")">
  180. #{id}
  181. </foreach>
  182. </delete>
  183. </mapper>