|
|
@@ -14,12 +14,13 @@
|
|
|
<result column="end_time" property="endTime" jdbcType="TIMESTAMP"/>
|
|
|
<result column="type" property="type" jdbcType="INTEGER"/>
|
|
|
<result column="bonus" property="bonus" jdbcType="INTEGER"/>
|
|
|
+ <result column="status" property="status" jdbcType="INTEGER"/>
|
|
|
<!--generatedEnd-->
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
<!--generatedStart-->
|
|
|
- id, del_flag, update_time, update_user, create_time, create_user, competition_name, start_time, end_time, type, bonus <!--generatedEnd-->
|
|
|
+ id, del_flag, update_time, update_user, create_time, create_user, competition_name, start_time, end_time, type, bonus, status <!--generatedEnd-->
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
|
|
|
@@ -72,6 +73,9 @@
|
|
|
<if test="bonus!= null">
|
|
|
bonus,
|
|
|
</if>
|
|
|
+ <if test="status!= null">
|
|
|
+ status,
|
|
|
+ </if>
|
|
|
<!--generatedEnd-->
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
@@ -109,6 +113,9 @@
|
|
|
<if test="bonus != null">
|
|
|
#{bonus,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="status != null">
|
|
|
+ #{status,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
<!--generatedEnd-->
|
|
|
</trim>
|
|
|
</insert>
|
|
|
@@ -150,6 +157,9 @@
|
|
|
<if test="bonus != null">
|
|
|
bonus= #{bonus,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="status != null">
|
|
|
+ status= #{status,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
<!--generatedEnd-->
|
|
|
</set>
|
|
|
WHERE
|
|
|
@@ -202,6 +212,9 @@
|
|
|
<if test="record.bonus != null and !"".equals(record.bonus)">
|
|
|
AND bonus = #{record.bonus}
|
|
|
</if>
|
|
|
+ <if test="record.status != null and !"".equals(record.status)">
|
|
|
+ AND status in (${record.status})
|
|
|
+ </if>
|
|
|
<!--generatedEnd-->
|
|
|
<if test="record.searchKey != null and !"".equals(record.searchKey)">
|
|
|
<trim prefix="and (" suffix=")" prefixOverrides="OR">
|
|
|
@@ -209,6 +222,7 @@
|
|
|
OR competition_name LIKE concat('%',#{record.searchKey},'%')
|
|
|
OR type LIKE concat('%',#{record.searchKey},'%')
|
|
|
OR bonus LIKE concat('%',#{record.searchKey},'%')
|
|
|
+ OR status LIKE concat('%',#{record.searchKey},'%')
|
|
|
<!--generatedEnd-->
|
|
|
</trim>
|
|
|
</if>
|
|
|
@@ -295,6 +309,9 @@
|
|
|
<if test="bonus != null and !"".equals(bonus)">
|
|
|
AND bonus = #{bonus}
|
|
|
</if>
|
|
|
+ <if test="status != null and !"".equals(status)">
|
|
|
+ AND status in (${status})
|
|
|
+ </if>
|
|
|
<!--generatedEnd-->
|
|
|
<if test="searchKey != null and !"".equals(searchKey)">
|
|
|
<trim prefix="and (" suffix=")" prefixOverrides="OR">
|
|
|
@@ -302,6 +319,7 @@
|
|
|
OR competition_name LIKE concat('%',#{searchKey},'%')
|
|
|
OR type LIKE concat('%',#{searchKey},'%')
|
|
|
OR bonus LIKE concat('%',#{searchKey},'%')
|
|
|
+ OR status LIKE concat('%',#{searchKey},'%')
|
|
|
<!--generatedEnd-->
|
|
|
</trim>
|
|
|
</if>
|
|
|
@@ -384,6 +402,9 @@
|
|
|
<if test="bonus != null and !"".equals(bonus)">
|
|
|
AND bonus = #{bonus}
|
|
|
</if>
|
|
|
+ <if test="status != null and !"".equals(status)">
|
|
|
+ AND status in (${status})
|
|
|
+ </if>
|
|
|
<!--generatedEnd-->
|
|
|
</where>
|
|
|
LIMIT 1
|
|
|
@@ -411,5 +432,10 @@
|
|
|
</where>
|
|
|
ORDER BY id DESC
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="queryUserRank" resultType="integer">
|
|
|
+
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|
|
|
|