yujian
2019-11-05 a980ade25b3dc1a7da482e37113f2935a2719c0b
fanli/src/main/java/com/yeshi/fanli/mapping/redpack/RedPackGiveRecordMapper.xml
@@ -14,11 +14,11 @@
  </resultMap>
  <sql id="Base_Column_List">rpgr_id,rpgr_money,rpgr_give_uid,rpgr_give_time,rpgr_end_time,rpgr_receive_uid,rpgr_receive_time,rpgr_state</sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
    <include refid="Base_Column_List"/>from yeshi_red_pack_give_record where rpgr_id = #{id,jdbcType=BIGINT}
    <include refid="Base_Column_List"/>from yeshi_ec_red_pack_give_record where rpgr_id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_red_pack_give_record where rpgr_id = #{id,jdbcType=BIGINT}</delete>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.redpack.RedPackGiveRecord" useGeneratedKeys="true" keyProperty="id">insert into yeshi_red_pack_give_record (rpgr_id,rpgr_money,rpgr_give_uid,rpgr_give_time,rpgr_end_time,rpgr_receive_uid,rpgr_receive_time,rpgr_state) values (#{id,jdbcType=BIGINT},#{amount,jdbcType=DECIMAL},#{giveUid,jdbcType=BIGINT},#{giveTime,jdbcType=TIMESTAMP},#{endTime,jdbcType=TIMESTAMP},#{receiveUid,jdbcType=BIGINT},#{receiveTime,jdbcType=TIMESTAMP},#{state,jdbcType=INTEGER})</insert>
  <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.redpack.RedPackGiveRecord" useGeneratedKeys="true" keyProperty="id">insert into yeshi_red_pack_give_record
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_red_pack_give_record where rpgr_id = #{id,jdbcType=BIGINT}</delete>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.redpack.RedPackGiveRecord" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_red_pack_give_record (rpgr_id,rpgr_money,rpgr_give_uid,rpgr_give_time,rpgr_end_time,rpgr_receive_uid,rpgr_receive_time,rpgr_state) values (#{id,jdbcType=BIGINT},#{amount,jdbcType=DECIMAL},#{giveUid,jdbcType=BIGINT},#{giveTime,jdbcType=TIMESTAMP},#{endTime,jdbcType=TIMESTAMP},#{receiveUid,jdbcType=BIGINT},#{receiveTime,jdbcType=TIMESTAMP},#{state,jdbcType=INTEGER})</insert>
  <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.redpack.RedPackGiveRecord" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_red_pack_give_record
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">rpgr_id,</if>
      <if test="amount != null">rpgr_money,</if>
@@ -40,8 +40,8 @@
      <if test="state != null">#{state,jdbcType=INTEGER},</if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.redpack.RedPackGiveRecord">update yeshi_red_pack_give_record set rpgr_money = #{amount,jdbcType=DECIMAL},rpgr_give_uid = #{giveUid,jdbcType=BIGINT},rpgr_give_time = #{giveTime,jdbcType=TIMESTAMP},rpgr_end_time = #{endTime,jdbcType=TIMESTAMP},rpgr_receive_uid = #{receiveUid,jdbcType=BIGINT},rpgr_receive_time = #{receiveTime,jdbcType=TIMESTAMP},rpgr_state = #{state,jdbcType=INTEGER} where rpgr_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.redpack.RedPackGiveRecord">update yeshi_red_pack_give_record
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.redpack.RedPackGiveRecord">update yeshi_ec_red_pack_give_record set rpgr_money = #{amount,jdbcType=DECIMAL},rpgr_give_uid = #{giveUid,jdbcType=BIGINT},rpgr_give_time = #{giveTime,jdbcType=TIMESTAMP},rpgr_end_time = #{endTime,jdbcType=TIMESTAMP},rpgr_receive_uid = #{receiveUid,jdbcType=BIGINT},rpgr_receive_time = #{receiveTime,jdbcType=TIMESTAMP},rpgr_state = #{state,jdbcType=INTEGER} where rpgr_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.redpack.RedPackGiveRecord">update yeshi_ec_red_pack_give_record
    <set>
      <if test="amount != null">rpgr_money=#{amount,jdbcType=DECIMAL},</if>
      <if test="giveUid != null">rpgr_give_uid=#{giveUid,jdbcType=BIGINT},</if>
@@ -54,7 +54,7 @@
  </update>
  
  <select id="overdueList" resultMap="BaseResultMap">
     SELECT * FROM yeshi_red_pack_give_record
     SELECT * FROM yeshi_ec_red_pack_give_record
   WHERE rpgr_state = 0 AND rpgr_end_time IS NOT NULL AND rpgr_end_time <![CDATA[<]]> NOW()
   LIMIT #{count}
  </select>