|
@@ -5,18 +5,19 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Sep 19 18:52:38 CST 2019.
|
|
|
+ This element was generated on Thu Sep 19 20:14:16 CST 2019.
|
|
|
-->
|
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
|
|
<result column="is_share" jdbcType="INTEGER" property="isShare" />
|
|
|
<result column="opportunity_count" jdbcType="INTEGER" property="opportunityCount" />
|
|
|
<result column="indate" jdbcType="TIMESTAMP" property="indate" />
|
|
|
+ <result column="uid" jdbcType="INTEGER" property="uid" />
|
|
|
</resultMap>
|
|
|
<sql id="Example_Where_Clause">
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Sep 19 18:52:38 CST 2019.
|
|
|
+ This element was generated on Thu Sep 19 20:14:16 CST 2019.
|
|
|
-->
|
|
|
<where>
|
|
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
|
@@ -50,7 +51,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Sep 19 18:52:38 CST 2019.
|
|
|
+ This element was generated on Thu Sep 19 20:14:16 CST 2019.
|
|
|
-->
|
|
|
<where>
|
|
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
@@ -84,15 +85,15 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Sep 19 18:52:38 CST 2019.
|
|
|
+ This element was generated on Thu Sep 19 20:14:16 CST 2019.
|
|
|
-->
|
|
|
- id, is_share, opportunity_count, indate
|
|
|
+ id, is_share, opportunity_count, indate, uid
|
|
|
</sql>
|
|
|
<select id="selectByExample" parameterType="com.hssx.entity.PrizeOpportunityExample" resultMap="BaseResultMap">
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Sep 19 18:52:38 CST 2019.
|
|
|
+ This element was generated on Thu Sep 19 20:14:16 CST 2019.
|
|
|
-->
|
|
|
select
|
|
|
<if test="distinct">
|
|
@@ -111,7 +112,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Sep 19 18:52:38 CST 2019.
|
|
|
+ This element was generated on Thu Sep 19 20:14:16 CST 2019.
|
|
|
-->
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
@@ -122,7 +123,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Sep 19 18:52:38 CST 2019.
|
|
|
+ This element was generated on Thu Sep 19 20:14:16 CST 2019.
|
|
|
-->
|
|
|
delete from mini_prize_opportunity
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
@@ -131,7 +132,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Sep 19 18:52:38 CST 2019.
|
|
|
+ This element was generated on Thu Sep 19 20:14:16 CST 2019.
|
|
|
-->
|
|
|
delete from mini_prize_opportunity
|
|
|
<if test="_parameter != null">
|
|
@@ -142,21 +143,21 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Sep 19 18:52:38 CST 2019.
|
|
|
+ This element was generated on Thu Sep 19 20:14:16 CST 2019.
|
|
|
-->
|
|
|
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
|
|
|
SELECT LAST_INSERT_ID()
|
|
|
</selectKey>
|
|
|
- insert into mini_prize_opportunity (is_share, opportunity_count, indate
|
|
|
- )
|
|
|
- values (#{isShare,jdbcType=INTEGER}, #{opportunityCount,jdbcType=INTEGER}, #{indate,jdbcType=TIMESTAMP}
|
|
|
- )
|
|
|
+ insert into mini_prize_opportunity (is_share, opportunity_count, indate,
|
|
|
+ uid)
|
|
|
+ values (#{isShare,jdbcType=INTEGER}, #{opportunityCount,jdbcType=INTEGER}, #{indate,jdbcType=TIMESTAMP},
|
|
|
+ #{uid,jdbcType=INTEGER})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.hssx.entity.PrizeOpportunity">
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Sep 19 18:52:38 CST 2019.
|
|
|
+ This element was generated on Thu Sep 19 20:14:16 CST 2019.
|
|
|
-->
|
|
|
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
|
|
|
SELECT LAST_INSERT_ID()
|
|
@@ -172,6 +173,9 @@
|
|
|
<if test="indate != null">
|
|
|
indate,
|
|
|
</if>
|
|
|
+ <if test="uid != null">
|
|
|
+ uid,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="isShare != null">
|
|
@@ -183,13 +187,16 @@
|
|
|
<if test="indate != null">
|
|
|
#{indate,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
+ <if test="uid != null">
|
|
|
+ #{uid,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<select id="countByExample" parameterType="com.hssx.entity.PrizeOpportunityExample" resultType="java.lang.Long">
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Sep 19 18:52:38 CST 2019.
|
|
|
+ This element was generated on Thu Sep 19 20:14:16 CST 2019.
|
|
|
-->
|
|
|
select count(*) from mini_prize_opportunity
|
|
|
<if test="_parameter != null">
|
|
@@ -200,7 +207,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Sep 19 18:52:38 CST 2019.
|
|
|
+ This element was generated on Thu Sep 19 20:14:16 CST 2019.
|
|
|
-->
|
|
|
update mini_prize_opportunity
|
|
|
<set>
|
|
@@ -216,6 +223,9 @@
|
|
|
<if test="record.indate != null">
|
|
|
indate = #{record.indate,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
+ <if test="record.uid != null">
|
|
|
+ uid = #{record.uid,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
<if test="_parameter != null">
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
@@ -225,13 +235,14 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Sep 19 18:52:38 CST 2019.
|
|
|
+ This element was generated on Thu Sep 19 20:14:16 CST 2019.
|
|
|
-->
|
|
|
update mini_prize_opportunity
|
|
|
set id = #{record.id,jdbcType=INTEGER},
|
|
|
is_share = #{record.isShare,jdbcType=INTEGER},
|
|
|
opportunity_count = #{record.opportunityCount,jdbcType=INTEGER},
|
|
|
- indate = #{record.indate,jdbcType=TIMESTAMP}
|
|
|
+ indate = #{record.indate,jdbcType=TIMESTAMP},
|
|
|
+ uid = #{record.uid,jdbcType=INTEGER}
|
|
|
<if test="_parameter != null">
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
</if>
|
|
@@ -240,7 +251,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Sep 19 18:52:38 CST 2019.
|
|
|
+ This element was generated on Thu Sep 19 20:14:16 CST 2019.
|
|
|
-->
|
|
|
update mini_prize_opportunity
|
|
|
<set>
|
|
@@ -253,6 +264,9 @@
|
|
|
<if test="indate != null">
|
|
|
indate = #{indate,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
+ <if test="uid != null">
|
|
|
+ uid = #{uid,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
@@ -260,12 +274,19 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Sep 19 18:52:38 CST 2019.
|
|
|
+ This element was generated on Thu Sep 19 20:14:16 CST 2019.
|
|
|
-->
|
|
|
update mini_prize_opportunity
|
|
|
set is_share = #{isShare,jdbcType=INTEGER},
|
|
|
opportunity_count = #{opportunityCount,jdbcType=INTEGER},
|
|
|
- indate = #{indate,jdbcType=TIMESTAMP}
|
|
|
+ indate = #{indate,jdbcType=TIMESTAMP},
|
|
|
+ uid = #{uid,jdbcType=INTEGER}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
+
|
|
|
+ <select id="selectCountByToday" resultType="java.lang.Integer">
|
|
|
+ select count(id) from mini_prize_opportunity
|
|
|
+ WHERE TO_DAYS(indate) = TO_DAYS(NOW())
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|