From a980ade25b3dc1a7da482e37113f2935a2719c0b Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期二, 05 十一月 2019 10:01:11 +0800 Subject: [PATCH] 红包表明修改 --- fanli/src/main/java/com/yeshi/fanli/mapping/redpack/RedPackBalanceMapper.xml | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/mapping/redpack/RedPackBalanceMapper.xml b/fanli/src/main/java/com/yeshi/fanli/mapping/redpack/RedPackBalanceMapper.xml index dd6a8c0..dff42ff 100644 --- a/fanli/src/main/java/com/yeshi/fanli/mapping/redpack/RedPackBalanceMapper.xml +++ b/fanli/src/main/java/com/yeshi/fanli/mapping/redpack/RedPackBalanceMapper.xml @@ -10,11 +10,11 @@ </resultMap> <sql id="Base_Column_List">rpb_uid,rpb_money,rpb_create_time,rpb_update_time</sql> <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select - <include refid="Base_Column_List"/>from yeshi_red_pack_balance where rpb_uid = #{id,jdbcType=BIGINT} + <include refid="Base_Column_List"/>from yeshi_ec_red_pack_balance where rpb_uid = #{id,jdbcType=BIGINT} </select> - <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_red_pack_balance where rpb_uid = #{id,jdbcType=BIGINT}</delete> - <insert id="insert" parameterType="com.yeshi.fanli.entity.redpack.RedPackBalance" useGeneratedKeys="true" keyProperty="id">insert into yeshi_red_pack_balance (rpb_uid,rpb_money,rpb_create_time,rpb_update_time) values (#{id,jdbcType=BIGINT},#{money,jdbcType=DECIMAL},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert> - <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.redpack.RedPackBalance" useGeneratedKeys="true" keyProperty="id">insert into yeshi_red_pack_balance + <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_red_pack_balance where rpb_uid = #{id,jdbcType=BIGINT}</delete> + <insert id="insert" parameterType="com.yeshi.fanli.entity.redpack.RedPackBalance" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_red_pack_balance (rpb_uid,rpb_money,rpb_create_time,rpb_update_time) values (#{id,jdbcType=BIGINT},#{money,jdbcType=DECIMAL},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert> + <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.redpack.RedPackBalance" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_red_pack_balance <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null">rpb_uid,</if> <if test="money != null">rpb_money,</if> @@ -28,8 +28,8 @@ <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> </trim> </insert> - <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.redpack.RedPackBalance">update yeshi_red_pack_balance set rpb_money = #{money,jdbcType=DECIMAL},rpb_create_time = #{createTime,jdbcType=TIMESTAMP},rpb_update_time = #{updateTime,jdbcType=TIMESTAMP} where rpb_uid = #{id,jdbcType=BIGINT}</update> - <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.redpack.RedPackBalance">update yeshi_red_pack_balance + <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.redpack.RedPackBalance">update yeshi_ec_red_pack_balance set rpb_money = #{money,jdbcType=DECIMAL},rpb_create_time = #{createTime,jdbcType=TIMESTAMP},rpb_update_time = #{updateTime,jdbcType=TIMESTAMP} where rpb_uid = #{id,jdbcType=BIGINT}</update> + <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.redpack.RedPackBalance">update yeshi_ec_red_pack_balance <set> <if test="money != null">rpb_money=#{money,jdbcType=DECIMAL},</if> <if test="createTime != null">rpb_create_time=#{createTime,jdbcType=TIMESTAMP},</if> @@ -38,17 +38,17 @@ </update> <update id="subRedPack"> - update yeshi_red_pack_balance SET rpb_money = rpb_money - #{money,jdbcType=DECIMAL},rpb_update_time = NOW() + update yeshi_ec_red_pack_balance SET rpb_money = rpb_money - #{money,jdbcType=DECIMAL},rpb_update_time = NOW() WHERE rpb_uid = #{id,jdbcType=BIGINT} </update> <update id="addRedPack"> - UPDATE yeshi_red_pack_balance SET rpb_money = rpb_money + #{money,jdbcType=DECIMAL},rpb_update_time = NOW() + UPDATE yeshi_ec_red_pack_balance SET rpb_money = rpb_money + #{money,jdbcType=DECIMAL},rpb_update_time = NOW() WHERE rpb_uid = #{id,jdbcType=BIGINT} </update> <select id="selectForUpdate" resultMap="BaseResultMap" parameterType="java.lang.Long"> - SELECT <include refid="Base_Column_List"/> FROM yeshi_red_pack_balance + SELECT <include refid="Base_Column_List"/> FROM yeshi_ec_red_pack_balance WHERE rpb_uid = #{id,jdbcType=BIGINT} FOR UPDATE </select> -- Gitblit v1.8.0