|
@@ -0,0 +1,633 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
+<mapper namespace="com.book.dao.cps.mapper.OrdersMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.book.dao.cps.pojo.Orders">
|
|
|
+ <id column="id" jdbcType="INTEGER" property="id" />
|
|
|
+ <result column="user_id" jdbcType="BIGINT" property="userId" />
|
|
|
+ <result column="admin_id" jdbcType="INTEGER" property="adminId" />
|
|
|
+ <result column="resource_id" jdbcType="INTEGER" property="resourceId" />
|
|
|
+ <result column="wxpay_id" jdbcType="INTEGER" property="wxpayId" />
|
|
|
+ <result column="benefit" jdbcType="DECIMAL" property="benefit" />
|
|
|
+ <result column="money" jdbcType="DECIMAL" property="money" />
|
|
|
+ <result column="money_benefit" jdbcType="DECIMAL" property="moneyBenefit" />
|
|
|
+ <result column="category" jdbcType="VARCHAR" property="category" />
|
|
|
+ <result column="business_line" jdbcType="INTEGER" property="businessLine" />
|
|
|
+ <result column="payid" jdbcType="VARCHAR" property="payid" />
|
|
|
+ <result column="out_trade_no" jdbcType="VARCHAR" property="outTradeNo" />
|
|
|
+ <result column="transaction_id" jdbcType="VARCHAR" property="transactionId" />
|
|
|
+ <result column="ip" jdbcType="VARCHAR" property="ip" />
|
|
|
+ <result column="referral_id" jdbcType="INTEGER" property="referralId" />
|
|
|
+ <result column="referral_id_permanent" jdbcType="INTEGER" property="referralIdPermanent" />
|
|
|
+ <result column="book_id" jdbcType="BIGINT" property="bookId" />
|
|
|
+ <result column="chapter_id" jdbcType="BIGINT" property="chapterId" />
|
|
|
+ <result column="goods_id" jdbcType="INTEGER" property="goodsId" />
|
|
|
+ <result column="kandian" jdbcType="INTEGER" property="kandian" />
|
|
|
+ <result column="free_kandian" jdbcType="INTEGER" property="freeKandian" />
|
|
|
+ <result column="day" jdbcType="INTEGER" property="day" />
|
|
|
+ <result column="type" jdbcType="OTHER" property="type" />
|
|
|
+ <result column="state" jdbcType="OTHER" property="state" />
|
|
|
+ <result column="activity_id" jdbcType="INTEGER" property="activityId" />
|
|
|
+ <result column="deduct" jdbcType="BOOLEAN" property="deduct" />
|
|
|
+ <result column="reward_admin_id" jdbcType="INTEGER" property="rewardAdminId" />
|
|
|
+ <result column="reward_money" jdbcType="DECIMAL" property="rewardMoney" />
|
|
|
+ <result column="reward_benefit" jdbcType="DECIMAL" property="rewardBenefit" />
|
|
|
+ <result column="createtime" jdbcType="INTEGER" property="createtime" />
|
|
|
+ <result column="updatetime" jdbcType="INTEGER" property="updatetime" />
|
|
|
+ <result column="finishtime" jdbcType="INTEGER" property="finishtime" />
|
|
|
+ <result column="payment_method" jdbcType="BOOLEAN" property="paymentMethod" />
|
|
|
+ <result column="pdorderid" jdbcType="VARCHAR" property="pdorderid" />
|
|
|
+ <result column="pay_json" jdbcType="VARCHAR" property="payJson" />
|
|
|
+ <result column="ext" jdbcType="VARCHAR" property="ext" />
|
|
|
+ <result column="channel_id" jdbcType="INTEGER" property="channelId" />
|
|
|
+ <result column="channel_benefit" jdbcType="DECIMAL" property="channelBenefit" />
|
|
|
+ <result column="group" jdbcType="TINYINT" property="group" />
|
|
|
+ <result column="platform_id" jdbcType="INTEGER" property="platformId" />
|
|
|
+ <result column="mark" jdbcType="INTEGER" property="mark" />
|
|
|
+ <result column="payment_method1" jdbcType="BOOLEAN" property="paymentMethod1" />
|
|
|
+ <result column="pdorderid1" jdbcType="VARCHAR" property="pdorderid1" />
|
|
|
+ <result column="channel_benefit_money" jdbcType="DECIMAL" property="channelBenefitMoney" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ id, user_id, admin_id, resource_id, wxpay_id, benefit, money, money_benefit, category,
|
|
|
+ business_line, payid, out_trade_no, transaction_id, ip, referral_id, referral_id_permanent,
|
|
|
+ book_id, chapter_id, goods_id, kandian, free_kandian, `day`, `type`, `state`, activity_id,
|
|
|
+ deduct, reward_admin_id, reward_money, reward_benefit, createtime, updatetime, finishtime,
|
|
|
+ payment_method, pdorderid, pay_json, ext, channel_id, channel_benefit, `group`, platform_id,
|
|
|
+ mark, payment_method1, pdorderid1, channel_benefit_money
|
|
|
+ </sql>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from orders
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </select>
|
|
|
+ <select id="selectByOutTradeNo" resultMap="BaseResultMap">
|
|
|
+ SELECT * FROM test_cps.orders where out_trade_no = #{out_trade_no,jdbcType=VARCHAR}
|
|
|
+
|
|
|
+ </select>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
+ delete from orders
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.book.dao.cps.pojo.Orders" useGeneratedKeys="true">
|
|
|
+ insert into orders (user_id, admin_id, resource_id,
|
|
|
+ wxpay_id, benefit, money,
|
|
|
+ money_benefit, category, business_line,
|
|
|
+ payid, out_trade_no, transaction_id,
|
|
|
+ ip, referral_id, referral_id_permanent,
|
|
|
+ book_id, chapter_id, goods_id,
|
|
|
+ kandian, free_kandian, `day`,
|
|
|
+ `type`, `state`, activity_id,
|
|
|
+ deduct, reward_admin_id, reward_money,
|
|
|
+ reward_benefit, createtime, updatetime,
|
|
|
+ finishtime, payment_method, pdorderid,
|
|
|
+ pay_json, ext, channel_id,
|
|
|
+ channel_benefit, `group`, platform_id,
|
|
|
+ mark, payment_method1, pdorderid1,
|
|
|
+ channel_benefit_money)
|
|
|
+ values (#{userId,jdbcType=BIGINT}, #{adminId,jdbcType=INTEGER}, #{resourceId,jdbcType=INTEGER},
|
|
|
+ #{wxpayId,jdbcType=INTEGER}, #{benefit,jdbcType=DECIMAL}, #{money,jdbcType=DECIMAL},
|
|
|
+ #{moneyBenefit,jdbcType=DECIMAL}, #{category,jdbcType=VARCHAR}, #{businessLine,jdbcType=INTEGER},
|
|
|
+ #{payid,jdbcType=VARCHAR}, #{outTradeNo,jdbcType=VARCHAR}, #{transactionId,jdbcType=VARCHAR},
|
|
|
+ #{ip,jdbcType=VARCHAR}, #{referralId,jdbcType=INTEGER}, #{referralIdPermanent,jdbcType=INTEGER},
|
|
|
+ #{bookId,jdbcType=BIGINT}, #{chapterId,jdbcType=BIGINT}, #{goodsId,jdbcType=INTEGER},
|
|
|
+ #{kandian,jdbcType=INTEGER}, #{freeKandian,jdbcType=INTEGER}, #{day,jdbcType=INTEGER},
|
|
|
+ #{type,jdbcType=OTHER}, #{state,jdbcType=OTHER}, #{activityId,jdbcType=INTEGER},
|
|
|
+ #{deduct,jdbcType=BOOLEAN}, #{rewardAdminId,jdbcType=INTEGER}, #{rewardMoney,jdbcType=DECIMAL},
|
|
|
+ #{rewardBenefit,jdbcType=DECIMAL}, #{createtime,jdbcType=INTEGER}, #{updatetime,jdbcType=INTEGER},
|
|
|
+ #{finishtime,jdbcType=INTEGER}, #{paymentMethod,jdbcType=BOOLEAN}, #{pdorderid,jdbcType=VARCHAR},
|
|
|
+ #{payJson,jdbcType=VARCHAR}, #{ext,jdbcType=VARCHAR}, #{channelId,jdbcType=INTEGER},
|
|
|
+ #{channelBenefit,jdbcType=DECIMAL}, #{group,jdbcType=TINYINT}, #{platformId,jdbcType=INTEGER},
|
|
|
+ #{mark,jdbcType=INTEGER}, #{paymentMethod1,jdbcType=BOOLEAN}, #{pdorderid1,jdbcType=VARCHAR},
|
|
|
+ #{channelBenefitMoney,jdbcType=DECIMAL})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.book.dao.cps.pojo.Orders" useGeneratedKeys="true">
|
|
|
+ insert into orders
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="userId != null">
|
|
|
+ user_id,
|
|
|
+ </if>
|
|
|
+ <if test="adminId != null">
|
|
|
+ admin_id,
|
|
|
+ </if>
|
|
|
+ <if test="resourceId != null">
|
|
|
+ resource_id,
|
|
|
+ </if>
|
|
|
+ <if test="wxpayId != null">
|
|
|
+ wxpay_id,
|
|
|
+ </if>
|
|
|
+ <if test="benefit != null">
|
|
|
+ benefit,
|
|
|
+ </if>
|
|
|
+ <if test="money != null">
|
|
|
+ money,
|
|
|
+ </if>
|
|
|
+ <if test="moneyBenefit != null">
|
|
|
+ money_benefit,
|
|
|
+ </if>
|
|
|
+ <if test="category != null">
|
|
|
+ category,
|
|
|
+ </if>
|
|
|
+ <if test="businessLine != null">
|
|
|
+ business_line,
|
|
|
+ </if>
|
|
|
+ <if test="payid != null">
|
|
|
+ payid,
|
|
|
+ </if>
|
|
|
+ <if test="outTradeNo != null">
|
|
|
+ out_trade_no,
|
|
|
+ </if>
|
|
|
+ <if test="transactionId != null">
|
|
|
+ transaction_id,
|
|
|
+ </if>
|
|
|
+ <if test="ip != null">
|
|
|
+ ip,
|
|
|
+ </if>
|
|
|
+ <if test="referralId != null">
|
|
|
+ referral_id,
|
|
|
+ </if>
|
|
|
+ <if test="referralIdPermanent != null">
|
|
|
+ referral_id_permanent,
|
|
|
+ </if>
|
|
|
+ <if test="bookId != null">
|
|
|
+ book_id,
|
|
|
+ </if>
|
|
|
+ <if test="chapterId != null">
|
|
|
+ chapter_id,
|
|
|
+ </if>
|
|
|
+ <if test="goodsId != null">
|
|
|
+ goods_id,
|
|
|
+ </if>
|
|
|
+ <if test="kandian != null">
|
|
|
+ kandian,
|
|
|
+ </if>
|
|
|
+ <if test="freeKandian != null">
|
|
|
+ free_kandian,
|
|
|
+ </if>
|
|
|
+ <if test="day != null">
|
|
|
+ `day`,
|
|
|
+ </if>
|
|
|
+ <if test="type != null">
|
|
|
+ `type`,
|
|
|
+ </if>
|
|
|
+ <if test="state != null">
|
|
|
+ `state`,
|
|
|
+ </if>
|
|
|
+ <if test="activityId != null">
|
|
|
+ activity_id,
|
|
|
+ </if>
|
|
|
+ <if test="deduct != null">
|
|
|
+ deduct,
|
|
|
+ </if>
|
|
|
+ <if test="rewardAdminId != null">
|
|
|
+ reward_admin_id,
|
|
|
+ </if>
|
|
|
+ <if test="rewardMoney != null">
|
|
|
+ reward_money,
|
|
|
+ </if>
|
|
|
+ <if test="rewardBenefit != null">
|
|
|
+ reward_benefit,
|
|
|
+ </if>
|
|
|
+ <if test="createtime != null">
|
|
|
+ createtime,
|
|
|
+ </if>
|
|
|
+ <if test="updatetime != null">
|
|
|
+ updatetime,
|
|
|
+ </if>
|
|
|
+ <if test="finishtime != null">
|
|
|
+ finishtime,
|
|
|
+ </if>
|
|
|
+ <if test="paymentMethod != null">
|
|
|
+ payment_method,
|
|
|
+ </if>
|
|
|
+ <if test="pdorderid != null">
|
|
|
+ pdorderid,
|
|
|
+ </if>
|
|
|
+ <if test="payJson != null">
|
|
|
+ pay_json,
|
|
|
+ </if>
|
|
|
+ <if test="ext != null">
|
|
|
+ ext,
|
|
|
+ </if>
|
|
|
+ <if test="channelId != null">
|
|
|
+ channel_id,
|
|
|
+ </if>
|
|
|
+ <if test="channelBenefit != null">
|
|
|
+ channel_benefit,
|
|
|
+ </if>
|
|
|
+ <if test="group != null">
|
|
|
+ `group`,
|
|
|
+ </if>
|
|
|
+ <if test="platformId != null">
|
|
|
+ platform_id,
|
|
|
+ </if>
|
|
|
+ <if test="mark != null">
|
|
|
+ mark,
|
|
|
+ </if>
|
|
|
+ <if test="paymentMethod1 != null">
|
|
|
+ payment_method1,
|
|
|
+ </if>
|
|
|
+ <if test="pdorderid1 != null">
|
|
|
+ pdorderid1,
|
|
|
+ </if>
|
|
|
+ <if test="channelBenefitMoney != null">
|
|
|
+ channel_benefit_money,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="userId != null">
|
|
|
+ #{userId,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="adminId != null">
|
|
|
+ #{adminId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="resourceId != null">
|
|
|
+ #{resourceId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="wxpayId != null">
|
|
|
+ #{wxpayId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="benefit != null">
|
|
|
+ #{benefit,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="money != null">
|
|
|
+ #{money,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="moneyBenefit != null">
|
|
|
+ #{moneyBenefit,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="category != null">
|
|
|
+ #{category,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="businessLine != null">
|
|
|
+ #{businessLine,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="payid != null">
|
|
|
+ #{payid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="outTradeNo != null">
|
|
|
+ #{outTradeNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="transactionId != null">
|
|
|
+ #{transactionId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ip != null">
|
|
|
+ #{ip,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="referralId != null">
|
|
|
+ #{referralId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="referralIdPermanent != null">
|
|
|
+ #{referralIdPermanent,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="bookId != null">
|
|
|
+ #{bookId,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="chapterId != null">
|
|
|
+ #{chapterId,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="goodsId != null">
|
|
|
+ #{goodsId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="kandian != null">
|
|
|
+ #{kandian,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="freeKandian != null">
|
|
|
+ #{freeKandian,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="day != null">
|
|
|
+ #{day,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="type != null">
|
|
|
+ #{type,jdbcType=OTHER},
|
|
|
+ </if>
|
|
|
+ <if test="state != null">
|
|
|
+ #{state,jdbcType=OTHER},
|
|
|
+ </if>
|
|
|
+ <if test="activityId != null">
|
|
|
+ #{activityId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="deduct != null">
|
|
|
+ #{deduct,jdbcType=BOOLEAN},
|
|
|
+ </if>
|
|
|
+ <if test="rewardAdminId != null">
|
|
|
+ #{rewardAdminId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="rewardMoney != null">
|
|
|
+ #{rewardMoney,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="rewardBenefit != null">
|
|
|
+ #{rewardBenefit,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="createtime != null">
|
|
|
+ #{createtime,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="updatetime != null">
|
|
|
+ #{updatetime,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="finishtime != null">
|
|
|
+ #{finishtime,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="paymentMethod != null">
|
|
|
+ #{paymentMethod,jdbcType=BOOLEAN},
|
|
|
+ </if>
|
|
|
+ <if test="pdorderid != null">
|
|
|
+ #{pdorderid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="payJson != null">
|
|
|
+ #{payJson,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ext != null">
|
|
|
+ #{ext,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="channelId != null">
|
|
|
+ #{channelId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="channelBenefit != null">
|
|
|
+ #{channelBenefit,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="group != null">
|
|
|
+ #{group,jdbcType=TINYINT},
|
|
|
+ </if>
|
|
|
+ <if test="platformId != null">
|
|
|
+ #{platformId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="mark != null">
|
|
|
+ #{mark,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="paymentMethod1 != null">
|
|
|
+ #{paymentMethod1,jdbcType=BOOLEAN},
|
|
|
+ </if>
|
|
|
+ <if test="pdorderid1 != null">
|
|
|
+ #{pdorderid1,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="channelBenefitMoney != null">
|
|
|
+ #{channelBenefitMoney,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.book.dao.cps.pojo.Orders">
|
|
|
+ update orders
|
|
|
+ <set>
|
|
|
+ <if test="userId != null">
|
|
|
+ user_id = #{userId,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="adminId != null">
|
|
|
+ admin_id = #{adminId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="resourceId != null">
|
|
|
+ resource_id = #{resourceId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="wxpayId != null">
|
|
|
+ wxpay_id = #{wxpayId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="benefit != null">
|
|
|
+ benefit = #{benefit,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="money != null">
|
|
|
+ money = #{money,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="moneyBenefit != null">
|
|
|
+ money_benefit = #{moneyBenefit,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="category != null">
|
|
|
+ category = #{category,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="businessLine != null">
|
|
|
+ business_line = #{businessLine,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="payid != null">
|
|
|
+ payid = #{payid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="outTradeNo != null">
|
|
|
+ out_trade_no = #{outTradeNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="transactionId != null">
|
|
|
+ transaction_id = #{transactionId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ip != null">
|
|
|
+ ip = #{ip,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="referralId != null">
|
|
|
+ referral_id = #{referralId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="referralIdPermanent != null">
|
|
|
+ referral_id_permanent = #{referralIdPermanent,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="bookId != null">
|
|
|
+ book_id = #{bookId,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="chapterId != null">
|
|
|
+ chapter_id = #{chapterId,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="goodsId != null">
|
|
|
+ goods_id = #{goodsId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="kandian != null">
|
|
|
+ kandian = #{kandian,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="freeKandian != null">
|
|
|
+ free_kandian = #{freeKandian,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="day != null">
|
|
|
+ `day` = #{day,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="type != null">
|
|
|
+ `type` = #{type,jdbcType=OTHER},
|
|
|
+ </if>
|
|
|
+ <if test="state != null">
|
|
|
+ `state` = #{state,jdbcType=OTHER},
|
|
|
+ </if>
|
|
|
+ <if test="activityId != null">
|
|
|
+ activity_id = #{activityId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="deduct != null">
|
|
|
+ deduct = #{deduct,jdbcType=BOOLEAN},
|
|
|
+ </if>
|
|
|
+ <if test="rewardAdminId != null">
|
|
|
+ reward_admin_id = #{rewardAdminId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="rewardMoney != null">
|
|
|
+ reward_money = #{rewardMoney,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="rewardBenefit != null">
|
|
|
+ reward_benefit = #{rewardBenefit,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="createtime != null">
|
|
|
+ createtime = #{createtime,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="updatetime != null">
|
|
|
+ updatetime = #{updatetime,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="finishtime != null">
|
|
|
+ finishtime = #{finishtime,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="paymentMethod != null">
|
|
|
+ payment_method = #{paymentMethod,jdbcType=BOOLEAN},
|
|
|
+ </if>
|
|
|
+ <if test="pdorderid != null">
|
|
|
+ pdorderid = #{pdorderid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="payJson != null">
|
|
|
+ pay_json = #{payJson,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ext != null">
|
|
|
+ ext = #{ext,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="channelId != null">
|
|
|
+ channel_id = #{channelId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="channelBenefit != null">
|
|
|
+ channel_benefit = #{channelBenefit,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="group != null">
|
|
|
+ `group` = #{group,jdbcType=TINYINT},
|
|
|
+ </if>
|
|
|
+ <if test="platformId != null">
|
|
|
+ platform_id = #{platformId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="mark != null">
|
|
|
+ mark = #{mark,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="paymentMethod1 != null">
|
|
|
+ payment_method1 = #{paymentMethod1,jdbcType=BOOLEAN},
|
|
|
+ </if>
|
|
|
+ <if test="pdorderid1 != null">
|
|
|
+ pdorderid1 = #{pdorderid1,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="channelBenefitMoney != null">
|
|
|
+ channel_benefit_money = #{channelBenefitMoney,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.book.dao.cps.pojo.Orders">
|
|
|
+ update orders
|
|
|
+ set user_id = #{userId,jdbcType=BIGINT},
|
|
|
+ admin_id = #{adminId,jdbcType=INTEGER},
|
|
|
+ resource_id = #{resourceId,jdbcType=INTEGER},
|
|
|
+ wxpay_id = #{wxpayId,jdbcType=INTEGER},
|
|
|
+ benefit = #{benefit,jdbcType=DECIMAL},
|
|
|
+ money = #{money,jdbcType=DECIMAL},
|
|
|
+ money_benefit = #{moneyBenefit,jdbcType=DECIMAL},
|
|
|
+ category = #{category,jdbcType=VARCHAR},
|
|
|
+ business_line = #{businessLine,jdbcType=INTEGER},
|
|
|
+ payid = #{payid,jdbcType=VARCHAR},
|
|
|
+ out_trade_no = #{outTradeNo,jdbcType=VARCHAR},
|
|
|
+ transaction_id = #{transactionId,jdbcType=VARCHAR},
|
|
|
+ ip = #{ip,jdbcType=VARCHAR},
|
|
|
+ referral_id = #{referralId,jdbcType=INTEGER},
|
|
|
+ referral_id_permanent = #{referralIdPermanent,jdbcType=INTEGER},
|
|
|
+ book_id = #{bookId,jdbcType=BIGINT},
|
|
|
+ chapter_id = #{chapterId,jdbcType=BIGINT},
|
|
|
+ goods_id = #{goodsId,jdbcType=INTEGER},
|
|
|
+ kandian = #{kandian,jdbcType=INTEGER},
|
|
|
+ free_kandian = #{freeKandian,jdbcType=INTEGER},
|
|
|
+ `day` = #{day,jdbcType=INTEGER},
|
|
|
+ `type` = #{type,jdbcType=OTHER},
|
|
|
+ `state` = #{state,jdbcType=OTHER},
|
|
|
+ activity_id = #{activityId,jdbcType=INTEGER},
|
|
|
+ deduct = #{deduct,jdbcType=BOOLEAN},
|
|
|
+ reward_admin_id = #{rewardAdminId,jdbcType=INTEGER},
|
|
|
+ reward_money = #{rewardMoney,jdbcType=DECIMAL},
|
|
|
+ reward_benefit = #{rewardBenefit,jdbcType=DECIMAL},
|
|
|
+ createtime = #{createtime,jdbcType=INTEGER},
|
|
|
+ updatetime = #{updatetime,jdbcType=INTEGER},
|
|
|
+ finishtime = #{finishtime,jdbcType=INTEGER},
|
|
|
+ payment_method = #{paymentMethod,jdbcType=BOOLEAN},
|
|
|
+ pdorderid = #{pdorderid,jdbcType=VARCHAR},
|
|
|
+ pay_json = #{payJson,jdbcType=VARCHAR},
|
|
|
+ ext = #{ext,jdbcType=VARCHAR},
|
|
|
+ channel_id = #{channelId,jdbcType=INTEGER},
|
|
|
+ channel_benefit = #{channelBenefit,jdbcType=DECIMAL},
|
|
|
+ `group` = #{group,jdbcType=TINYINT},
|
|
|
+ platform_id = #{platformId,jdbcType=INTEGER},
|
|
|
+ mark = #{mark,jdbcType=INTEGER},
|
|
|
+ payment_method1 = #{paymentMethod1,jdbcType=BOOLEAN},
|
|
|
+ pdorderid1 = #{pdorderid1,jdbcType=VARCHAR},
|
|
|
+ channel_benefit_money = #{channelBenefitMoney,jdbcType=DECIMAL}
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+ <update id="updateByOutTradeNo">
|
|
|
+ update orders
|
|
|
+ <set>
|
|
|
+
|
|
|
+
|
|
|
+ <if test="outTradeNo != null">
|
|
|
+ out_trade_no = #{outTradeNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="transactionId != null">
|
|
|
+ transaction_id = #{transactionId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ip != null">
|
|
|
+ ip = #{ip,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="state != null">
|
|
|
+ `state` = #{state,jdbcType=OTHER},
|
|
|
+ </if>
|
|
|
+ <if test="activityId != null">
|
|
|
+ activity_id = #{activityId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="deduct != null">
|
|
|
+ deduct = #{deduct,jdbcType=BOOLEAN},
|
|
|
+ </if>
|
|
|
+ <if test="rewardAdminId != null">
|
|
|
+ reward_admin_id = #{rewardAdminId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="rewardMoney != null">
|
|
|
+ reward_money = #{rewardMoney,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="rewardBenefit != null">
|
|
|
+ reward_benefit = #{rewardBenefit,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="createtime != null">
|
|
|
+ createtime = #{createtime,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="updatetime != null">
|
|
|
+ updatetime = #{updatetime,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="finishtime != null">
|
|
|
+ finishtime = #{finishtime,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="paymentMethod != null">
|
|
|
+ payment_method = #{paymentMethod,jdbcType=BOOLEAN},
|
|
|
+ </if>
|
|
|
+ <if test="pdorderid != null">
|
|
|
+ pdorderid = #{pdorderid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="payJson != null">
|
|
|
+ pay_json = #{payJson,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ext != null">
|
|
|
+ ext = #{ext,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="channelId != null">
|
|
|
+ channel_id = #{channelId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="channelBenefit != null">
|
|
|
+ channel_benefit = #{channelBenefit,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="group != null">
|
|
|
+ `group` = #{group,jdbcType=TINYINT},
|
|
|
+ </if>
|
|
|
+ <if test="platformId != null">
|
|
|
+ platform_id = #{platformId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="mark != null">
|
|
|
+ mark = #{mark,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="paymentMethod1 != null">
|
|
|
+ payment_method1 = #{paymentMethod1,jdbcType=BOOLEAN},
|
|
|
+ </if>
|
|
|
+ <if test="pdorderid1 != null">
|
|
|
+ pdorderid1 = #{pdorderid1,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="channelBenefitMoney != null">
|
|
|
+ channel_benefit_money = #{channelBenefitMoney,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where out_trade_no = #{out_trade_no,jdbcType=VARCHAR}
|
|
|
+
|
|
|
+ </update>
|
|
|
+</mapper>
|