yujian
2019-11-05 a980ade25b3dc1a7da482e37113f2935a2719c0b
fanli/src/main/java/com/yeshi/fanli/mapping/redpack/RedPackConfigMapper.xml
@@ -14,11 +14,11 @@
  </resultMap>
  <sql id="Base_Column_List">rpc_id,rpc_name,rpc_key,rpc_value,rpc_remark,rpc_start_time,rpc_create_time,rpc_update_time</sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
    <include refid="Base_Column_List"/>from yeshi_red_pack_config where rpc_id = #{id,jdbcType=BIGINT}
    <include refid="Base_Column_List"/>from yeshi_ec_red_pack_config where rpc_id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_red_pack_config where rpc_id = #{id,jdbcType=BIGINT}</delete>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.redpack.RedPackConfig" useGeneratedKeys="true" keyProperty="id">insert into yeshi_red_pack_config (rpc_id,rpc_name,rpc_key,rpc_value,rpc_remark,rpc_start_time,rpc_create_time,rpc_update_time) values (#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{key,jdbcType=VARCHAR},#{value,jdbcType=VARCHAR},#{remark,jdbcType=VARCHAR},#{startTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
  <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.redpack.RedPackConfig" useGeneratedKeys="true" keyProperty="id">insert into yeshi_red_pack_config
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_red_pack_config where rpc_id = #{id,jdbcType=BIGINT}</delete>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.redpack.RedPackConfig" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_red_pack_config (rpc_id,rpc_name,rpc_key,rpc_value,rpc_remark,rpc_start_time,rpc_create_time,rpc_update_time) values (#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{key,jdbcType=VARCHAR},#{value,jdbcType=VARCHAR},#{remark,jdbcType=VARCHAR},#{startTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
  <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.redpack.RedPackConfig" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_red_pack_config
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">rpc_id,</if>
      <if test="name != null">rpc_name,</if>
@@ -40,8 +40,8 @@
      <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.redpack.RedPackConfig">update yeshi_red_pack_config set rpc_name = #{name,jdbcType=VARCHAR},rpc_key = #{key,jdbcType=VARCHAR},rpc_value = #{value,jdbcType=VARCHAR},rpc_remark = #{remark,jdbcType=VARCHAR},rpc_start_time = #{startTime,jdbcType=TIMESTAMP},rpc_create_time = #{createTime,jdbcType=TIMESTAMP},rpc_update_time = #{updateTime,jdbcType=TIMESTAMP} where rpc_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.redpack.RedPackConfig">update yeshi_red_pack_config
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.redpack.RedPackConfig">update yeshi_ec_red_pack_config set rpc_name = #{name,jdbcType=VARCHAR},rpc_key = #{key,jdbcType=VARCHAR},rpc_value = #{value,jdbcType=VARCHAR},rpc_remark = #{remark,jdbcType=VARCHAR},rpc_start_time = #{startTime,jdbcType=TIMESTAMP},rpc_create_time = #{createTime,jdbcType=TIMESTAMP},rpc_update_time = #{updateTime,jdbcType=TIMESTAMP} where rpc_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.redpack.RedPackConfig">update yeshi_ec_red_pack_config
    <set>
      <if test="name != null">rpc_name=#{name,jdbcType=VARCHAR},</if>
      <if test="key != null">rpc_key=#{key,jdbcType=VARCHAR},</if>
@@ -54,7 +54,7 @@
  </update>
  
  <select id="getByKey" resultMap="BaseResultMap">
     SELECT * FROM yeshi_red_pack_config t
     SELECT * FROM yeshi_ec_red_pack_config t
     WHERE t.`rpc_key` = #{key} and #{startTime} >= rpc_start_time 
     ORDER BY rpc_start_time DESC LIMIT 1
  </select>