| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609 |
- <?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.TOrderPaymentMapper">
- <resultMap id="BaseResultMap" type="com.goafanti.common.model.TOrderPayment">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Tue Jul 07 11:46:04 CST 2020.
- -->
- <id column="id" jdbcType="INTEGER" property="id" />
- <result column="tid" jdbcType="INTEGER" property="tid" />
- <result column="node_id" jdbcType="INTEGER" property="nodeId" />
- <result column="payment_type" jdbcType="INTEGER" property="paymentType" />
- <result column="company_name" jdbcType="VARCHAR" property="companyName" />
- <result column="quantity" jdbcType="INTEGER" property="quantity" />
- <result column="payment_status" jdbcType="INTEGER" property="paymentStatus" />
- <result column="status" jdbcType="INTEGER" property="status" />
- <result column="payment_amount" jdbcType="DECIMAL" property="paymentAmount" />
- <result column="remarks" jdbcType="VARCHAR" property="remarks" />
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
- <result column="tpc_id" jdbcType="INTEGER" property="tpcId" />
- <result column="application_amount" jdbcType="DECIMAL" property="applicationAmount" />
- <result column="choose_type" jdbcType="INTEGER" property="chooseType" />
- <result column="aid" jdbcType="VARCHAR" property="aid" />
- <result column="aname" jdbcType="VARCHAR" property="aname" />
- </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 Jul 07 11:46:04 CST 2020.
- -->
- <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 Jul 07 11:46:04 CST 2020.
- -->
- <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 Jul 07 11:46:04 CST 2020.
- -->
- id, tid, node_id, payment_type, company_name, quantity, payment_status, status, payment_amount,
- remarks, create_time, tpc_id, application_amount, choose_type, aid, aname
- </sql>
- <select id="selectByExample" parameterType="com.goafanti.common.model.TOrderPaymentExample" resultMap="BaseResultMap">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Tue Jul 07 11:46:04 CST 2020.
- -->
- select
- <if test="distinct">
- distinct
- </if>
- <include refid="Base_Column_List" />
- from t_order_payment
- <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.Integer" resultMap="BaseResultMap">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Tue Jul 07 11:46:04 CST 2020.
- -->
- select
- <include refid="Base_Column_List" />
- from t_order_payment
- where id = #{id,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Tue Jul 07 11:46:04 CST 2020.
- -->
- delete from t_order_payment
- where id = #{id,jdbcType=INTEGER}
- </delete>
- <delete id="deleteByExample" parameterType="com.goafanti.common.model.TOrderPaymentExample">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Tue Jul 07 11:46:04 CST 2020.
- -->
- delete from t_order_payment
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </delete>
- <insert id="insert" parameterType="com.goafanti.common.model.TOrderPayment">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Tue Jul 07 11:46:04 CST 2020.
- -->
- insert into t_order_payment (id, tid, node_id,
- payment_type, company_name, quantity,
- payment_status, status, payment_amount,
- remarks, create_time, tpc_id,
- application_amount, choose_type, aid,
- aname)
- values (#{id,jdbcType=INTEGER}, #{tid,jdbcType=INTEGER}, #{nodeId,jdbcType=INTEGER},
- #{paymentType,jdbcType=INTEGER}, #{companyName,jdbcType=VARCHAR}, #{quantity,jdbcType=INTEGER},
- #{paymentStatus,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{paymentAmount,jdbcType=DECIMAL},
- #{remarks,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{tpcId,jdbcType=INTEGER},
- #{applicationAmount,jdbcType=DECIMAL}, #{chooseType,jdbcType=INTEGER}, #{aid,jdbcType=VARCHAR},
- #{aname,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective" parameterType="com.goafanti.common.model.TOrderPayment">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Tue Jul 07 11:46:04 CST 2020.
- -->
- insert into t_order_payment
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- id,
- </if>
- <if test="tid != null">
- tid,
- </if>
- <if test="nodeId != null">
- node_id,
- </if>
- <if test="paymentType != null">
- payment_type,
- </if>
- <if test="companyName != null">
- company_name,
- </if>
- <if test="quantity != null">
- quantity,
- </if>
- <if test="paymentStatus != null">
- payment_status,
- </if>
- <if test="status != null">
- status,
- </if>
- <if test="paymentAmount != null">
- payment_amount,
- </if>
- <if test="remarks != null">
- remarks,
- </if>
- <if test="createTime != null">
- create_time,
- </if>
- <if test="tpcId != null">
- tpc_id,
- </if>
- <if test="applicationAmount != null">
- application_amount,
- </if>
- <if test="chooseType != null">
- choose_type,
- </if>
- <if test="aid != null">
- aid,
- </if>
- <if test="aname != null">
- aname,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=INTEGER},
- </if>
- <if test="tid != null">
- #{tid,jdbcType=INTEGER},
- </if>
- <if test="nodeId != null">
- #{nodeId,jdbcType=INTEGER},
- </if>
- <if test="paymentType != null">
- #{paymentType,jdbcType=INTEGER},
- </if>
- <if test="companyName != null">
- #{companyName,jdbcType=VARCHAR},
- </if>
- <if test="quantity != null">
- #{quantity,jdbcType=INTEGER},
- </if>
- <if test="paymentStatus != null">
- #{paymentStatus,jdbcType=INTEGER},
- </if>
- <if test="status != null">
- #{status,jdbcType=INTEGER},
- </if>
- <if test="paymentAmount != null">
- #{paymentAmount,jdbcType=DECIMAL},
- </if>
- <if test="remarks != null">
- #{remarks,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null">
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="tpcId != null">
- #{tpcId,jdbcType=INTEGER},
- </if>
- <if test="applicationAmount != null">
- #{applicationAmount,jdbcType=DECIMAL},
- </if>
- <if test="chooseType != null">
- #{chooseType,jdbcType=INTEGER},
- </if>
- <if test="aid != null">
- #{aid,jdbcType=VARCHAR},
- </if>
- <if test="aname != null">
- #{aname,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <select id="countByExample" parameterType="com.goafanti.common.model.TOrderPaymentExample" resultType="java.lang.Long">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Tue Jul 07 11:46:04 CST 2020.
- -->
- select count(*) from t_order_payment
- <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 Jul 07 11:46:04 CST 2020.
- -->
- update t_order_payment
- <set>
- <if test="record.id != null">
- id = #{record.id,jdbcType=INTEGER},
- </if>
- <if test="record.tid != null">
- tid = #{record.tid,jdbcType=INTEGER},
- </if>
- <if test="record.nodeId != null">
- node_id = #{record.nodeId,jdbcType=INTEGER},
- </if>
- <if test="record.paymentType != null">
- payment_type = #{record.paymentType,jdbcType=INTEGER},
- </if>
- <if test="record.companyName != null">
- company_name = #{record.companyName,jdbcType=VARCHAR},
- </if>
- <if test="record.quantity != null">
- quantity = #{record.quantity,jdbcType=INTEGER},
- </if>
- <if test="record.paymentStatus != null">
- payment_status = #{record.paymentStatus,jdbcType=INTEGER},
- </if>
- <if test="record.status != null">
- status = #{record.status,jdbcType=INTEGER},
- </if>
- <if test="record.paymentAmount != null">
- payment_amount = #{record.paymentAmount,jdbcType=DECIMAL},
- </if>
- <if test="record.remarks != null">
- remarks = #{record.remarks,jdbcType=VARCHAR},
- </if>
- <if test="record.createTime != null">
- create_time = #{record.createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="record.tpcId != null">
- tpc_id = #{record.tpcId,jdbcType=INTEGER},
- </if>
- <if test="record.applicationAmount != null">
- application_amount = #{record.applicationAmount,jdbcType=DECIMAL},
- </if>
- <if test="record.chooseType != null">
- choose_type = #{record.chooseType,jdbcType=INTEGER},
- </if>
- <if test="record.aid != null">
- aid = #{record.aid,jdbcType=VARCHAR},
- </if>
- <if test="record.aname != null">
- aname = #{record.aname,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 Tue Jul 07 11:46:04 CST 2020.
- -->
- update t_order_payment
- set id = #{record.id,jdbcType=INTEGER},
- tid = #{record.tid,jdbcType=INTEGER},
- node_id = #{record.nodeId,jdbcType=INTEGER},
- payment_type = #{record.paymentType,jdbcType=INTEGER},
- company_name = #{record.companyName,jdbcType=VARCHAR},
- quantity = #{record.quantity,jdbcType=INTEGER},
- payment_status = #{record.paymentStatus,jdbcType=INTEGER},
- status = #{record.status,jdbcType=INTEGER},
- payment_amount = #{record.paymentAmount,jdbcType=DECIMAL},
- remarks = #{record.remarks,jdbcType=VARCHAR},
- create_time = #{record.createTime,jdbcType=TIMESTAMP},
- tpc_id = #{record.tpcId,jdbcType=INTEGER},
- application_amount = #{record.applicationAmount,jdbcType=DECIMAL},
- choose_type = #{record.chooseType,jdbcType=INTEGER},
- aid = #{record.aid,jdbcType=VARCHAR},
- aname = #{record.aname,jdbcType=VARCHAR}
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderPayment">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Tue Jul 07 11:46:04 CST 2020.
- -->
- update t_order_payment
- <set>
- <if test="tid != null">
- tid = #{tid,jdbcType=INTEGER},
- </if>
- <if test="nodeId != null">
- node_id = #{nodeId,jdbcType=INTEGER},
- </if>
- <if test="paymentType != null">
- payment_type = #{paymentType,jdbcType=INTEGER},
- </if>
- <if test="companyName != null">
- company_name = #{companyName,jdbcType=VARCHAR},
- </if>
- <if test="quantity != null">
- quantity = #{quantity,jdbcType=INTEGER},
- </if>
- <if test="paymentStatus != null">
- payment_status = #{paymentStatus,jdbcType=INTEGER},
- </if>
- <if test="status != null">
- status = #{status,jdbcType=INTEGER},
- </if>
- <if test="paymentAmount != null">
- payment_amount = #{paymentAmount,jdbcType=DECIMAL},
- </if>
- <if test="remarks != null">
- remarks = #{remarks,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null">
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="tpcId != null">
- tpc_id = #{tpcId,jdbcType=INTEGER},
- </if>
- <if test="applicationAmount != null">
- application_amount = #{applicationAmount,jdbcType=DECIMAL},
- </if>
- <if test="chooseType != null">
- choose_type = #{chooseType,jdbcType=INTEGER},
- </if>
- <if test="aid != null">
- aid = #{aid,jdbcType=VARCHAR},
- </if>
- <if test="aname != null">
- aname = #{aname,jdbcType=VARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TOrderPayment">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Tue Jul 07 11:46:04 CST 2020.
- -->
- update t_order_payment
- set tid = #{tid,jdbcType=INTEGER},
- node_id = #{nodeId,jdbcType=INTEGER},
- payment_type = #{paymentType,jdbcType=INTEGER},
- company_name = #{companyName,jdbcType=VARCHAR},
- quantity = #{quantity,jdbcType=INTEGER},
- payment_status = #{paymentStatus,jdbcType=INTEGER},
- status = #{status,jdbcType=INTEGER},
- payment_amount = #{paymentAmount,jdbcType=DECIMAL},
- remarks = #{remarks,jdbcType=VARCHAR},
- create_time = #{createTime,jdbcType=TIMESTAMP},
- tpc_id = #{tpcId,jdbcType=INTEGER},
- application_amount = #{applicationAmount,jdbcType=DECIMAL},
- choose_type = #{chooseType,jdbcType=INTEGER},
- aid = #{aid,jdbcType=VARCHAR},
- aname = #{aname,jdbcType=VARCHAR}
- where id = #{id,jdbcType=INTEGER}
- </update>
-
-
- <insert id="insertSelectiveGetId" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderPayment" useGeneratedKeys="true">
- insert into t_order_payment
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- id,
- </if>
- <if test="tid != null">
- tid,
- </if>
- <if test="nodeId != null">
- node_id,
- </if>
- <if test="paymentType != null">
- payment_type,
- </if>
- <if test="companyName != null">
- company_name,
- </if>
- <if test="quantity != null">
- quantity,
- </if>
- <if test="paymentStatus != null">
- payment_status,
- </if>
- <if test="status != null">
- status,
- </if>
- <if test="paymentAmount != null">
- payment_amount,
- </if>
- <if test="remarks != null">
- remarks,
- </if>
- <if test="createTime != null">
- create_time,
- </if>
- <if test="tpcId != null">
- tpc_id,
- </if>
- <if test="applicationAmount != null">
- application_amount,
- </if>
- <if test="chooseType != null">
- choose_type,
- </if>
- <if test="aid != null">
- aid,
- </if>
- <if test="aname != null">
- aname,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=INTEGER},
- </if>
- <if test="tid != null">
- #{tid,jdbcType=INTEGER},
- </if>
- <if test="nodeId != null">
- #{nodeId,jdbcType=INTEGER},
- </if>
- <if test="paymentType != null">
- #{paymentType,jdbcType=INTEGER},
- </if>
- <if test="companyName != null">
- #{companyName,jdbcType=VARCHAR},
- </if>
- <if test="quantity != null">
- #{quantity,jdbcType=INTEGER},
- </if>
- <if test="paymentStatus != null">
- #{paymentStatus,jdbcType=INTEGER},
- </if>
- <if test="status != null">
- #{status,jdbcType=INTEGER},
- </if>
- <if test="paymentAmount != null">
- #{paymentAmount,jdbcType=DECIMAL},
- </if>
- <if test="remarks != null">
- #{remarks,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null">
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="tpcId != null">
- #{tpcId,jdbcType=INTEGER},
- </if>
- <if test="applicationAmount != null">
- #{applicationAmount,jdbcType=DECIMAL},
- </if>
- <if test="chooseType != null">
- #{chooseType,jdbcType=INTEGER},
- </if>
- <if test="aid != null">
- #{aid,jdbcType=VARCHAR},
- </if>
- <if test="aname != null">
- #{aname,jdbcType=VARCHAR},
- </if>
- </trim>
- <selectKey keyProperty="id" order="AFTER" resultType="int">
- SELECT LAST_INSERT_ID()
- </selectKey>
- </insert>
- <select id="selectByidGetDetails" resultType="com.goafanti.organization.bo.outOrderPayment">
- select a.id,a.tid,a.node_id nodeId,a.payment_type paymentType,a.company_name companyName,a.quantity,
- a.payment_status paymentStatus,a.status,a.payment_amount paymentAmount,a.remarks ,
- d.finance_name financeName ,c.order_no orderNo,a.application_amount applicationAmount
- from t_order_payment a
- left join t_order_task c on a.tid=c.id left join t_order_mid d on c.order_no=d.order_no where a.id= #{id}
- </select>
-
- <select id="selectByTid" resultType="com.goafanti.organization.bo.outOrderPayment">
- select a.id,a.tid,a.node_id nodeId,a.payment_type paymentType,a.company_name companyName,a.quantity,choose_type chooseType,tpc.id tpcId,
- a.payment_status paymentStatus, a.status,a.payment_amount paymentAmount,a.remarks ,tpc.company_name tpcName,d.finance_name financeName ,
- c.order_no orderNo,date_format(a.create_time,'%Y-%m-%d %H:%i:%s')createTimes,a.application_amount applicationAmount
- from t_order_payment a left join t_order_task c on a.tid=c.id left join t_order_mid d on c.order_no=d.order_no
- left join third_party_company tpc on tpc.id=a.tpc_id where a.tid= #{id}
- </select>
- <select id="selectList" resultType="com.goafanti.organization.bo.outOrderPayment">
- select a.id,a.tid,a.node_id nodeId,a.payment_type paymentType,a.company_name companyName,a.quantity,
- a.payment_status paymentStatus, a.status,a.payment_amount paymentAmount,a.remarks , b.quantity NodeQuantity,
- b.party_amount NodePartyAmount,b.total_amount NodeTotalAmount,d.finance_name financeName ,c.order_no orderNo
- ,a.application_amount applicationAmount
- from t_order_payment a left join payment_node b on a.node_id=b.id
- left join t_order_task c on b.tid=c.id left join t_order_mid d on c.order_no=d.order_no where a.status !=4
- <if test="tpcId != null">
- and a.tpc_id= #{tpcId}
- </if>
- <if test="nodeId != null">
- and a.node_id= #{nodeId}
- </if>
- <if test="chooseType != null">
- and a.choose_type= #{chooseType}
- </if>
- </select>
-
- <update id="updateByids">
- update t_order_payment set status=3
- where id in
- <foreach item="item" collection="list" separator="," open="(" close=")" index="">
- #{item}
- </foreach>
- </update>
-
- </mapper>
|