|
@@ -118,6 +118,39 @@
|
|
|
</set>
|
|
|
where id_ = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
+ <update id="batchUpdate">
|
|
|
+ <foreach collection="updateDraw" item="draw" separator=";">
|
|
|
+ UPDATE luck_draw_prize
|
|
|
+ <set>
|
|
|
+ <if test="name != null">
|
|
|
+ name_ = #{name,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="chances != null">
|
|
|
+ chances_ = #{chances,jdbcType=DOUBLE},
|
|
|
+ </if>
|
|
|
+ <if test="stock != null">
|
|
|
+ stock_ = #{stock,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="enabled != null">
|
|
|
+ enabled_ = #{enabled,jdbcType=BIT},
|
|
|
+ </if>
|
|
|
+ <if test="rewardType != null">
|
|
|
+ reward_type_ = #{rewardType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
+ </if>
|
|
|
+ <if test="memo != null">
|
|
|
+ memo_ = #{memo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="groupId != null">
|
|
|
+ group_id_ = #{groupId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="isDefault != null">
|
|
|
+ is_default_ = #{isDefault},
|
|
|
+ </if>
|
|
|
+ modify_on_ = NOW()
|
|
|
+ </set>
|
|
|
+ WHERE id_ = #{id,jdbcType=INTEGER}
|
|
|
+ </foreach>
|
|
|
+ </update>
|
|
|
|
|
|
<select id="queryCount" parameterType="map" resultType="int">
|
|
|
select count(*) from luck_draw_prize
|