|
|
@@ -0,0 +1,732 @@
|
|
|
+<?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.goafanti.common.dao.TOrderMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.goafanti.common.model.TOrder">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Dec 26 20:46:24 CST 2017.
|
|
|
+ -->
|
|
|
+ <id column="order_no" jdbcType="BIGINT" property="orderNo" />
|
|
|
+ <result column="creater" jdbcType="VARCHAR" property="creater" />
|
|
|
+ <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
+ <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
+ <result column="buyer_id" jdbcType="VARCHAR" property="buyerId" />
|
|
|
+ <result column="seller_id" jdbcType="VARCHAR" property="sellerId" />
|
|
|
+ <result column="commodity_id" jdbcType="VARCHAR" property="commodityId" />
|
|
|
+ <result column="commodity_quantity" jdbcType="INTEGER" property="commodityQuantity" />
|
|
|
+ <result column="commodity_price" jdbcType="DECIMAL" property="commodityPrice" />
|
|
|
+ <result column="commodity_type" jdbcType="INTEGER" property="commodityType" />
|
|
|
+ <result column="commodity_mode" jdbcType="VARCHAR" property="commodityMode" />
|
|
|
+ <result column="first_payment" jdbcType="DECIMAL" property="firstPayment" />
|
|
|
+ <result column="order_amount" jdbcType="DECIMAL" property="orderAmount" />
|
|
|
+ <result column="brokerage_amount" jdbcType="DECIMAL" property="brokerageAmount" />
|
|
|
+ <result column="brokerage_proportion" jdbcType="DECIMAL" property="brokerageProportion" />
|
|
|
+ <result column="actually_first_payment" jdbcType="DECIMAL" property="actuallyFirstPayment" />
|
|
|
+ <result column="actually_total_payment" jdbcType="DECIMAL" property="actuallyTotalPayment" />
|
|
|
+ <result column="actually_brokerage_amount" jdbcType="DECIMAL" property="actuallyBrokerageAmount" />
|
|
|
+ <result column="order_status" jdbcType="INTEGER" property="orderStatus" />
|
|
|
+ <result column="intention_status" jdbcType="INTEGER" property="intentionStatus" />
|
|
|
+ <result column="trading_status" jdbcType="INTEGER" property="tradingStatus" />
|
|
|
+ <result column="technology_transfer_progress" jdbcType="INTEGER" property="technologyTransferProgress" />
|
|
|
+ <result column="payment_status" jdbcType="INTEGER" property="paymentStatus" />
|
|
|
+ <result column="liquidation_status" jdbcType="INTEGER" property="liquidationStatus" />
|
|
|
+ <result column="order_follower" jdbcType="VARCHAR" property="orderFollower" />
|
|
|
+ <result column="order_channel" jdbcType="INTEGER" property="orderChannel" />
|
|
|
+ <result column="order_remarks" jdbcType="VARCHAR" property="orderRemarks" />
|
|
|
+ <result column="delete_sign" jdbcType="BIT" property="deleteSign" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Example_Where_Clause">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Dec 26 20:46:24 CST 2017.
|
|
|
+ -->
|
|
|
+ <where>
|
|
|
+ <foreach collection="oredCriteria" item="criteria" separator="or">
|
|
|
+ <if test="criteria.valid">
|
|
|
+ <trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
+ <foreach collection="criteria.criteria" item="criterion">
|
|
|
+ <choose>
|
|
|
+ <when test="criterion.noValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.singleValue">
|
|
|
+ and ${criterion.condition} #{criterion.value}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.betweenValue">
|
|
|
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.listValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
+ #{listItem}
|
|
|
+ </foreach>
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <sql id="Update_By_Example_Where_Clause">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Dec 26 20:46:24 CST 2017.
|
|
|
+ -->
|
|
|
+ <where>
|
|
|
+ <foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
|
+ <if test="criteria.valid">
|
|
|
+ <trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
+ <foreach collection="criteria.criteria" item="criterion">
|
|
|
+ <choose>
|
|
|
+ <when test="criterion.noValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.singleValue">
|
|
|
+ and ${criterion.condition} #{criterion.value}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.betweenValue">
|
|
|
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.listValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
+ #{listItem}
|
|
|
+ </foreach>
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Dec 26 20:46:24 CST 2017.
|
|
|
+ -->
|
|
|
+ order_no, creater, create_time, update_time, buyer_id, seller_id, commodity_id, commodity_quantity,
|
|
|
+ commodity_price, commodity_type, commodity_mode, first_payment, order_amount, brokerage_amount,
|
|
|
+ brokerage_proportion, actually_first_payment, actually_total_payment, actually_brokerage_amount,
|
|
|
+ order_status, intention_status, trading_status, technology_transfer_progress, payment_status,
|
|
|
+ liquidation_status, order_follower, order_channel, order_remarks, delete_sign
|
|
|
+ </sql>
|
|
|
+ <select id="selectByExample" parameterType="com.goafanti.common.model.TOrderExample" resultMap="BaseResultMap">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Dec 26 20:46:24 CST 2017.
|
|
|
+ -->
|
|
|
+ select
|
|
|
+ <if test="distinct">
|
|
|
+ distinct
|
|
|
+ </if>
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from t_order
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ <if test="orderByClause != null">
|
|
|
+ order by ${orderByClause}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Dec 26 20:46:24 CST 2017.
|
|
|
+ -->
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from t_order
|
|
|
+ where order_no = #{orderNo,jdbcType=BIGINT}
|
|
|
+ </select>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Dec 26 20:46:24 CST 2017.
|
|
|
+ -->
|
|
|
+ delete from t_order
|
|
|
+ where order_no = #{orderNo,jdbcType=BIGINT}
|
|
|
+ </delete>
|
|
|
+ <delete id="deleteByExample" parameterType="com.goafanti.common.model.TOrderExample">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Dec 26 20:46:24 CST 2017.
|
|
|
+ -->
|
|
|
+ delete from t_order
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.goafanti.common.model.TOrder">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Dec 26 20:46:24 CST 2017.
|
|
|
+ -->
|
|
|
+ insert into t_order (order_no, creater, create_time,
|
|
|
+ update_time, buyer_id, seller_id,
|
|
|
+ commodity_id, commodity_quantity, commodity_price,
|
|
|
+ commodity_type, commodity_mode, first_payment,
|
|
|
+ order_amount, brokerage_amount, brokerage_proportion,
|
|
|
+ actually_first_payment, actually_total_payment,
|
|
|
+ actually_brokerage_amount, order_status, intention_status,
|
|
|
+ trading_status, technology_transfer_progress,
|
|
|
+ payment_status, liquidation_status, order_follower,
|
|
|
+ order_channel, order_remarks, delete_sign
|
|
|
+ )
|
|
|
+ values (#{orderNo,jdbcType=BIGINT}, #{creater,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP}, #{buyerId,jdbcType=VARCHAR}, #{sellerId,jdbcType=VARCHAR},
|
|
|
+ #{commodityId,jdbcType=VARCHAR}, #{commodityQuantity,jdbcType=INTEGER}, #{commodityPrice,jdbcType=DECIMAL},
|
|
|
+ #{commodityType,jdbcType=INTEGER}, #{commodityMode,jdbcType=VARCHAR}, #{firstPayment,jdbcType=DECIMAL},
|
|
|
+ #{orderAmount,jdbcType=DECIMAL}, #{brokerageAmount,jdbcType=DECIMAL}, #{brokerageProportion,jdbcType=DECIMAL},
|
|
|
+ #{actuallyFirstPayment,jdbcType=DECIMAL}, #{actuallyTotalPayment,jdbcType=DECIMAL},
|
|
|
+ #{actuallyBrokerageAmount,jdbcType=DECIMAL}, #{orderStatus,jdbcType=INTEGER}, #{intentionStatus,jdbcType=INTEGER},
|
|
|
+ #{tradingStatus,jdbcType=INTEGER}, #{technologyTransferProgress,jdbcType=INTEGER},
|
|
|
+ #{paymentStatus,jdbcType=INTEGER}, #{liquidationStatus,jdbcType=INTEGER}, #{orderFollower,jdbcType=VARCHAR},
|
|
|
+ #{orderChannel,jdbcType=INTEGER}, #{orderRemarks,jdbcType=VARCHAR}, #{deleteSign,jdbcType=BIT}
|
|
|
+ )
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.goafanti.common.model.TOrder">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Dec 26 20:46:24 CST 2017.
|
|
|
+ -->
|
|
|
+ insert into t_order
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="orderNo != null">
|
|
|
+ order_no,
|
|
|
+ </if>
|
|
|
+ <if test="creater != null">
|
|
|
+ creater,
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time,
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ update_time,
|
|
|
+ </if>
|
|
|
+ <if test="buyerId != null">
|
|
|
+ buyer_id,
|
|
|
+ </if>
|
|
|
+ <if test="sellerId != null">
|
|
|
+ seller_id,
|
|
|
+ </if>
|
|
|
+ <if test="commodityId != null">
|
|
|
+ commodity_id,
|
|
|
+ </if>
|
|
|
+ <if test="commodityQuantity != null">
|
|
|
+ commodity_quantity,
|
|
|
+ </if>
|
|
|
+ <if test="commodityPrice != null">
|
|
|
+ commodity_price,
|
|
|
+ </if>
|
|
|
+ <if test="commodityType != null">
|
|
|
+ commodity_type,
|
|
|
+ </if>
|
|
|
+ <if test="commodityMode != null">
|
|
|
+ commodity_mode,
|
|
|
+ </if>
|
|
|
+ <if test="firstPayment != null">
|
|
|
+ first_payment,
|
|
|
+ </if>
|
|
|
+ <if test="orderAmount != null">
|
|
|
+ order_amount,
|
|
|
+ </if>
|
|
|
+ <if test="brokerageAmount != null">
|
|
|
+ brokerage_amount,
|
|
|
+ </if>
|
|
|
+ <if test="brokerageProportion != null">
|
|
|
+ brokerage_proportion,
|
|
|
+ </if>
|
|
|
+ <if test="actuallyFirstPayment != null">
|
|
|
+ actually_first_payment,
|
|
|
+ </if>
|
|
|
+ <if test="actuallyTotalPayment != null">
|
|
|
+ actually_total_payment,
|
|
|
+ </if>
|
|
|
+ <if test="actuallyBrokerageAmount != null">
|
|
|
+ actually_brokerage_amount,
|
|
|
+ </if>
|
|
|
+ <if test="orderStatus != null">
|
|
|
+ order_status,
|
|
|
+ </if>
|
|
|
+ <if test="intentionStatus != null">
|
|
|
+ intention_status,
|
|
|
+ </if>
|
|
|
+ <if test="tradingStatus != null">
|
|
|
+ trading_status,
|
|
|
+ </if>
|
|
|
+ <if test="technologyTransferProgress != null">
|
|
|
+ technology_transfer_progress,
|
|
|
+ </if>
|
|
|
+ <if test="paymentStatus != null">
|
|
|
+ payment_status,
|
|
|
+ </if>
|
|
|
+ <if test="liquidationStatus != null">
|
|
|
+ liquidation_status,
|
|
|
+ </if>
|
|
|
+ <if test="orderFollower != null">
|
|
|
+ order_follower,
|
|
|
+ </if>
|
|
|
+ <if test="orderChannel != null">
|
|
|
+ order_channel,
|
|
|
+ </if>
|
|
|
+ <if test="orderRemarks != null">
|
|
|
+ order_remarks,
|
|
|
+ </if>
|
|
|
+ <if test="deleteSign != null">
|
|
|
+ delete_sign,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="orderNo != null">
|
|
|
+ #{orderNo,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="creater != null">
|
|
|
+ #{creater,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="buyerId != null">
|
|
|
+ #{buyerId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sellerId != null">
|
|
|
+ #{sellerId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="commodityId != null">
|
|
|
+ #{commodityId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="commodityQuantity != null">
|
|
|
+ #{commodityQuantity,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="commodityPrice != null">
|
|
|
+ #{commodityPrice,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="commodityType != null">
|
|
|
+ #{commodityType,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="commodityMode != null">
|
|
|
+ #{commodityMode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="firstPayment != null">
|
|
|
+ #{firstPayment,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="orderAmount != null">
|
|
|
+ #{orderAmount,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="brokerageAmount != null">
|
|
|
+ #{brokerageAmount,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="brokerageProportion != null">
|
|
|
+ #{brokerageProportion,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="actuallyFirstPayment != null">
|
|
|
+ #{actuallyFirstPayment,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="actuallyTotalPayment != null">
|
|
|
+ #{actuallyTotalPayment,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="actuallyBrokerageAmount != null">
|
|
|
+ #{actuallyBrokerageAmount,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="orderStatus != null">
|
|
|
+ #{orderStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="intentionStatus != null">
|
|
|
+ #{intentionStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="tradingStatus != null">
|
|
|
+ #{tradingStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="technologyTransferProgress != null">
|
|
|
+ #{technologyTransferProgress,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="paymentStatus != null">
|
|
|
+ #{paymentStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="liquidationStatus != null">
|
|
|
+ #{liquidationStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="orderFollower != null">
|
|
|
+ #{orderFollower,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="orderChannel != null">
|
|
|
+ #{orderChannel,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="orderRemarks != null">
|
|
|
+ #{orderRemarks,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="deleteSign != null">
|
|
|
+ #{deleteSign,jdbcType=BIT},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <select id="countByExample" parameterType="com.goafanti.common.model.TOrderExample" resultType="java.lang.Long">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Dec 26 20:46:24 CST 2017.
|
|
|
+ -->
|
|
|
+ select count(*) from t_order
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <update id="updateByExampleSelective" parameterType="map">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Dec 26 20:46:24 CST 2017.
|
|
|
+ -->
|
|
|
+ update t_order
|
|
|
+ <set>
|
|
|
+ <if test="record.orderNo != null">
|
|
|
+ order_no = #{record.orderNo,jdbcType=BIGINT},
|
|
|
+ </if>
|
|
|
+ <if test="record.creater != null">
|
|
|
+ creater = #{record.creater,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.createTime != null">
|
|
|
+ create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="record.updateTime != null">
|
|
|
+ update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="record.buyerId != null">
|
|
|
+ buyer_id = #{record.buyerId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.sellerId != null">
|
|
|
+ seller_id = #{record.sellerId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.commodityId != null">
|
|
|
+ commodity_id = #{record.commodityId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.commodityQuantity != null">
|
|
|
+ commodity_quantity = #{record.commodityQuantity,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.commodityPrice != null">
|
|
|
+ commodity_price = #{record.commodityPrice,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="record.commodityType != null">
|
|
|
+ commodity_type = #{record.commodityType,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.commodityMode != null">
|
|
|
+ commodity_mode = #{record.commodityMode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.firstPayment != null">
|
|
|
+ first_payment = #{record.firstPayment,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="record.orderAmount != null">
|
|
|
+ order_amount = #{record.orderAmount,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="record.brokerageAmount != null">
|
|
|
+ brokerage_amount = #{record.brokerageAmount,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="record.brokerageProportion != null">
|
|
|
+ brokerage_proportion = #{record.brokerageProportion,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="record.actuallyFirstPayment != null">
|
|
|
+ actually_first_payment = #{record.actuallyFirstPayment,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="record.actuallyTotalPayment != null">
|
|
|
+ actually_total_payment = #{record.actuallyTotalPayment,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="record.actuallyBrokerageAmount != null">
|
|
|
+ actually_brokerage_amount = #{record.actuallyBrokerageAmount,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="record.orderStatus != null">
|
|
|
+ order_status = #{record.orderStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.intentionStatus != null">
|
|
|
+ intention_status = #{record.intentionStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.tradingStatus != null">
|
|
|
+ trading_status = #{record.tradingStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.technologyTransferProgress != null">
|
|
|
+ technology_transfer_progress = #{record.technologyTransferProgress,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.paymentStatus != null">
|
|
|
+ payment_status = #{record.paymentStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.liquidationStatus != null">
|
|
|
+ liquidation_status = #{record.liquidationStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.orderFollower != null">
|
|
|
+ order_follower = #{record.orderFollower,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.orderChannel != null">
|
|
|
+ order_channel = #{record.orderChannel,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.orderRemarks != null">
|
|
|
+ order_remarks = #{record.orderRemarks,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.deleteSign != null">
|
|
|
+ delete_sign = #{record.deleteSign,jdbcType=BIT},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByExample" parameterType="map">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Dec 26 20:46:24 CST 2017.
|
|
|
+ -->
|
|
|
+ update t_order
|
|
|
+ set order_no = #{record.orderNo,jdbcType=BIGINT},
|
|
|
+ creater = #{record.creater,jdbcType=VARCHAR},
|
|
|
+ create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
|
+ update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
|
|
+ buyer_id = #{record.buyerId,jdbcType=VARCHAR},
|
|
|
+ seller_id = #{record.sellerId,jdbcType=VARCHAR},
|
|
|
+ commodity_id = #{record.commodityId,jdbcType=VARCHAR},
|
|
|
+ commodity_quantity = #{record.commodityQuantity,jdbcType=INTEGER},
|
|
|
+ commodity_price = #{record.commodityPrice,jdbcType=DECIMAL},
|
|
|
+ commodity_type = #{record.commodityType,jdbcType=INTEGER},
|
|
|
+ commodity_mode = #{record.commodityMode,jdbcType=VARCHAR},
|
|
|
+ first_payment = #{record.firstPayment,jdbcType=DECIMAL},
|
|
|
+ order_amount = #{record.orderAmount,jdbcType=DECIMAL},
|
|
|
+ brokerage_amount = #{record.brokerageAmount,jdbcType=DECIMAL},
|
|
|
+ brokerage_proportion = #{record.brokerageProportion,jdbcType=DECIMAL},
|
|
|
+ actually_first_payment = #{record.actuallyFirstPayment,jdbcType=DECIMAL},
|
|
|
+ actually_total_payment = #{record.actuallyTotalPayment,jdbcType=DECIMAL},
|
|
|
+ actually_brokerage_amount = #{record.actuallyBrokerageAmount,jdbcType=DECIMAL},
|
|
|
+ order_status = #{record.orderStatus,jdbcType=INTEGER},
|
|
|
+ intention_status = #{record.intentionStatus,jdbcType=INTEGER},
|
|
|
+ trading_status = #{record.tradingStatus,jdbcType=INTEGER},
|
|
|
+ technology_transfer_progress = #{record.technologyTransferProgress,jdbcType=INTEGER},
|
|
|
+ payment_status = #{record.paymentStatus,jdbcType=INTEGER},
|
|
|
+ liquidation_status = #{record.liquidationStatus,jdbcType=INTEGER},
|
|
|
+ order_follower = #{record.orderFollower,jdbcType=VARCHAR},
|
|
|
+ order_channel = #{record.orderChannel,jdbcType=INTEGER},
|
|
|
+ order_remarks = #{record.orderRemarks,jdbcType=VARCHAR},
|
|
|
+ delete_sign = #{record.deleteSign,jdbcType=BIT}
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrder">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Dec 26 20:46:24 CST 2017.
|
|
|
+ -->
|
|
|
+ update t_order
|
|
|
+ <set>
|
|
|
+ <if test="creater != null">
|
|
|
+ creater = #{creater,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="buyerId != null">
|
|
|
+ buyer_id = #{buyerId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sellerId != null">
|
|
|
+ seller_id = #{sellerId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="commodityId != null">
|
|
|
+ commodity_id = #{commodityId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="commodityQuantity != null">
|
|
|
+ commodity_quantity = #{commodityQuantity,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="commodityPrice != null">
|
|
|
+ commodity_price = #{commodityPrice,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="commodityType != null">
|
|
|
+ commodity_type = #{commodityType,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="commodityMode != null">
|
|
|
+ commodity_mode = #{commodityMode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="firstPayment != null">
|
|
|
+ first_payment = #{firstPayment,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="orderAmount != null">
|
|
|
+ order_amount = #{orderAmount,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="brokerageAmount != null">
|
|
|
+ brokerage_amount = #{brokerageAmount,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="brokerageProportion != null">
|
|
|
+ brokerage_proportion = #{brokerageProportion,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="actuallyFirstPayment != null">
|
|
|
+ actually_first_payment = #{actuallyFirstPayment,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="actuallyTotalPayment != null">
|
|
|
+ actually_total_payment = #{actuallyTotalPayment,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="actuallyBrokerageAmount != null">
|
|
|
+ actually_brokerage_amount = #{actuallyBrokerageAmount,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="orderStatus != null">
|
|
|
+ order_status = #{orderStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="intentionStatus != null">
|
|
|
+ intention_status = #{intentionStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="tradingStatus != null">
|
|
|
+ trading_status = #{tradingStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="technologyTransferProgress != null">
|
|
|
+ technology_transfer_progress = #{technologyTransferProgress,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="paymentStatus != null">
|
|
|
+ payment_status = #{paymentStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="liquidationStatus != null">
|
|
|
+ liquidation_status = #{liquidationStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="orderFollower != null">
|
|
|
+ order_follower = #{orderFollower,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="orderChannel != null">
|
|
|
+ order_channel = #{orderChannel,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="orderRemarks != null">
|
|
|
+ order_remarks = #{orderRemarks,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="deleteSign != null">
|
|
|
+ delete_sign = #{deleteSign,jdbcType=BIT},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where order_no = #{orderNo,jdbcType=BIGINT}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TOrder">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Dec 26 20:46:24 CST 2017.
|
|
|
+ -->
|
|
|
+ update t_order
|
|
|
+ set creater = #{creater,jdbcType=VARCHAR},
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ buyer_id = #{buyerId,jdbcType=VARCHAR},
|
|
|
+ seller_id = #{sellerId,jdbcType=VARCHAR},
|
|
|
+ commodity_id = #{commodityId,jdbcType=VARCHAR},
|
|
|
+ commodity_quantity = #{commodityQuantity,jdbcType=INTEGER},
|
|
|
+ commodity_price = #{commodityPrice,jdbcType=DECIMAL},
|
|
|
+ commodity_type = #{commodityType,jdbcType=INTEGER},
|
|
|
+ commodity_mode = #{commodityMode,jdbcType=VARCHAR},
|
|
|
+ first_payment = #{firstPayment,jdbcType=DECIMAL},
|
|
|
+ order_amount = #{orderAmount,jdbcType=DECIMAL},
|
|
|
+ brokerage_amount = #{brokerageAmount,jdbcType=DECIMAL},
|
|
|
+ brokerage_proportion = #{brokerageProportion,jdbcType=DECIMAL},
|
|
|
+ actually_first_payment = #{actuallyFirstPayment,jdbcType=DECIMAL},
|
|
|
+ actually_total_payment = #{actuallyTotalPayment,jdbcType=DECIMAL},
|
|
|
+ actually_brokerage_amount = #{actuallyBrokerageAmount,jdbcType=DECIMAL},
|
|
|
+ order_status = #{orderStatus,jdbcType=INTEGER},
|
|
|
+ intention_status = #{intentionStatus,jdbcType=INTEGER},
|
|
|
+ trading_status = #{tradingStatus,jdbcType=INTEGER},
|
|
|
+ technology_transfer_progress = #{technologyTransferProgress,jdbcType=INTEGER},
|
|
|
+ payment_status = #{paymentStatus,jdbcType=INTEGER},
|
|
|
+ liquidation_status = #{liquidationStatus,jdbcType=INTEGER},
|
|
|
+ order_follower = #{orderFollower,jdbcType=VARCHAR},
|
|
|
+ order_channel = #{orderChannel,jdbcType=INTEGER},
|
|
|
+ order_remarks = #{orderRemarks,jdbcType=VARCHAR},
|
|
|
+ delete_sign = #{deleteSign,jdbcType=BIT}
|
|
|
+ where order_no = #{orderNo,jdbcType=BIGINT}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <select id="selectCommodityDetail" resultType="com.goafanti.order.bo.OrderDetailBo">
|
|
|
+ <choose>
|
|
|
+ <when test="commodityType == 0">
|
|
|
+ select id as commodityId,bname as commodityName,ifnull(price,0) as commodityPrice from business_project where id = #{commodityId,jdbcType=VARCHAR}
|
|
|
+ </when>
|
|
|
+ <when test="commodityType == 1">
|
|
|
+ select id as commodityId,name as commodityName,summary as introduction,ifnull(transfer_price,0) as commodityPrice,owner_id as sellerId from achievement where id = #{commodityId,jdbcType=VARCHAR}
|
|
|
+ </when>
|
|
|
+ <when test="commodityType == 2">
|
|
|
+ select id as commodityId,name as commodityName,problem_des as introduction,ifnull(budget_cost,0) as commodityPrice,employer_id as sellerId from demand where id = #{commodityId,jdbcType=VARCHAR}
|
|
|
+ </when>
|
|
|
+ <when test="commodityType == 3">
|
|
|
+ select id as commodityId,nickname as commodityName,introduction,id as sellerId from user where id = #{commodityId,jdbcType=VARCHAR}
|
|
|
+ </when>
|
|
|
+ <when test="commodityType == 4">
|
|
|
+
|
|
|
+ </when>
|
|
|
+ <when test="commodityType == 5">
|
|
|
+
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectOrderListByPage" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from t_order where delete_sign = 0
|
|
|
+ <choose>
|
|
|
+ <when test="intentionStatus == 0"><!-- 意向订单 -->
|
|
|
+ and intention_status = 0 and (buyer_id = #{uid,jdbcType=VARCHAR} or seller_id = #{uid,jdbcType=VARCHAR})
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ and intention_status != 0 and buyer_id = #{uid,jdbcType=VARCHAR}
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectOrderListCount" resultType="java.lang.Integer">
|
|
|
+ select
|
|
|
+ count(0)
|
|
|
+ from t_order where delete_sign = 0
|
|
|
+ <choose>
|
|
|
+ <when test="intentionStatus == 0"><!-- 意向订单 -->
|
|
|
+ and intention_status = 0 and (buyer_id = #{uid,jdbcType=VARCHAR} or seller_id = #{uid,jdbcType=VARCHAR})
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ and intention_status != 0 and buyer_id = #{uid,jdbcType=VARCHAR}
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectFundingHistoryByPage" resultType="com.goafanti.order.bo.FundingListBo">
|
|
|
+ select
|
|
|
+ a.order_no as orderNo,
|
|
|
+ a.create_time as createTime,
|
|
|
+ a.transaction_subject as transactionSubject,
|
|
|
+ a.transaction_amount as transactionAmount,
|
|
|
+ b.commodity_type as commodityType
|
|
|
+ from
|
|
|
+ t_funding_records a left join t_order b on a.order_no = b.order_no
|
|
|
+ where
|
|
|
+ (a.payee_id = #{uid,jdbcType=VARCHAR} or a.payer_id = #{uid,jdbcType=VARCHAR}) and delete_sign = 0
|
|
|
+ <if test="orderNo != null and orderNo != ''">
|
|
|
+ a.order_no = #{orderNo,jdbcType=BIGINT}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectFundingHistoryCount" resultType="java.lang.Integer">
|
|
|
+ select
|
|
|
+ count(0)
|
|
|
+ from
|
|
|
+ t_funding_records a left join t_order b on a.order_no = b.order_no
|
|
|
+ where
|
|
|
+ (a.payee_id = #{uid,jdbcType=VARCHAR} or a.payer_id = #{uid,jdbcType=VARCHAR}) and delete_sign = 0
|
|
|
+ <if test="orderNo != null and orderNo != ''">
|
|
|
+ a.order_no = #{orderNo,jdbcType=BIGINT}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+</mapper>
|