TCurrencySymbolMapper.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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.TCurrencySymbolMapper">
  6. <resultMap type="com.ruoyi.bussiness.domain.TCurrencySymbol" id="TCurrencySymbolResult">
  7. <result property="id" column="id" />
  8. <result property="coin" column="coin" />
  9. <result property="showSymbol" column="show_symbol" />
  10. <result property="symbol" column="symbol" />
  11. <result property="baseCoin" column="base_coin" />
  12. <result property="feeRate" column="fee_rate" />
  13. <result property="coinPrecision" column="coin_precision" />
  14. <result property="basePrecision" column="base_precision" />
  15. <result property="sellMin" column="sell_min" />
  16. <result property="buyMax" column="buy_max" />
  17. <result property="orderMin" column="order_min" />
  18. <result property="orderMax" column="order_max" />
  19. <result property="enable" column="enable" />
  20. <result property="isShow" column="is_show" />
  21. <result property="isDeal" column="is_deal" />
  22. <result property="marketBuy" column="market_buy" />
  23. <result property="marketSell" column="market_sell" />
  24. <result property="limitedBuy" column="limited_buy" />
  25. <result property="limitedSell" column="limited_sell" />
  26. <result property="logo" column="logo" />
  27. <result property="createBy" column="create_by" />
  28. <result property="createTime" column="create_time" />
  29. <result property="updateBy" column="update_by" />
  30. <result property="updateTime" column="update_time" />
  31. <result property="searchValue" column="search_value" />
  32. <result property="searchValue" column="search_value" />
  33. <result property="market" column="market" />
  34. <result property="minSell" column="min_sell" />
  35. </resultMap>
  36. <sql id="selectTCurrencySymbolVo">
  37. select id, symbol, show_symbol,min_sell, coin, base_coin, fee_rate, coin_precision, base_precision, sell_min, buy_max, order_min, order_max, enable, is_show, is_deal, market_buy, market_sell, limited_buy, limited_sell, logo, create_by, create_time, update_by, update_time, search_value, market from t_currency_symbol
  38. </sql>
  39. <select id="selectTCurrencySymbolList" parameterType="TCurrencySymbol" resultMap="TCurrencySymbolResult">
  40. <include refid="selectTCurrencySymbolVo"/>
  41. <where>
  42. <if test="symbol != null and symbol != ''"> and symbol like concat('%',#{symbol},'%') </if>
  43. <if test="showSymbol != null and showSymbol != ''"> and show_symbol = #{showSymbol}</if>
  44. <if test="coin != null and coin != ''"> and coin = #{coin}</if>
  45. <if test="baseCoin != null and baseCoin != ''"> and base_coin = #{baseCoin}</if>
  46. <if test="feeRate != null "> and fee_rate = #{feeRate}</if>
  47. <if test="coinPrecision != null "> and coin_precision = #{coinPrecision}</if>
  48. <if test="basePrecision != null "> and base_precision = #{basePrecision}</if>
  49. <if test="sellMin != null "> and sell_min = #{sellMin}</if>
  50. <if test="buyMax != null "> and buy_max = #{buyMax}</if>
  51. <if test="orderMin != null "> and order_min = #{orderMin}</if>
  52. <if test="orderMax != null "> and order_max = #{orderMax}</if>
  53. <if test="enable != null and enable != ''"> and enable = #{enable}</if>
  54. <if test="isShow != null and isShow != ''"> and is_show = #{isShow}</if>
  55. <if test="isDeal != null and isDeal != ''"> and is_deal = #{isDeal}</if>
  56. <if test="marketBuy != null and marketBuy != ''"> and market_buy = #{marketBuy}</if>
  57. <if test="marketSell != null and marketSell != ''"> and market_sell = #{marketSell}</if>
  58. <if test="limitedBuy != null and limitedBuy != ''"> and limited_buy = #{limitedBuy}</if>
  59. <if test="limitedSell != null and limitedSell != ''"> and limited_sell = #{limitedSell}</if>
  60. <if test="createTime != null "> and create_time = #{createTime}</if>
  61. <if test="updateTime != null "> and update_time = #{updateTime}</if>
  62. <if test="searchValue != null and searchValue != ''"> and search_value = #{searchValue}</if>
  63. <if test="market != null and market != ''"> and market = #{market}</if>
  64. </where>
  65. </select>
  66. <select id="selectTCurrencySymbolById" parameterType="Long" resultMap="TCurrencySymbolResult">
  67. <include refid="selectTCurrencySymbolVo"/>
  68. where id = #{id}
  69. </select>
  70. <select id="selectInfo" resultType="com.ruoyi.bussiness.domain.TCurrencySymbol"
  71. parameterType="com.ruoyi.bussiness.domain.TCurrencySymbol">
  72. <include refid="selectTCurrencySymbolVo"/>
  73. <where>
  74. <if test="coin != null and coin != ''"> and coin = #{coin}</if>
  75. <if test="baseCoin != null and baseCoin != ''"> and base_coin = #{baseCoin}</if>
  76. <if test="enable != null and enable != ''"> and enable = #{enable}</if>
  77. </where>
  78. </select>
  79. <select id="selectByCoin" resultType="com.ruoyi.bussiness.domain.TCurrencySymbol"
  80. parameterType="java.lang.String">
  81. <include refid="selectTCurrencySymbolVo"/>
  82. where coin = #{coin}
  83. </select>
  84. <insert id="insertTCurrencySymbol" parameterType="TCurrencySymbol" useGeneratedKeys="true" keyProperty="id">
  85. insert into t_currency_symbol
  86. <trim prefix="(" suffix=")" suffixOverrides=",">
  87. <if test="symbol != null">symbol,</if>
  88. <if test="showSymbol != null">show_symbol,</if>
  89. <if test="coin != null">coin,</if>
  90. <if test="baseCoin != null">base_coin,</if>
  91. <if test="feeRate != null">fee_rate,</if>
  92. <if test="coinPrecision != null">coin_precision,</if>
  93. <if test="basePrecision != null">base_precision,</if>
  94. <if test="sellMin != null">sell_min,</if>
  95. <if test="buyMax != null">buy_max,</if>
  96. <if test="orderMin != null">order_min,</if>
  97. <if test="orderMax != null">order_max,</if>
  98. <if test="enable != null">enable,</if>
  99. <if test="isShow != null">is_show,</if>
  100. <if test="isDeal != null">is_deal,</if>
  101. <if test="marketBuy != null">market_buy,</if>
  102. <if test="marketSell != null">market_sell,</if>
  103. <if test="limitedBuy != null">limited_buy,</if>
  104. <if test="limitedSell != null">limited_sell,</if>
  105. <if test="logo != null">logo,</if>
  106. <if test="createBy != null">create_by,</if>
  107. <if test="createTime != null">create_time,</if>
  108. <if test="updateBy != null">update_by,</if>
  109. <if test="updateTime != null">update_time,</if>
  110. <if test="searchValue != null">search_value,</if>
  111. <if test="market != null">market,</if>
  112. <if test="minSell != null">min_sell,</if>
  113. </trim>
  114. <trim prefix="values (" suffix=")" suffixOverrides=",">
  115. <if test="symbol != null">#{symbol},</if>
  116. <if test="showSymbol != null">#{showSymbol},</if>
  117. <if test="coin != null">#{coin},</if>
  118. <if test="baseCoin != null">#{baseCoin},</if>
  119. <if test="feeRate != null">#{feeRate},</if>
  120. <if test="coinPrecision != null">#{coinPrecision},</if>
  121. <if test="basePrecision != null">#{basePrecision},</if>
  122. <if test="sellMin != null">#{sellMin},</if>
  123. <if test="buyMax != null">#{buyMax},</if>
  124. <if test="orderMin != null">#{orderMin},</if>
  125. <if test="orderMax != null">#{orderMax},</if>
  126. <if test="enable != null">#{enable},</if>
  127. <if test="isShow != null">#{isShow},</if>
  128. <if test="isDeal != null">#{isDeal},</if>
  129. <if test="marketBuy != null">#{marketBuy},</if>
  130. <if test="marketSell != null">#{marketSell},</if>
  131. <if test="limitedBuy != null">#{limitedBuy},</if>
  132. <if test="limitedSell != null">#{limitedSell},</if>
  133. <if test="logo != null">#{logo},</if>
  134. <if test="createBy != null">#{createBy},</if>
  135. <if test="createTime != null">#{createTime},</if>
  136. <if test="updateBy != null">#{updateBy},</if>
  137. <if test="updateTime != null">#{updateTime},</if>
  138. <if test="searchValue != null">#{searchValue},</if>
  139. <if test="market != null">#{market},</if>
  140. <if test="minSell != null">#{minSell},</if>
  141. </trim>
  142. </insert>
  143. <update id="updateTCurrencySymbol" parameterType="TCurrencySymbol">
  144. update t_currency_symbol
  145. <trim prefix="SET" suffixOverrides=",">
  146. <if test="symbol != null">symbol = #{symbol},</if>
  147. <if test="showSymbol != null">show_symbol = #{showSymbol},</if>
  148. <if test="coin != null">coin = #{coin},</if>
  149. <if test="baseCoin != null">base_coin = #{baseCoin},</if>
  150. <if test="feeRate != null">fee_rate = #{feeRate},</if>
  151. <if test="coinPrecision != null">coin_precision = #{coinPrecision},</if>
  152. <if test="basePrecision != null">base_precision = #{basePrecision},</if>
  153. <if test="sellMin != null">sell_min = #{sellMin},</if>
  154. <if test="buyMax != null">buy_max = #{buyMax},</if>
  155. <if test="orderMin != null">order_min = #{orderMin},</if>
  156. <if test="orderMax != null">order_max = #{orderMax},</if>
  157. <if test="enable != null">enable = #{enable},</if>
  158. <if test="isShow != null">is_show = #{isShow},</if>
  159. <if test="isDeal != null">is_deal = #{isDeal},</if>
  160. <if test="marketBuy != null">market_buy = #{marketBuy},</if>
  161. <if test="marketSell != null">market_sell = #{marketSell},</if>
  162. <if test="limitedBuy != null">limited_buy = #{limitedBuy},</if>
  163. <if test="limitedSell != null">limited_sell = #{limitedSell},</if>
  164. <if test="logo != null">logo = #{logo},</if>
  165. <if test="createBy != null">create_by = #{createBy},</if>
  166. <if test="createTime != null">create_time = #{createTime},</if>
  167. <if test="updateBy != null">update_by = #{updateBy},</if>
  168. <if test="updateTime != null">update_time = #{updateTime},</if>
  169. <if test="searchValue != null">search_value = #{searchValue},</if>
  170. <if test="market != null">market = #{market},</if>
  171. <if test="minSell != null">min_sell=#{minSell},</if>
  172. </trim>
  173. where id = #{id}
  174. </update>
  175. <delete id="deleteTCurrencySymbolById" parameterType="Long">
  176. delete from t_currency_symbol where id = #{id}
  177. </delete>
  178. <delete id="deleteTCurrencySymbolByIds" parameterType="String">
  179. delete from t_currency_symbol where id in
  180. <foreach item="id" collection="array" open="(" separator="," close=")">
  181. #{id}
  182. </foreach>
  183. </delete>
  184. </mapper>