| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762 |
- <?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 Sat Dec 30 15:36:11 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" />
- <result column="commodity_name" jdbcType="VARCHAR" property="commodityName" />
- </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 Sat Dec 30 15:36:11 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 Sat Dec 30 15:36:11 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 Sat Dec 30 15:36:11 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, commodity_name
- </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 Sat Dec 30 15:36:11 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 Sat Dec 30 15:36:11 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 Sat Dec 30 15:36:11 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 Sat Dec 30 15:36:11 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 Sat Dec 30 15:36:11 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,
- commodity_name)
- 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},
- #{commodityName,jdbcType=VARCHAR})
- </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 Sat Dec 30 15:36:11 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>
- <if test="commodityName != null">
- commodity_name,
- </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>
- <if test="commodityName != null">
- #{commodityName,jdbcType=VARCHAR},
- </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 Sat Dec 30 15:36:11 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 Sat Dec 30 15:36:11 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>
- <if test="record.commodityName != null">
- commodity_name = #{record.commodityName,jdbcType=VARCHAR},
- </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 Sat Dec 30 15:36:11 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},
- commodity_name = #{record.commodityName,jdbcType=VARCHAR}
- <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 Sat Dec 30 15:36:11 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>
- <if test="commodityName != null">
- commodity_name = #{commodityName,jdbcType=VARCHAR},
- </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 Sat Dec 30 15:36:11 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},
- commodity_name = #{commodityName,jdbcType=VARCHAR}
- 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,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 a.id as commodityId,a.nickname as commodityName,a.id as sellerId,ifnull(b.consultation_price,0) as commodityPrice,ifnull(b.professional_title,'暂无职称') as introduction from user a
- left join user_identity b on a.id=b.uid where a.id = #{commodityId,jdbcType=VARCHAR}
- </when>
- <when test="commodityType == 4">
-
- </when>
- <when test="commodityType == 5">
-
- </when>
- <when test="commodityType == 6">
- select a.id as commodityId,a.nickname as commodityName,a.id as sellerId,ifnull(b.consultation_price,0) as commodityPrice,ifnull(b.professional_title,'暂无职称') as introduction from user a
- left join user_identity b on a.id=b.uid where a.id = #{commodityId,jdbcType=VARCHAR}
- </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} or seller_id = #{uid,jdbcType=VARCHAR})
- </otherwise>
- </choose>
- order by create_time desc
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </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,
- date_format(a.create_time,'%Y-%m-%d %H:%i:%S') as createTime,
- a.transaction_subject as transactionSubject,
- a.transaction_amount as transactionAmount,
- b.commodity_id as commodityId,
- b.commodity_type as commodityType,
- a.confirm_sign as confirmSign
- 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 b.delete_sign = 0
- <if test="orderNo != null and orderNo != ''">
- and a.order_no = #{orderNo,jdbcType=BIGINT}
- </if>
- order by a.create_time desc
- <if test="page_sql!=null">
- ${page_sql}
- </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 b.delete_sign = 0
- <if test="orderNo != null and orderNo != ''">
- a.order_no = #{orderNo,jdbcType=BIGINT}
- </if>
- </select>
- </mapper>
|