154 lines
5.9 KiB
XML
154 lines
5.9 KiB
XML
<?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.chaozhanggui.system.cashierservice.dao.TbSplitAccountsMapper">
|
|
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbSplitAccounts">
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
|
<result column="merchant_id" jdbcType="INTEGER" property="merchantId" />
|
|
<result column="shop_id" jdbcType="INTEGER" property="shopId" />
|
|
<result column="coupons_price" jdbcType="DECIMAL" property="couponsPrice" />
|
|
<result column="conpons_amount" jdbcType="DECIMAL" property="conponsAmount" />
|
|
<result column="is_split" jdbcType="VARCHAR" property="isSplit" />
|
|
<result column="order_amount" jdbcType="DECIMAL" property="orderAmount" />
|
|
<result column="origin_amount" jdbcType="DECIMAL" property="originAmount" />
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
<result column="split_time" jdbcType="TIMESTAMP" property="splitTime" />
|
|
<result column="trade_day" jdbcType="VARCHAR" property="tradeDay" />
|
|
</resultMap>
|
|
<sql id="Base_Column_List">
|
|
id, merchant_id, shop_id, coupons_price, conpons_amount, is_split, order_amount,
|
|
create_time, split_time, trade_day,origin_amount
|
|
</sql>
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
from tb_split_accounts
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</select>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
delete from tb_split_accounts
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</delete>
|
|
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbSplitAccounts">
|
|
insert into tb_split_accounts (id, merchant_id, shop_id,
|
|
coupons_price, conpons_amount, is_split,
|
|
order_amount, create_time, split_time,
|
|
trade_day,origin_amount)
|
|
values (#{id,jdbcType=INTEGER}, #{merchantId,jdbcType=INTEGER}, #{shopId,jdbcType=INTEGER},
|
|
#{couponsPrice,jdbcType=DECIMAL}, #{conponsAmount,jdbcType=DECIMAL}, #{isSplit,jdbcType=VARCHAR},
|
|
#{orderAmount,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, #{splitTime,jdbcType=TIMESTAMP},
|
|
#{tradeDay,jdbcType=VARCHAR},#{originAmount,jdbcType=DECIMAL})
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbSplitAccounts">
|
|
insert into tb_split_accounts
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
id,
|
|
</if>
|
|
<if test="merchantId != null">
|
|
merchant_id,
|
|
</if>
|
|
<if test="shopId != null">
|
|
shop_id,
|
|
</if>
|
|
<if test="couponsPrice != null">
|
|
coupons_price,
|
|
</if>
|
|
<if test="conponsAmount != null">
|
|
conpons_amount,
|
|
</if>
|
|
<if test="isSplit != null">
|
|
is_split,
|
|
</if>
|
|
<if test="orderAmount != null">
|
|
order_amount,
|
|
</if>
|
|
<if test="createTime != null">
|
|
create_time,
|
|
</if>
|
|
<if test="splitTime != null">
|
|
split_time,
|
|
</if>
|
|
<if test="tradeDay != null">
|
|
trade_day,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
#{id,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="merchantId != null">
|
|
#{merchantId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="shopId != null">
|
|
#{shopId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="couponsPrice != null">
|
|
#{couponsPrice,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="conponsAmount != null">
|
|
#{conponsAmount,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="isSplit != null">
|
|
#{isSplit,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="orderAmount != null">
|
|
#{orderAmount,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="createTime != null">
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="splitTime != null">
|
|
#{splitTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="tradeDay != null">
|
|
#{tradeDay,jdbcType=VARCHAR},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbSplitAccounts">
|
|
update tb_split_accounts
|
|
<set>
|
|
<if test="merchantId != null">
|
|
merchant_id = #{merchantId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="shopId != null">
|
|
shop_id = #{shopId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="couponsPrice != null">
|
|
coupons_price = #{couponsPrice,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="conponsAmount != null">
|
|
conpons_amount = #{conponsAmount,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="isSplit != null">
|
|
is_split = #{isSplit,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="orderAmount != null">
|
|
order_amount = #{orderAmount,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="createTime != null">
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="splitTime != null">
|
|
split_time = #{splitTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="tradeDay != null">
|
|
trade_day = #{tradeDay,jdbcType=VARCHAR},
|
|
</if>
|
|
</set>
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</update>
|
|
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbSplitAccounts">
|
|
update tb_split_accounts
|
|
set merchant_id = #{merchantId,jdbcType=INTEGER},
|
|
shop_id = #{shopId,jdbcType=INTEGER},
|
|
coupons_price = #{couponsPrice,jdbcType=DECIMAL},
|
|
conpons_amount = #{conponsAmount,jdbcType=DECIMAL},
|
|
is_split = #{isSplit,jdbcType=VARCHAR},
|
|
order_amount = #{orderAmount,jdbcType=DECIMAL},
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
split_time = #{splitTime,jdbcType=TIMESTAMP},
|
|
trade_day = #{tradeDay,jdbcType=VARCHAR}
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</update>
|
|
</mapper> |