From 3f76ec837b343e5a8538f2ce50010714d16cdeef Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期四, 07 十一月 2019 12:24:40 +0800 Subject: [PATCH] 红包领取 --- fanli/src/main/java/com/yeshi/fanli/mapping/redpack/RedPackBalanceMapper.xml | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 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 dff42ff..72ddb80 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 @@ -5,33 +5,37 @@ <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.redpack.RedPackBalance"> <id column="rpb_uid" property="id" jdbcType="BIGINT"/> <result column="rpb_money" property="money" jdbcType="DECIMAL"/> + <result column="rpb_state" property="state" jdbcType="INTEGER"/> <result column="rpb_create_time" property="createTime" jdbcType="TIMESTAMP"/> <result column="rpb_update_time" property="updateTime" jdbcType="TIMESTAMP"/> </resultMap> - <sql id="Base_Column_List">rpb_uid,rpb_money,rpb_create_time,rpb_update_time</sql> + <sql id="Base_Column_List">rpb_uid,rpb_money,rpb_state,rpb_create_time,rpb_update_time</sql> <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select <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_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> +<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_state,rpb_create_time,rpb_update_time) values (#{id,jdbcType=BIGINT},#{money,jdbcType=DECIMAL},#{state,jdbcType=INTEGER},#{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> + <if test="state != null">rpb_state,</if> <if test="createTime != null">rpb_create_time,</if> <if test="updateTime != null">rpb_update_time,</if> </trim>values <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null">#{id,jdbcType=BIGINT},</if> <if test="money != null">#{money,jdbcType=DECIMAL},</if> + <if test="state != null">#{state,jdbcType=INTEGER},</if> <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> </trim> </insert> - <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="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.redpack.RedPackBalance">update yeshi_ec_red_pack_balance set rpb_money = #{money,jdbcType=DECIMAL},rpb_state = #{state,jdbcType=INTEGER},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="state != null">rpb_state=#{state,jdbcType=INTEGER},</if> <if test="createTime != null">rpb_create_time=#{createTime,jdbcType=TIMESTAMP},</if> <if test="updateTime != null">rpb_update_time=#{updateTime,jdbcType=TIMESTAMP},</if> </set> where rpb_uid = #{id,jdbcType=BIGINT} -- Gitblit v1.8.0