yujian
2019-12-19 bb07147aaa96d1ef4c99e358dbbe7dad160dc62a
fanli/src/main/java/com/yeshi/fanli/mapping/order/UserOrderWeiQuanRecordMapper.xml
@@ -2,54 +2,90 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeshi.fanli.dao.mybatis.order.UserOrderWeiQuanRecordMapper">
  <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.order.UserOrderWeiQuanRecord">
    <id column="wr_id" property="id" jdbcType="BIGINT"/>
    <result column="wr_source_type" property="sourceType" jdbcType="INTEGER"/>
    <result column="wr_trade_id" property="tradeId" jdbcType="VARCHAR"/>
    <result column="wr_uid" property="uid" jdbcType="BIGINT"/>
    <result column="wr_money" property="money" jdbcType="DECIMAL"/>
    <result column="wr_state" property="state" jdbcType="INTEGER"/>
    <result column="wr_create_time" property="createTime" jdbcType="TIMESTAMP"/>
    <result column="wr_update_time" property="updateTime" jdbcType="TIMESTAMP"/>
  </resultMap>
  <sql id="Base_Column_List">wr_id,wr_source_type,wr_trade_id,wr_uid,wr_money,wr_state,wr_create_time,wr_update_time</sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
    <include refid="Base_Column_List"/>from yeshi_ec_user_order_weiquan_record where wr_id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_user_order_weiquan_record where wr_id = #{id,jdbcType=BIGINT}</delete>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.order.UserOrderWeiQuanRecord" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_user_order_weiquan_record (wr_id,wr_source_type,wr_trade_id,wr_uid,wr_money,wr_state,wr_create_time,wr_update_time) values (#{id,jdbcType=BIGINT},#{sourceType,jdbcType=INTEGER},#{tradeId,jdbcType=VARCHAR},#{uid,jdbcType=BIGINT},#{money,jdbcType=DECIMAL},#{state,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
  <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.order.UserOrderWeiQuanRecord" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_user_order_weiquan_record
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">wr_id,</if>
      <if test="sourceType != null">wr_source_type,</if>
      <if test="tradeId != null">wr_trade_id,</if>
      <if test="uid != null">wr_uid,</if>
      <if test="money != null">wr_money,</if>
      <if test="state != null">wr_state,</if>
      <if test="createTime != null">wr_create_time,</if>
      <if test="updateTime != null">wr_update_time,</if>
    </trim>values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">#{id,jdbcType=BIGINT},</if>
      <if test="sourceType != null">#{sourceType,jdbcType=INTEGER},</if>
      <if test="tradeId != null">#{tradeId,jdbcType=VARCHAR},</if>
      <if test="uid != null">#{uid,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.order.UserOrderWeiQuanRecord">update yeshi_ec_user_order_weiquan_record set wr_source_type = #{sourceType,jdbcType=INTEGER},wr_trade_id = #{tradeId,jdbcType=VARCHAR},wr_uid = #{uid,jdbcType=BIGINT},wr_money = #{money,jdbcType=DECIMAL},wr_state = #{state,jdbcType=INTEGER},wr_create_time = #{createTime,jdbcType=TIMESTAMP},wr_update_time = #{updateTime,jdbcType=TIMESTAMP} where wr_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.order.UserOrderWeiQuanRecord">update yeshi_ec_user_order_weiquan_record
    <set>
      <if test="sourceType != null">wr_source_type=#{sourceType,jdbcType=INTEGER},</if>
      <if test="tradeId != null">wr_trade_id=#{tradeId,jdbcType=VARCHAR},</if>
      <if test="uid != null">wr_uid=#{uid,jdbcType=BIGINT},</if>
      <if test="money != null">wr_money=#{money,jdbcType=DECIMAL},</if>
      <if test="state != null">wr_state=#{state,jdbcType=INTEGER},</if>
      <if test="createTime != null">wr_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
      <if test="updateTime != null">wr_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
    </set> where wr_id = #{id,jdbcType=BIGINT}
  </update>
   <resultMap id="BaseResultMap"
      type="com.yeshi.fanli.entity.order.UserOrderWeiQuanRecord">
      <id column="wr_id" property="id" jdbcType="BIGINT" />
      <result column="wr_source_type" property="sourceType" jdbcType="INTEGER" />
      <result column="wr_trade_id" property="tradeId" jdbcType="VARCHAR" />
      <result column="wr_uid" property="uid" jdbcType="BIGINT" />
      <result column="wr_money" property="money" jdbcType="DECIMAL" />
      <result column="wr_state" property="state" jdbcType="INTEGER" />
      <result column="wr_create_time" property="createTime" jdbcType="TIMESTAMP" />
      <result column="wr_update_time" property="updateTime" jdbcType="TIMESTAMP" />
   </resultMap>
   <sql id="Base_Column_List">wr_id,wr_source_type,wr_trade_id,wr_uid,wr_money,wr_state,wr_create_time,wr_update_time
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap"
      parameterType="java.lang.Long">
      select
      <include refid="Base_Column_List" />
      from yeshi_ec_user_order_weiquan_record where wr_id =
      #{id,jdbcType=BIGINT}
   </select>
   <select id="selectByOrderInfoAndUid" resultMap="BaseResultMap">
      select
      <include refid="Base_Column_List" />
      from yeshi_ec_user_order_weiquan_record where wr_trade_id =#{tradeId}
      and wr_source_type=#{sourceType} and wr_uid=#{uid}
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
      yeshi_ec_user_order_weiquan_record where wr_id = #{id,jdbcType=BIGINT}
   </delete>
   <insert id="insert" parameterType="com.yeshi.fanli.entity.order.UserOrderWeiQuanRecord"
      useGeneratedKeys="true" keyProperty="id">insert into
      yeshi_ec_user_order_weiquan_record
      (wr_id,wr_source_type,wr_trade_id,wr_uid,wr_money,wr_state,wr_create_time,wr_update_time)
      values
      (#{id,jdbcType=BIGINT},#{sourceType,jdbcType=INTEGER},#{tradeId,jdbcType=VARCHAR},#{uid,jdbcType=BIGINT},#{money,jdbcType=DECIMAL},#{state,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})
   </insert>
   <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.order.UserOrderWeiQuanRecord"
      useGeneratedKeys="true" keyProperty="id">
      insert into yeshi_ec_user_order_weiquan_record
      <trim prefix="(" suffix=")" suffixOverrides=",">
         <if test="id != null">wr_id,</if>
         <if test="sourceType != null">wr_source_type,</if>
         <if test="tradeId != null">wr_trade_id,</if>
         <if test="uid != null">wr_uid,</if>
         <if test="money != null">wr_money,</if>
         <if test="state != null">wr_state,</if>
         <if test="createTime != null">wr_create_time,</if>
         <if test="updateTime != null">wr_update_time,</if>
      </trim>
      values
      <trim prefix="(" suffix=")" suffixOverrides=",">
         <if test="id != null">#{id,jdbcType=BIGINT},</if>
         <if test="sourceType != null">#{sourceType,jdbcType=INTEGER},</if>
         <if test="tradeId != null">#{tradeId,jdbcType=VARCHAR},</if>
         <if test="uid != null">#{uid,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.order.UserOrderWeiQuanRecord">update
      yeshi_ec_user_order_weiquan_record set wr_source_type =
      #{sourceType,jdbcType=INTEGER},wr_trade_id =
      #{tradeId,jdbcType=VARCHAR},wr_uid = #{uid,jdbcType=BIGINT},wr_money =
      #{money,jdbcType=DECIMAL},wr_state =
      #{state,jdbcType=INTEGER},wr_create_time =
      #{createTime,jdbcType=TIMESTAMP},wr_update_time =
      #{updateTime,jdbcType=TIMESTAMP} where wr_id = #{id,jdbcType=BIGINT}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.order.UserOrderWeiQuanRecord">
      update yeshi_ec_user_order_weiquan_record
      <set>
         <if test="sourceType != null">wr_source_type=#{sourceType,jdbcType=INTEGER},</if>
         <if test="tradeId != null">wr_trade_id=#{tradeId,jdbcType=VARCHAR},</if>
         <if test="uid != null">wr_uid=#{uid,jdbcType=BIGINT},</if>
         <if test="money != null">wr_money=#{money,jdbcType=DECIMAL},</if>
         <if test="state != null">wr_state=#{state,jdbcType=INTEGER},</if>
         <if test="createTime != null">wr_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
         <if test="updateTime != null">wr_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
      </set>
      where wr_id = #{id,jdbcType=BIGINT}
   </update>
</mapper>