|
|
@@ -0,0 +1,603 @@
|
|
|
+<?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.TOrderBillNewMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.goafanti.common.model.TOrderBillNew">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbggenerated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Nov 20 11:14:40 CST 2018.
|
|
|
+ -->
|
|
|
+ <id column="bill_no" jdbcType="VARCHAR" property="billNo" />
|
|
|
+ <result column="order_no" jdbcType="VARCHAR" 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="payee_id" jdbcType="VARCHAR" property="payeeId" />
|
|
|
+ <result column="payer_id" jdbcType="VARCHAR" property="payerId" />
|
|
|
+ <result column="transaction_amount" jdbcType="DECIMAL" property="transactionAmount" />
|
|
|
+ <result column="transaction_subject" jdbcType="INTEGER" property="transactionSubject" />
|
|
|
+ <result column="transaction_channel" jdbcType="INTEGER" property="transactionChannel" />
|
|
|
+ <result column="remarks" jdbcType="VARCHAR" property="remarks" />
|
|
|
+ <result column="confirm_sign" jdbcType="INTEGER" property="confirmSign" />
|
|
|
+ <result column="delete_sign" jdbcType="TINYINT" property="deleteSign" />
|
|
|
+ <result column="financial_pay_no" jdbcType="VARCHAR" property="financialPayNo" />
|
|
|
+ <result column="financial_pay_time" jdbcType="TIMESTAMP" property="financialPayTime" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Example_Where_Clause">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbggenerated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Nov 20 11:14:40 CST 2018.
|
|
|
+ -->
|
|
|
+ <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 - @mbggenerated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Nov 20 11:14:40 CST 2018.
|
|
|
+ -->
|
|
|
+ <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 - @mbggenerated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Nov 20 11:14:40 CST 2018.
|
|
|
+ -->
|
|
|
+ bill_no, order_no, creater, create_time, update_time, payee_id, payer_id, transaction_amount,
|
|
|
+ transaction_subject, transaction_channel, remarks, confirm_sign, delete_sign, financial_pay_no,
|
|
|
+ financial_pay_time
|
|
|
+ </sql>
|
|
|
+ <select id="selectByExample" parameterType="com.goafanti.common.model.TOrderBillNewExample" resultMap="BaseResultMap">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbggenerated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Nov 20 11:14:40 CST 2018.
|
|
|
+ -->
|
|
|
+ select
|
|
|
+ <if test="distinct">
|
|
|
+ distinct
|
|
|
+ </if>
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from t_order_bill_new
|
|
|
+ <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.String" resultMap="BaseResultMap">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbggenerated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Nov 20 11:14:40 CST 2018.
|
|
|
+ -->
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from t_order_bill_new
|
|
|
+ where bill_no = #{billNo,jdbcType=VARCHAR}
|
|
|
+ </select>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbggenerated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Nov 20 11:14:40 CST 2018.
|
|
|
+ -->
|
|
|
+ delete from t_order_bill_new
|
|
|
+ where bill_no = #{billNo,jdbcType=VARCHAR}
|
|
|
+ </delete>
|
|
|
+ <delete id="deleteByExample" parameterType="com.goafanti.common.model.TOrderBillNewExample">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbggenerated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Nov 20 11:14:40 CST 2018.
|
|
|
+ -->
|
|
|
+ delete from t_order_bill_new
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.goafanti.common.model.TOrderBillNew">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbggenerated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Nov 20 11:14:40 CST 2018.
|
|
|
+ -->
|
|
|
+ insert into t_order_bill_new (bill_no, order_no, creater,
|
|
|
+ create_time, update_time, payee_id,
|
|
|
+ payer_id, transaction_amount, transaction_subject,
|
|
|
+ transaction_channel, remarks, confirm_sign,
|
|
|
+ delete_sign, financial_pay_no, financial_pay_time
|
|
|
+ )
|
|
|
+ values (#{billNo,jdbcType=VARCHAR}, #{orderNo,jdbcType=VARCHAR}, #{creater,jdbcType=VARCHAR},
|
|
|
+ #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{payeeId,jdbcType=VARCHAR},
|
|
|
+ #{payerId,jdbcType=VARCHAR}, #{transactionAmount,jdbcType=DECIMAL}, #{transactionSubject,jdbcType=INTEGER},
|
|
|
+ #{transactionChannel,jdbcType=INTEGER}, #{remarks,jdbcType=VARCHAR}, #{confirmSign,jdbcType=INTEGER},
|
|
|
+ #{deleteSign,jdbcType=TINYINT}, #{financialPayNo,jdbcType=VARCHAR}, #{financialPayTime,jdbcType=TIMESTAMP}
|
|
|
+ )
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.goafanti.common.model.TOrderBillNew">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbggenerated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Nov 20 11:14:40 CST 2018.
|
|
|
+ -->
|
|
|
+ insert into t_order_bill_new
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="billNo != null">
|
|
|
+ bill_no,
|
|
|
+ </if>
|
|
|
+ <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="payeeId != null">
|
|
|
+ payee_id,
|
|
|
+ </if>
|
|
|
+ <if test="payerId != null">
|
|
|
+ payer_id,
|
|
|
+ </if>
|
|
|
+ <if test="transactionAmount != null">
|
|
|
+ transaction_amount,
|
|
|
+ </if>
|
|
|
+ <if test="transactionSubject != null">
|
|
|
+ transaction_subject,
|
|
|
+ </if>
|
|
|
+ <if test="transactionChannel != null">
|
|
|
+ transaction_channel,
|
|
|
+ </if>
|
|
|
+ <if test="remarks != null">
|
|
|
+ remarks,
|
|
|
+ </if>
|
|
|
+ <if test="confirmSign != null">
|
|
|
+ confirm_sign,
|
|
|
+ </if>
|
|
|
+ <if test="deleteSign != null">
|
|
|
+ delete_sign,
|
|
|
+ </if>
|
|
|
+ <if test="financialPayNo != null">
|
|
|
+ financial_pay_no,
|
|
|
+ </if>
|
|
|
+ <if test="financialPayTime != null">
|
|
|
+ financial_pay_time,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="billNo != null">
|
|
|
+ #{billNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="orderNo != null">
|
|
|
+ #{orderNo,jdbcType=VARCHAR},
|
|
|
+ </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="payeeId != null">
|
|
|
+ #{payeeId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="payerId != null">
|
|
|
+ #{payerId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="transactionAmount != null">
|
|
|
+ #{transactionAmount,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="transactionSubject != null">
|
|
|
+ #{transactionSubject,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="transactionChannel != null">
|
|
|
+ #{transactionChannel,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="remarks != null">
|
|
|
+ #{remarks,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="confirmSign != null">
|
|
|
+ #{confirmSign,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="deleteSign != null">
|
|
|
+ #{deleteSign,jdbcType=TINYINT},
|
|
|
+ </if>
|
|
|
+ <if test="financialPayNo != null">
|
|
|
+ #{financialPayNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="financialPayTime != null">
|
|
|
+ #{financialPayTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <select id="countByExample" parameterType="com.goafanti.common.model.TOrderBillNewExample" resultType="java.lang.Integer">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbggenerated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Nov 20 11:14:40 CST 2018.
|
|
|
+ -->
|
|
|
+ select count(*) from t_order_bill_new
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <update id="updateByExampleSelective" parameterType="map">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbggenerated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Nov 20 11:14:40 CST 2018.
|
|
|
+ -->
|
|
|
+ update t_order_bill_new
|
|
|
+ <set>
|
|
|
+ <if test="record.billNo != null">
|
|
|
+ bill_no = #{record.billNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.orderNo != null">
|
|
|
+ order_no = #{record.orderNo,jdbcType=VARCHAR},
|
|
|
+ </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.payeeId != null">
|
|
|
+ payee_id = #{record.payeeId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.payerId != null">
|
|
|
+ payer_id = #{record.payerId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.transactionAmount != null">
|
|
|
+ transaction_amount = #{record.transactionAmount,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="record.transactionSubject != null">
|
|
|
+ transaction_subject = #{record.transactionSubject,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.transactionChannel != null">
|
|
|
+ transaction_channel = #{record.transactionChannel,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.remarks != null">
|
|
|
+ remarks = #{record.remarks,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.confirmSign != null">
|
|
|
+ confirm_sign = #{record.confirmSign,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.deleteSign != null">
|
|
|
+ delete_sign = #{record.deleteSign,jdbcType=TINYINT},
|
|
|
+ </if>
|
|
|
+ <if test="record.financialPayNo != null">
|
|
|
+ financial_pay_no = #{record.financialPayNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.financialPayTime != null">
|
|
|
+ financial_pay_time = #{record.financialPayTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByExample" parameterType="map">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbggenerated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Nov 20 11:14:40 CST 2018.
|
|
|
+ -->
|
|
|
+ update t_order_bill_new
|
|
|
+ set bill_no = #{record.billNo,jdbcType=VARCHAR},
|
|
|
+ order_no = #{record.orderNo,jdbcType=VARCHAR},
|
|
|
+ creater = #{record.creater,jdbcType=VARCHAR},
|
|
|
+ create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
|
+ update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
|
|
+ payee_id = #{record.payeeId,jdbcType=VARCHAR},
|
|
|
+ payer_id = #{record.payerId,jdbcType=VARCHAR},
|
|
|
+ transaction_amount = #{record.transactionAmount,jdbcType=DECIMAL},
|
|
|
+ transaction_subject = #{record.transactionSubject,jdbcType=INTEGER},
|
|
|
+ transaction_channel = #{record.transactionChannel,jdbcType=INTEGER},
|
|
|
+ remarks = #{record.remarks,jdbcType=VARCHAR},
|
|
|
+ confirm_sign = #{record.confirmSign,jdbcType=INTEGER},
|
|
|
+ delete_sign = #{record.deleteSign,jdbcType=TINYINT},
|
|
|
+ financial_pay_no = #{record.financialPayNo,jdbcType=VARCHAR},
|
|
|
+ financial_pay_time = #{record.financialPayTime,jdbcType=TIMESTAMP}
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderBillNew">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbggenerated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Nov 20 11:14:40 CST 2018.
|
|
|
+ -->
|
|
|
+ update t_order_bill_new
|
|
|
+ <set>
|
|
|
+ <if test="orderNo != null">
|
|
|
+ order_no = #{orderNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <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="payeeId != null">
|
|
|
+ payee_id = #{payeeId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="payerId != null">
|
|
|
+ payer_id = #{payerId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="transactionAmount != null">
|
|
|
+ transaction_amount = #{transactionAmount,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="transactionSubject != null">
|
|
|
+ transaction_subject = #{transactionSubject,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="transactionChannel != null">
|
|
|
+ transaction_channel = #{transactionChannel,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="remarks != null">
|
|
|
+ remarks = #{remarks,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="confirmSign != null">
|
|
|
+ confirm_sign = #{confirmSign,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="deleteSign != null">
|
|
|
+ delete_sign = #{deleteSign,jdbcType=TINYINT},
|
|
|
+ </if>
|
|
|
+ <if test="financialPayNo != null">
|
|
|
+ financial_pay_no = #{financialPayNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="financialPayTime != null">
|
|
|
+ financial_pay_time = #{financialPayTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where bill_no = #{billNo,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TOrderBillNew">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbggenerated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Tue Nov 20 11:14:40 CST 2018.
|
|
|
+ -->
|
|
|
+ update t_order_bill_new
|
|
|
+ set order_no = #{orderNo,jdbcType=VARCHAR},
|
|
|
+ creater = #{creater,jdbcType=VARCHAR},
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ payee_id = #{payeeId,jdbcType=VARCHAR},
|
|
|
+ payer_id = #{payerId,jdbcType=VARCHAR},
|
|
|
+ transaction_amount = #{transactionAmount,jdbcType=DECIMAL},
|
|
|
+ transaction_subject = #{transactionSubject,jdbcType=INTEGER},
|
|
|
+ transaction_channel = #{transactionChannel,jdbcType=INTEGER},
|
|
|
+ remarks = #{remarks,jdbcType=VARCHAR},
|
|
|
+ confirm_sign = #{confirmSign,jdbcType=INTEGER},
|
|
|
+ delete_sign = #{deleteSign,jdbcType=TINYINT},
|
|
|
+ financial_pay_no = #{financialPayNo,jdbcType=VARCHAR},
|
|
|
+ financial_pay_time = #{financialPayTime,jdbcType=TIMESTAMP}
|
|
|
+ where bill_no = #{billNo,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+ <!-- 根据订单编号获得已交款 -->
|
|
|
+ <select id="getAmountByOid" parameterType="java.lang.String" resultType="java.math.BigDecimal">
|
|
|
+ select ifnull(sum(transaction_amount),0) amout from t_order_bill_new
|
|
|
+ where delete_sign = 0 and order_no = #{_parameter,jdbcType=VARCHAR}
|
|
|
+ </select>
|
|
|
+ <!-- 根据流水编号获得流水详情 -->
|
|
|
+ <select id="getOneRefundFlow" parameterType="java.lang.String" resultType="com.goafanti.common.model.TOrderBillNew">
|
|
|
+ select
|
|
|
+ b.bill_no as billNo, b.order_no as orderNo, b.creater, b.create_time as createTime, b.update_time as updateTime,
|
|
|
+ b.payee_id as payeeId, b.payer_id as payerId, b.transaction_amount as transactionAmount,
|
|
|
+ b.transaction_subject as transactionSubject, b.transaction_channel as transactionChannel,
|
|
|
+ b.remarks, b.confirm_sign confirmSign, b.delete_sign deleteSign, b.financial_pay_no as financialPayNo,
|
|
|
+ b.financial_pay_time as financialPayTimes, u.nickname as payerName, a.name as payeeName
|
|
|
+ from t_order_bill_new b
|
|
|
+ left join `user` u on b.payer_id = u.id
|
|
|
+ left join admin a on b.payee_id = a.id
|
|
|
+ where b.delete_sign = 0 and bill_no = #{_parameter,jdbcType=VARCHAR}
|
|
|
+ </select>
|
|
|
+ <!-- 根据订单编号查看该订单相关的所有流水 -->
|
|
|
+ <select id="getOneOrderAllRefundFlow" parameterType="java.lang.String" resultType="com.goafanti.common.model.TOrderBillNew">
|
|
|
+ select
|
|
|
+ b.bill_no as billNo, b.order_no as orderNo, b.creater, b.create_time as createTime, b.update_time as updateTime,
|
|
|
+ b.payee_id as payeeId, b.payer_id as payerId, b.transaction_amount as transactionAmount,
|
|
|
+ b.transaction_subject as transactionSubject, b.transaction_channel as transactionChannel,
|
|
|
+ b.remarks, b.confirm_sign confirmSign, b.delete_sign deleteSign, b.financial_pay_no as financialPayNo,
|
|
|
+ b.financial_pay_time as financialPayTimes, u.nickname as payerName, a.name as payeeName
|
|
|
+ from t_order_bill_new b
|
|
|
+ left join `user` u on b.payer_id = u.id
|
|
|
+ left join admin a on b.payee_id = a.id
|
|
|
+ where b.delete_sign = 0 and order_no = #{_parameter,jdbcType=VARCHAR}
|
|
|
+ </select>
|
|
|
+ <!-- 查看自己创建的流水数据 -->
|
|
|
+ <select id="myBillList" parameterType="Map" resultType="com.goafanti.common.model.TOrderBillNew">
|
|
|
+ select
|
|
|
+ b.bill_no as billNo, b.order_no as orderNo, b.transaction_amount as transactionAmount,
|
|
|
+ b.payer_id as payerId, b.payee_id as payeeId, u.nickname as payerName, a.name as payeeName,
|
|
|
+ b.transaction_subject as transactionSubject, b.transaction_channel as transactionChannel,
|
|
|
+ b.financial_pay_time as financialPayTimes,b.financial_pay_no as financialPayNo,
|
|
|
+ b.creater, ad.name as createrName, o.salesman_id as saleId, oa.name as saleName
|
|
|
+ from t_order_bill_new b
|
|
|
+ left join `user` u on b.payer_id = u.id
|
|
|
+ left join admin a on b.payee_id = a.id
|
|
|
+ left join admin ad on b.creater = ad.id
|
|
|
+ left join t_order_new o on o.order_no = b.order_no
|
|
|
+ left join admin oa on oa.id = o.salesman_id
|
|
|
+ where delete_sign = 0
|
|
|
+ <if test='b.create != null and b.create != ""'>
|
|
|
+ and creater = #{creater,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test='b.payerName != null and b.payerName != ""'>
|
|
|
+ <bind name="nn" value="'%' + b.payerName + '%'"/>
|
|
|
+ and u.nickname like #{nn,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test='b.payeeName != null and b.payeeName != ""'>
|
|
|
+ <bind name="n" value="'%' + b.payeeName + '%'"/>
|
|
|
+ and a.name like #{n,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test='b.departmentId != null and b.departmentId != "" '>
|
|
|
+ and oa.department_id = #{b.departmentId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test='b.startTime != null and b.startTime != "" and b.endTime != null and b.endTime != ""'>
|
|
|
+ <bind name="a" value="b.startTime + ' 00:00:00'"/>
|
|
|
+ <bind name="e" value="b.endTime + ' 23:59:59'"/>
|
|
|
+ and b.create_time between #{a,jdbcType=VARCHAR} and #{e,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ order by b.create_time desc
|
|
|
+ <if test="page_sql!=null">
|
|
|
+ ${page_sql}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="myBillCount" parameterType="Map" resultType="java.lang.Integer">
|
|
|
+ select count(*)
|
|
|
+ from t_order_bill_new b
|
|
|
+ left join `user` u on b.payer_id = u.id
|
|
|
+ left join admin a on b.payee_id = a.id
|
|
|
+ left join t_order_new o on o.order_no = b.order_no
|
|
|
+ left join admin oa on oa.id = o.salesman_id
|
|
|
+ where delete_sign = 0
|
|
|
+ <if test='b.create != null and b.create != ""'>
|
|
|
+ and creater = #{creater,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test='b.payerName != null and b.payerName != ""'>
|
|
|
+ <bind name="nn" value="'%' + b.payerName + '%'"/>
|
|
|
+ and u.nickname like #{nn,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test='b.payeeName != null and b.payeeName != ""'>
|
|
|
+ <bind name="n" value="'%' + b.payeeName + '%'"/>
|
|
|
+ and a.name like #{n,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test='b.departmentId != null and b.departmentId != "" '>
|
|
|
+ and oa.department_id = #{b.departmentId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test='b.startTime != null and b.startTime != "" and b.endTime != null and b.endTime != ""'>
|
|
|
+ <bind name="a" value="b.startTime + ' 00:00:00'"/>
|
|
|
+ <bind name="e" value="b.endTime + ' 23:59:59'"/>
|
|
|
+ and b.create_time between #{a,jdbcType=VARCHAR} and #{e,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <!-- 带条件的流水部门 -->
|
|
|
+ <select id="getDeptBySome" parameterType="com.goafanti.common.model.TOrderBillNew" resultType="com.goafanti.common.model.TOrderBillNew">
|
|
|
+ select distinct
|
|
|
+ d.id as departmentId, d.name as departmentName
|
|
|
+ from t_order_bill_new b
|
|
|
+ left join `user` u on b.payer_id = u.id
|
|
|
+ left join admin a on b.payee_id = a.id
|
|
|
+ left join t_order_new o on o.order_no = b.order_no
|
|
|
+ left join admin oa on oa.id = o.salesman_id
|
|
|
+ left join department d on oa.department_id = d.id
|
|
|
+ where
|
|
|
+ b.delete_sign = 0
|
|
|
+ <if test='payerName != null and payerName != ""'>
|
|
|
+ <bind name="nn" value="'%' + payerName + '%'"/>
|
|
|
+ and u.nickname like #{nn,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test='payeeName != null and payeeName != ""'>
|
|
|
+ <bind name="n" value="'%' + payeeName + '%'"/>
|
|
|
+ and a.name like #{n,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test='startTime != null and startTime != "" and endTime != null and endTime != ""'>
|
|
|
+ <bind name="a" value="startTime + ' 00:00:00'"/>
|
|
|
+ <bind name="e" value="endTime + ' 23:59:59'"/>
|
|
|
+ and b.create_time between #{a,jdbcType=VARCHAR} and #{e,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <!-- 获得流水记录 -->
|
|
|
+ <select id="getBillData" parameterType="com.goafanti.common.model.TOrderBillNew" resultType="com.goafanti.common.model.TOrderBillNew">
|
|
|
+ select
|
|
|
+ b.bill_no as billNo, b.order_no as orderNo, b.transaction_amount as transactionAmount,
|
|
|
+ u.nickname as payerName, a.name as payeeName,
|
|
|
+ b.transaction_subject as transactionSubject, b.transaction_channel as transactionChannel,
|
|
|
+ b.financial_pay_time as financialPayTimes,b.financial_pay_no as financialPayNo,
|
|
|
+ b.creater, ad.name as createrName, oa.name as saleName, b.create_time as createTime
|
|
|
+ from t_order_bill_new b
|
|
|
+ left join `user` u on b.payer_id = u.id
|
|
|
+ left join admin a on b.payee_id = a.id
|
|
|
+ left join admin ad on b.creater = ad.id
|
|
|
+ left join t_order_new o on o.order_no = b.order_no
|
|
|
+ left join admin oa on oa.id = o.salesman_id
|
|
|
+ where b.delete_sign = 0
|
|
|
+ <if test='payerName != null and payerName != ""'>
|
|
|
+ <bind name="nn" value="'%' + payerName + '%'"/>
|
|
|
+ and u.nickname like #{nn,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test='payeeName != null and payeeName != ""'>
|
|
|
+ <bind name="n" value="'%' + payeeName + '%'"/>
|
|
|
+ and a.name like #{n,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test='departmentId != null and departmentId != "" '>
|
|
|
+ and oa.department_id = #{departmentId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test='startTime != null and startTime != "" and endTime != null and endTime != ""'>
|
|
|
+ <bind name="a" value="startTime + ' 00:00:00'"/>
|
|
|
+ <bind name="e" value="endTime + ' 23:59:59'"/>
|
|
|
+ and b.create_time between #{a,jdbcType=VARCHAR} and #{e,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ order by b.order_no, b.creater , b.financial_pay_time
|
|
|
+ </select>
|
|
|
+</mapper>
|