mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 11:35:12 +08:00
update
This commit is contained in:
@@ -0,0 +1,352 @@
|
||||
<?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.jsowell.pile.mapper.OrderUnsplitRecordMapper">
|
||||
<resultMap id="BaseResultMap" type="com.jsowell.pile.domain.OrderUnsplitRecord">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table order_unsplit_record-->
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="payment_id" jdbcType="VARCHAR" property="paymentId" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="order_code" jdbcType="VARCHAR" property="orderCode" />
|
||||
<result column="pay_amount" jdbcType="DECIMAL" property="payAmount" />
|
||||
<result column="settle_amount" jdbcType="DECIMAL" property="settleAmount" />
|
||||
<result column="order_time" jdbcType="TIMESTAMP" property="orderTime" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, payment_id, `status`, order_code, pay_amount, settle_amount, order_time, create_time
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
<!--@mbg.generated-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from order_unsplit_record
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
<!--@mbg.generated-->
|
||||
delete from order_unsplit_record
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.OrderUnsplitRecord" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
insert into order_unsplit_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="paymentId != null">
|
||||
payment_id,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
<if test="orderCode != null">
|
||||
order_code,
|
||||
</if>
|
||||
<if test="payAmount != null">
|
||||
pay_amount,
|
||||
</if>
|
||||
<if test="settleAmount != null">
|
||||
settle_amount,
|
||||
</if>
|
||||
<if test="orderTime != null">
|
||||
order_time,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="paymentId != null">
|
||||
#{paymentId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="orderCode != null">
|
||||
#{orderCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="payAmount != null">
|
||||
#{payAmount,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="settleAmount != null">
|
||||
#{settleAmount,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="orderTime != null">
|
||||
#{orderTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.jsowell.pile.domain.OrderUnsplitRecord">
|
||||
<!--@mbg.generated-->
|
||||
update order_unsplit_record
|
||||
<set>
|
||||
<if test="paymentId != null">
|
||||
payment_id = #{paymentId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="orderCode != null">
|
||||
order_code = #{orderCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="payAmount != null">
|
||||
pay_amount = #{payAmount,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="settleAmount != null">
|
||||
settle_amount = #{settleAmount,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="orderTime != null">
|
||||
order_time = #{orderTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateBatch" parameterType="java.util.List">
|
||||
<!--@mbg.generated-->
|
||||
update order_unsplit_record
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<trim prefix="payment_id = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.paymentId,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="`status` = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.status,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="order_code = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.orderCode,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="pay_amount = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.payAmount,jdbcType=DECIMAL}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="settle_amount = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.settleAmount,jdbcType=DECIMAL}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="order_time = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.orderTime,jdbcType=TIMESTAMP}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="create_time = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.createTime,jdbcType=TIMESTAMP}
|
||||
</foreach>
|
||||
</trim>
|
||||
</trim>
|
||||
where id in
|
||||
<foreach close=")" collection="list" item="item" open="(" separator=", ">
|
||||
#{item.id,jdbcType=INTEGER}
|
||||
</foreach>
|
||||
</update>
|
||||
<update id="updateBatchSelective" parameterType="java.util.List">
|
||||
<!--@mbg.generated-->
|
||||
update order_unsplit_record
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<trim prefix="payment_id = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.paymentId != null">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.paymentId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="`status` = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.status != null">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.status,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="order_code = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.orderCode != null">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.orderCode,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="pay_amount = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.payAmount != null">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.payAmount,jdbcType=DECIMAL}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="settle_amount = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.settleAmount != null">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.settleAmount,jdbcType=DECIMAL}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="order_time = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.orderTime != null">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.orderTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="create_time = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
<if test="item.createTime != null">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.createTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
</trim>
|
||||
where id in
|
||||
<foreach close=")" collection="list" item="item" open="(" separator=", ">
|
||||
#{item.id,jdbcType=INTEGER}
|
||||
</foreach>
|
||||
</update>
|
||||
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
insert into order_unsplit_record
|
||||
(payment_id, `status`, order_code, pay_amount, settle_amount, order_time, create_time
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.paymentId,jdbcType=VARCHAR}, #{item.status,jdbcType=VARCHAR}, #{item.orderCode,jdbcType=VARCHAR},
|
||||
#{item.payAmount,jdbcType=DECIMAL}, #{item.settleAmount,jdbcType=DECIMAL}, #{item.orderTime,jdbcType=TIMESTAMP},
|
||||
#{item.createTime,jdbcType=TIMESTAMP})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.OrderUnsplitRecord" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
insert into order_unsplit_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
payment_id,
|
||||
`status`,
|
||||
order_code,
|
||||
pay_amount,
|
||||
settle_amount,
|
||||
order_time,
|
||||
create_time,
|
||||
</trim>
|
||||
values
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
#{paymentId,jdbcType=VARCHAR},
|
||||
#{status,jdbcType=VARCHAR},
|
||||
#{orderCode,jdbcType=VARCHAR},
|
||||
#{payAmount,jdbcType=DECIMAL},
|
||||
#{settleAmount,jdbcType=DECIMAL},
|
||||
#{orderTime,jdbcType=TIMESTAMP},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</trim>
|
||||
on duplicate key update
|
||||
<trim suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id = #{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
payment_id = #{paymentId,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
order_code = #{orderCode,jdbcType=VARCHAR},
|
||||
pay_amount = #{payAmount,jdbcType=DECIMAL},
|
||||
settle_amount = #{settleAmount,jdbcType=DECIMAL},
|
||||
order_time = #{orderTime,jdbcType=TIMESTAMP},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.OrderUnsplitRecord" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
insert into order_unsplit_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="paymentId != null">
|
||||
payment_id,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
<if test="orderCode != null">
|
||||
order_code,
|
||||
</if>
|
||||
<if test="payAmount != null">
|
||||
pay_amount,
|
||||
</if>
|
||||
<if test="settleAmount != null">
|
||||
settle_amount,
|
||||
</if>
|
||||
<if test="orderTime != null">
|
||||
order_time,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
</trim>
|
||||
values
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="paymentId != null">
|
||||
#{paymentId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="orderCode != null">
|
||||
#{orderCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="payAmount != null">
|
||||
#{payAmount,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="settleAmount != null">
|
||||
#{settleAmount,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="orderTime != null">
|
||||
#{orderTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
on duplicate key update
|
||||
<trim suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id = #{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="paymentId != null">
|
||||
payment_id = #{paymentId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="orderCode != null">
|
||||
order_code = #{orderCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="payAmount != null">
|
||||
pay_amount = #{payAmount,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="settleAmount != null">
|
||||
settle_amount = #{settleAmount,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="orderTime != null">
|
||||
order_time = #{orderTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user