TMingProductMapper.xml 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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.TMingProductMapper">
  6. <resultMap type="TMingProduct" id="TMingProductResult">
  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="sort" column="sort" />
  19. <result property="createBy" column="create_by" />
  20. <result property="createTime" column="create_time" />
  21. <result property="updateBy" column="update_by" />
  22. <result property="updateTime" column="update_time" />
  23. <result property="buyPurchase" column="buy_purchase" />
  24. <result property="coin" column="coin" />
  25. <result property="remark" column="remark" />
  26. </resultMap>
  27. <sql id="selectTMingProductVo">
  28. select id, title, icon, status, days, default_odds, min_odds, max_odds, time_limit, limit_min, limit_max, sort, create_by, create_time, update_by, update_time, buy_purchase, coin, remark from t_ming_product
  29. </sql>
  30. <select id="selectTMingProductList" parameterType="TMingProduct" resultMap="TMingProductResult">
  31. <include refid="selectTMingProductVo"/>
  32. <where>
  33. <if test="title != null and title != ''"> and title = #{title}</if>
  34. <if test="icon != null and icon != ''"> and icon = #{icon}</if>
  35. <if test="status != null "> and status = #{status}</if>
  36. <if test="days != null and days != ''"> and days = #{days}</if>
  37. <if test="defaultOdds != null "> and default_odds = #{defaultOdds}</if>
  38. <if test="minOdds != null "> and min_odds = #{minOdds}</if>
  39. <if test="maxOdds != null "> and max_odds = #{maxOdds}</if>
  40. <if test="timeLimit != null "> and time_limit = #{timeLimit}</if>
  41. <if test="limitMin != null "> and limit_min = #{limitMin}</if>
  42. <if test="limitMax != null "> and limit_max = #{limitMax}</if>
  43. <if test="sort != null "> and sort = #{sort}</if>
  44. <if test="buyPurchase != null "> and buy_purchase = #{buyPurchase}</if>
  45. <if test="coin != null and coin != ''"> and coin = #{coin}</if>
  46. </where>
  47. ORDER BY sort
  48. </select>
  49. <select id="selectTMingProductById" parameterType="Long" resultMap="TMingProductResult">
  50. <include refid="selectTMingProductVo"/>
  51. where id = #{id}
  52. </select>
  53. <insert id="insertTMingProduct" parameterType="TMingProduct" useGeneratedKeys="true" keyProperty="id">
  54. insert into t_ming_product
  55. <trim prefix="(" suffix=")" suffixOverrides=",">
  56. <if test="title != null and title != ''">title,</if>
  57. <if test="icon != null">icon,</if>
  58. <if test="status != null">status,</if>
  59. <if test="days != null and days != ''">days,</if>
  60. <if test="defaultOdds != null">default_odds,</if>
  61. <if test="minOdds != null">min_odds,</if>
  62. <if test="maxOdds != null">max_odds,</if>
  63. <if test="timeLimit != null">time_limit,</if>
  64. <if test="limitMin != null">limit_min,</if>
  65. <if test="limitMax != null">limit_max,</if>
  66. <if test="sort != null">sort,</if>
  67. <if test="createBy != null">create_by,</if>
  68. <if test="createTime != null">create_time,</if>
  69. <if test="updateBy != null">update_by,</if>
  70. <if test="updateTime != null">update_time,</if>
  71. <if test="buyPurchase != null">buy_purchase,</if>
  72. <if test="coin != null">coin,</if>
  73. <if test="remark != null">remark,</if>
  74. </trim>
  75. <trim prefix="values (" suffix=")" suffixOverrides=",">
  76. <if test="title != null and title != ''">#{title},</if>
  77. <if test="icon != null">#{icon},</if>
  78. <if test="status != null">#{status},</if>
  79. <if test="days != null and days != ''">#{days},</if>
  80. <if test="defaultOdds != null">#{defaultOdds},</if>
  81. <if test="minOdds != null">#{minOdds},</if>
  82. <if test="maxOdds != null">#{maxOdds},</if>
  83. <if test="timeLimit != null">#{timeLimit},</if>
  84. <if test="limitMin != null">#{limitMin},</if>
  85. <if test="limitMax != null">#{limitMax},</if>
  86. <if test="sort != null">#{sort},</if>
  87. <if test="createBy != null">#{createBy},</if>
  88. <if test="createTime != null">#{createTime},</if>
  89. <if test="updateBy != null">#{updateBy},</if>
  90. <if test="updateTime != null">#{updateTime},</if>
  91. <if test="buyPurchase != null">#{buyPurchase},</if>
  92. <if test="coin != null">#{coin},</if>
  93. <if test="remark != null">#{remark},</if>
  94. </trim>
  95. </insert>
  96. <update id="updateTMingProduct" parameterType="TMingProduct">
  97. update t_ming_product
  98. <trim prefix="SET" suffixOverrides=",">
  99. <if test="title != null and title != ''">title = #{title},</if>
  100. <if test="icon != null">icon = #{icon},</if>
  101. <if test="status != null">status = #{status},</if>
  102. <if test="days != null and days != ''">days = #{days},</if>
  103. <if test="defaultOdds != null">default_odds = #{defaultOdds},</if>
  104. <if test="minOdds != null">min_odds = #{minOdds},</if>
  105. <if test="maxOdds != null">max_odds = #{maxOdds},</if>
  106. <if test="timeLimit != null">time_limit = #{timeLimit},</if>
  107. <if test="limitMin != null">limit_min = #{limitMin},</if>
  108. <if test="limitMax != null">limit_max = #{limitMax},</if>
  109. <if test="sort != null">sort = #{sort},</if>
  110. <if test="createBy != null">create_by = #{createBy},</if>
  111. <if test="createTime != null">create_time = #{createTime},</if>
  112. <if test="updateBy != null">update_by = #{updateBy},</if>
  113. <if test="updateTime != null">update_time = #{updateTime},</if>
  114. <if test="buyPurchase != null">buy_purchase = #{buyPurchase},</if>
  115. <if test="coin != null">coin = #{coin},</if>
  116. <if test="remark != null">remark = #{remark},</if>
  117. </trim>
  118. where id = #{id}
  119. </update>
  120. <delete id="deleteTMingProductById" parameterType="Long">
  121. delete from t_ming_product where id = #{id}
  122. </delete>
  123. <delete id="deleteTMingProductByIds" parameterType="String">
  124. delete from t_ming_product where id in
  125. <foreach item="id" collection="array" open="(" separator="," close=")">
  126. #{id}
  127. </foreach>
  128. </delete>
  129. </mapper>