TSecondPeriodConfigMapper.xml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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.TSecondPeriodConfigMapper">
  6. <resultMap type="TSecondPeriodConfig" id="TSecondPeriodConfigResult">
  7. <result property="id" column="id" />
  8. <result property="secondId" column="second_id" />
  9. <result property="period" column="period" />
  10. <result property="odds" column="odds" />
  11. <result property="maxAmount" column="max_amount" />
  12. <result property="minAmount" column="min_amount" />
  13. <result property="status" column="status" />
  14. <result property="createBy" column="create_by" />
  15. <result property="createTime" column="create_time" />
  16. <result property="updateBy" column="update_by" />
  17. <result property="updateTime" column="update_time" />
  18. <result property="remark" column="remark" />
  19. <result property="flag" column="flag" />
  20. <result property="searchValue" column="search_value" />
  21. </resultMap>
  22. <sql id="selectTSecondPeriodConfigVo">
  23. select id, second_id, period, odds, max_amount, min_amount, status, create_by, create_time, update_by, update_time, remark, search_value ,flag from t_second_period_config
  24. </sql>
  25. <select id="selectTSecondPeriodConfigList" parameterType="TSecondPeriodConfig" resultMap="TSecondPeriodConfigResult">
  26. <include refid="selectTSecondPeriodConfigVo"/>
  27. <where>
  28. <if test="secondId != null "> and second_id = #{secondId}</if>
  29. <if test="period != null "> and period = #{period}</if>
  30. <if test="odds != null "> and odds = #{odds}</if>
  31. <if test="maxAmount != null "> and max_amount = #{maxAmount}</if>
  32. <if test="minAmount != null "> and min_amount = #{minAmount}</if>
  33. <if test="status != null "> and status = #{status}</if>
  34. <if test="flag != null "> and flag = #{flag}</if>
  35. <if test="searchValue != null and searchValue != ''"> and search_value = #{searchValue}</if>
  36. </where>
  37. </select>
  38. <select id="selectTSecondPeriodConfigById" parameterType="Long" resultMap="TSecondPeriodConfigResult">
  39. <include refid="selectTSecondPeriodConfigVo"/>
  40. where id = #{id}
  41. </select>
  42. <insert id="insertTSecondPeriodConfig" parameterType="TSecondPeriodConfig">
  43. insert into t_second_period_config
  44. <trim prefix="(" suffix=")" suffixOverrides=",">
  45. <if test="id != null">id,</if>
  46. <if test="secondId != null">second_id,</if>
  47. <if test="period != null">period,</if>
  48. <if test="odds != null">odds,</if>
  49. <if test="maxAmount != null">max_amount,</if>
  50. <if test="minAmount != null">min_amount,</if>
  51. <if test="status != null">status,</if>
  52. <if test="createBy != null">create_by,</if>
  53. <if test="createTime != null">create_time,</if>
  54. <if test="updateBy != null">update_by,</if>
  55. <if test="updateTime != null">update_time,</if>
  56. <if test="remark != null">remark,</if>
  57. <if test="searchValue != null">search_value,</if>
  58. <if test="flag != null">flag,</if>
  59. </trim>
  60. <trim prefix="values (" suffix=")" suffixOverrides=",">
  61. <if test="id != null">#{id},</if>
  62. <if test="secondId != null">#{secondId},</if>
  63. <if test="period != null">#{period},</if>
  64. <if test="odds != null">#{odds},</if>
  65. <if test="maxAmount != null">#{maxAmount},</if>
  66. <if test="minAmount != null">#{minAmount},</if>
  67. <if test="status != null">#{status},</if>
  68. <if test="createBy != null">#{createBy},</if>
  69. <if test="createTime != null">#{createTime},</if>
  70. <if test="updateBy != null">#{updateBy},</if>
  71. <if test="updateTime != null">#{updateTime},</if>
  72. <if test="remark != null">#{remark},</if>
  73. <if test="searchValue != null">#{searchValue},</if>
  74. <if test="flag != null">#{flag},</if>
  75. </trim>
  76. </insert>
  77. <update id="updateTSecondPeriodConfig" parameterType="TSecondPeriodConfig">
  78. update t_second_period_config
  79. <trim prefix="SET" suffixOverrides=",">
  80. <if test="secondId != null">second_id = #{secondId},</if>
  81. <if test="period != null">period = #{period},</if>
  82. <if test="odds != null">odds = #{odds},</if>
  83. <if test="maxAmount != null">max_amount = #{maxAmount},</if>
  84. <if test="minAmount != null">min_amount = #{minAmount},</if>
  85. <if test="status != null">status = #{status},</if>
  86. <if test="createBy != null">create_by = #{createBy},</if>
  87. <if test="createTime != null">create_time = #{createTime},</if>
  88. <if test="updateBy != null">update_by = #{updateBy},</if>
  89. <if test="updateTime != null">update_time = #{updateTime},</if>
  90. <if test="remark != null">remark = #{remark},</if>
  91. <if test="searchValue != null">search_value = #{searchValue},</if>
  92. <if test="flag != null">flag = #{flag},</if>
  93. </trim>
  94. where id = #{id}
  95. </update>
  96. <delete id="deleteTSecondPeriodConfigById" parameterType="Long">
  97. delete from t_second_period_config where id = #{id}
  98. </delete>
  99. <delete id="deleteTSecondPeriodConfigByIds" parameterType="String">
  100. delete from t_second_period_config where id in
  101. <foreach item="id" collection="array" open="(" separator="," close=")">
  102. #{id}
  103. </foreach>
  104. </delete>
  105. </mapper>