TContractCoinMapper.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  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.TContractCoinMapper">
  6. <resultMap type="TContractCoin" id="TContractCoinResult">
  7. <result property="id" column="id" />
  8. <result property="symbol" column="symbol" />
  9. <result property="coin" column="coin" />
  10. <result property="baseCoin" column="base_coin" />
  11. <result property="shareNumber" column="share_number" />
  12. <result property="leverage" column="leverage" />
  13. <result property="enable" column="enable" />
  14. <result property="visible" column="visible" />
  15. <result property="exchangeable" column="exchangeable" />
  16. <result property="enableOpenSell" column="enable_open_sell" />
  17. <result property="enableOpenBuy" column="enable_open_buy" />
  18. <result property="enableMarketSell" column="enable_market_sell" />
  19. <result property="enableMarketBuy" column="enable_market_buy" />
  20. <result property="openFee" column="open_fee" />
  21. <result property="closeFee" column="close_fee" />
  22. <result property="usdtRate" column="usdt_rate" />
  23. <result property="intervalHour" column="interval_hour" />
  24. <result property="coinScale" column="coin_scale" />
  25. <result property="baseScale" column="base_scale" />
  26. <result property="minShare" column="min_share" />
  27. <result property="maxShare" column="max_share" />
  28. <result property="totalProfit" column="total_profit" />
  29. <result property="sort" column="sort" />
  30. <result property="createTime" column="create_time" />
  31. <result property="updateTime" column="update_time" />
  32. <result property="showSymbol" column="show_symbol" />
  33. <result property="logo" column="logo" />
  34. <result property="market" column="market" />
  35. <result property="deliveryDays" column="delivery_days" />
  36. <result property="minMargin" column="min_margin" />
  37. <result property="earnRate" column="earn_rate" />
  38. <result property="lossRate" column="loss_rate" />
  39. <result property="profitLoss" column="profit_loss" />
  40. <result property="floatProfit" column="float_profit" />
  41. </resultMap>
  42. <sql id="selectTContractCoinVo">
  43. select id, symbol, coin,profit_loss,float_profit, base_coin, earn_rate,loss_rate,delivery_days,min_margin,market,share_number, logo, leverage, enable, visible, exchangeable, enable_open_sell, enable_open_buy, enable_market_sell, enable_market_buy, open_fee, close_fee, usdt_rate, interval_hour, coin_scale, base_scale, min_share, max_share, total_profit, sort, create_time, update_time,show_symbol from t_contract_coin
  44. </sql>
  45. <select id="selectTContractCoinList" parameterType="TContractCoin" resultMap="TContractCoinResult">
  46. <include refid="selectTContractCoinVo"/>
  47. <where>
  48. <if test="symbol != null and symbol != ''"> and symbol = #{symbol}</if>
  49. <if test="coin != null and coin != ''"> and coin = #{coin}</if>
  50. <if test="baseCoin != null and baseCoin != ''"> and base_coin = #{baseCoin}</if>
  51. <if test="shareNumber != null "> and share_number = #{shareNumber}</if>
  52. <if test="leverage != null and leverage != ''"> and leverage = #{leverage}</if>
  53. <if test="enable != null "> and enable = #{enable}</if>
  54. <if test="visible != null "> and visible = #{visible}</if>
  55. <if test="exchangeable != null "> and exchangeable = #{exchangeable}</if>
  56. <if test="enableOpenSell != null "> and enable_open_sell = #{enableOpenSell}</if>
  57. <if test="enableOpenBuy != null "> and enable_open_buy = #{enableOpenBuy}</if>
  58. <if test="enableMarketSell != null "> and enable_market_sell = #{enableMarketSell}</if>
  59. <if test="enableMarketBuy != null "> and enable_market_buy = #{enableMarketBuy}</if>
  60. <if test="openFee != null "> and open_fee = #{openFee}</if>
  61. <if test="closeFee != null "> and close_fee = #{closeFee}</if>
  62. <if test="usdtRate != null "> and usdt_rate = #{usdtRate}</if>
  63. <if test="intervalHour != null "> and interval_hour = #{intervalHour}</if>
  64. <if test="coinScale != null "> and coin_scale = #{coinScale}</if>
  65. <if test="baseScale != null "> and base_scale = #{baseScale}</if>
  66. <if test="minShare != null "> and min_share = #{minShare}</if>
  67. <if test="maxShare != null "> and max_share = #{maxShare}</if>
  68. <if test="totalProfit != null "> and total_profit = #{totalProfit}</if>
  69. <if test="sort != null "> and sort = #{sort}</if>
  70. <if test="market != null and market != ''"> and market = #{market}</if>
  71. </where>
  72. </select>
  73. <select id="selectTContractCoinById" parameterType="Long" resultMap="TContractCoinResult">
  74. <include refid="selectTContractCoinVo"/>
  75. where id = #{id}
  76. </select>
  77. <insert id="insertTContractCoin" parameterType="TContractCoin" useGeneratedKeys="true" keyProperty="id">
  78. insert into t_contract_coin
  79. <trim prefix="(" suffix=")" suffixOverrides=",">
  80. <if test="symbol != null and symbol != ''">symbol,</if>
  81. <if test="coin != null and coin != ''">coin,</if>
  82. <if test="baseCoin != null">base_coin,</if>
  83. <if test="shareNumber != null">share_number,</if>
  84. <if test="leverage != null">leverage,</if>
  85. <if test="enable != null">enable,</if>
  86. <if test="visible != null">visible,</if>
  87. <if test="exchangeable != null">exchangeable,</if>
  88. <if test="enableOpenSell != null">enable_open_sell,</if>
  89. <if test="enableOpenBuy != null">enable_open_buy,</if>
  90. <if test="enableMarketSell != null">enable_market_sell,</if>
  91. <if test="enableMarketBuy != null">enable_market_buy,</if>
  92. <if test="openFee != null">open_fee,</if>
  93. <if test="closeFee != null">close_fee,</if>
  94. <if test="usdtRate != null">usdt_rate,</if>
  95. <if test="intervalHour != null">interval_hour,</if>
  96. <if test="coinScale != null">coin_scale,</if>
  97. <if test="baseScale != null">base_scale,</if>
  98. <if test="minShare != null">min_share,</if>
  99. <if test="maxShare != null">max_share,</if>
  100. <if test="totalProfit != null">total_profit,</if>
  101. <if test="sort != null">sort,</if>
  102. <if test="createTime != null">create_time,</if>
  103. <if test="updateTime != null">update_time,</if>
  104. <if test="showSymbol != null and showSymbol!=''">show_symbol,</if>
  105. <if test="logo != null and logo!=''">logo,</if>
  106. <if test="market != null and market!=''">market,</if>
  107. <if test="deliveryDays != null ">delivery_days,</if>
  108. <if test="minMargin != null ">min_margin,</if>
  109. <if test="earnRate != null ">earn_rate,</if>
  110. <if test="lossRate != null ">loss_rate,</if>
  111. <if test="floatProfit != null ">float_profit,</if>
  112. <if test="profitLoss != null ">profit_loss,</if>
  113. </trim>
  114. <trim prefix="values (" suffix=")" suffixOverrides=",">
  115. <if test="symbol != null and symbol != ''">#{symbol},</if>
  116. <if test="coin != null and coin != ''">#{coin},</if>
  117. <if test="baseCoin != null">#{baseCoin},</if>
  118. <if test="shareNumber != null">#{shareNumber},</if>
  119. <if test="leverage != null">#{leverage},</if>
  120. <if test="enable != null">#{enable},</if>
  121. <if test="visible != null">#{visible},</if>
  122. <if test="exchangeable != null">#{exchangeable},</if>
  123. <if test="enableOpenSell != null">#{enableOpenSell},</if>
  124. <if test="enableOpenBuy != null">#{enableOpenBuy},</if>
  125. <if test="enableMarketSell != null">#{enableMarketSell},</if>
  126. <if test="enableMarketBuy != null">#{enableMarketBuy},</if>
  127. <if test="openFee != null">#{openFee},</if>
  128. <if test="closeFee != null">#{closeFee},</if>
  129. <if test="usdtRate != null">#{usdtRate},</if>
  130. <if test="intervalHour != null">#{intervalHour},</if>
  131. <if test="coinScale != null">#{coinScale},</if>
  132. <if test="baseScale != null">#{baseScale},</if>
  133. <if test="minShare != null">#{minShare},</if>
  134. <if test="maxShare != null">#{maxShare},</if>
  135. <if test="totalProfit != null">#{totalProfit},</if>
  136. <if test="sort != null">#{sort},</if>
  137. <if test="createTime != null">#{createTime},</if>
  138. <if test="updateTime != null">#{updateTime},</if>
  139. <if test="showSymbol != null and showSymbol!=''">#{showSymbol},</if>
  140. <if test="logo != null and logo!=''">#{logo},</if>
  141. <if test="market != null and market!=''">#{market},</if>
  142. <if test="deliveryDays != null ">#{deliveryDays},</if>
  143. <if test="minMargin != null ">#{minMargin},</if>
  144. <if test="earnRate != null ">#{earnRate},</if>
  145. <if test="lossRate != null ">#{lossRate},</if>
  146. <if test="floatProfit != null ">#{floatProfit},</if>
  147. <if test="profitLoss != null ">#{profitLoss},</if>
  148. </trim>
  149. </insert>
  150. <update id="updateTContractCoin" parameterType="TContractCoin">
  151. update t_contract_coin
  152. <trim prefix="SET" suffixOverrides=",">
  153. <if test="symbol != null and symbol != ''">symbol = #{symbol},</if>
  154. <if test="coin != null and coin != ''">coin = #{coin},</if>
  155. <if test="baseCoin != null">base_coin = #{baseCoin},</if>
  156. <if test="shareNumber != null">share_number = #{shareNumber},</if>
  157. <if test="leverage != null">leverage = #{leverage},</if>
  158. <if test="enable != null">enable = #{enable},</if>
  159. <if test="visible != null">visible = #{visible},</if>
  160. <if test="exchangeable != null">exchangeable = #{exchangeable},</if>
  161. <if test="enableOpenSell != null">enable_open_sell = #{enableOpenSell},</if>
  162. <if test="enableOpenBuy != null">enable_open_buy = #{enableOpenBuy},</if>
  163. <if test="enableMarketSell != null">enable_market_sell = #{enableMarketSell},</if>
  164. <if test="enableMarketBuy != null">enable_market_buy = #{enableMarketBuy},</if>
  165. <if test="openFee != null">open_fee = #{openFee},</if>
  166. <if test="closeFee != null">close_fee = #{closeFee},</if>
  167. <if test="usdtRate != null">usdt_rate = #{usdtRate},</if>
  168. <if test="intervalHour != null">interval_hour = #{intervalHour},</if>
  169. <if test="coinScale != null">coin_scale = #{coinScale},</if>
  170. <if test="baseScale != null">base_scale = #{baseScale},</if>
  171. <if test="minShare != null">min_share = #{minShare},</if>
  172. <if test="maxShare != null">max_share = #{maxShare},</if>
  173. <if test="totalProfit != null">total_profit = #{totalProfit},</if>
  174. <if test="sort != null">sort = #{sort},</if>
  175. <if test="createTime != null">create_time = #{createTime},</if>
  176. <if test="updateTime != null">update_time = #{updateTime},</if>
  177. <if test="showSymbol != null and showSymbol!=''">show_symbol=#{showSymbol},</if>
  178. <if test="logo != null and logo!=''">logo=#{logo},</if>
  179. <if test="market != null and market!=''">market=#{market},</if>
  180. <if test="minMargin != null ">min_margin=#{minMargin},</if>
  181. <if test="deliveryDays != null ">delivery_days=#{deliveryDays},</if>
  182. <if test="earnRate != null ">earn_rate=#{earnRate},</if>
  183. <if test="lossRate != null ">loss_rate=#{lossRate},</if>
  184. <if test="floatProfit != null ">float_profit=#{floatProfit},</if>
  185. <if test="profitLoss != null ">profit_loss=#{profitLoss},</if>
  186. </trim>
  187. where id = #{id}
  188. </update>
  189. <delete id="deleteTContractCoinById" parameterType="Long">
  190. delete from t_contract_coin where id = #{id}
  191. </delete>
  192. <delete id="deleteTContractCoinByIds" parameterType="String">
  193. delete from t_contract_coin where id in
  194. <foreach item="id" collection="array" open="(" separator="," close=")">
  195. #{id}
  196. </foreach>
  197. </delete>
  198. </mapper>