Files
wx-cashier-service/src/main/resources/mapper/ViewOrderMapper.xml
韩鹏辉 b77eacdccb 提交
2024-03-21 10:22:29 +08:00

305 lines
11 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.ViewOrderMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.ViewOrder">
<result column="ali_paid_amount" jdbcType="DECIMAL" property="aliPaidAmount" />
<result column="id" jdbcType="INTEGER" property="id" />
<result column="amount" jdbcType="DECIMAL" property="amount" />
<result column="bank_paid_amount" jdbcType="DECIMAL" property="bankPaidAmount" />
<result column="billing_id" jdbcType="VARCHAR" property="billingId" />
<result column="cash_paid_amount" jdbcType="DECIMAL" property="cashPaidAmount" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="deduct_score" jdbcType="INTEGER" property="deductScore" />
<result column="deposit_paid_amount" jdbcType="DECIMAL" property="depositPaidAmount" />
<result column="discount_amount" jdbcType="DECIMAL" property="discountAmount" />
<result column="freight_amount" jdbcType="DECIMAL" property="freightAmount" />
<result column="is_master" jdbcType="TINYINT" property="isMaster" />
<result column="is_vip" jdbcType="TINYINT" property="isVip" />
<result column="master_id" jdbcType="VARCHAR" property="masterId" />
<result column="member_id" jdbcType="VARCHAR" property="memberId" />
<result column="order_no" jdbcType="VARCHAR" property="orderNo" />
<result column="order_type" jdbcType="VARCHAR" property="orderType" />
<result column="other_paid_amount" jdbcType="DECIMAL" property="otherPaidAmount" />
<result column="paid_time" jdbcType="BIGINT" property="paidTime" />
<result column="pay_amount" jdbcType="DECIMAL" property="payAmount" />
<result column="product_score" jdbcType="INTEGER" property="productScore" />
<result column="product_type" jdbcType="VARCHAR" property="productType" />
<result column="ref_order_id" jdbcType="VARCHAR" property="refOrderId" />
<result column="refund_able" jdbcType="TINYINT" property="refundAble" />
<result column="refund_amount" jdbcType="DECIMAL" property="refundAmount" />
<result column="send_type" jdbcType="VARCHAR" property="sendType" />
<result column="settlement_amount" jdbcType="DECIMAL" property="settlementAmount" />
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
<result column="small_change" jdbcType="DECIMAL" property="smallChange" />
<result column="status" jdbcType="VARCHAR" property="status" />
<result column="table_id" jdbcType="VARCHAR" property="tableId" />
<result column="table_party" jdbcType="VARCHAR" property="tableParty" />
<result column="terminal_snap" jdbcType="VARCHAR" property="terminalSnap" />
<result column="user_id" jdbcType="VARCHAR" property="userId" />
<result column="virtual_paid_amount" jdbcType="DECIMAL" property="virtualPaidAmount" />
<result column="wx_paid_amount" jdbcType="DECIMAL" property="wxPaidAmount" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.ViewOrder">
<result column="cart_list" jdbcType="LONGVARCHAR" property="cartList" />
</resultMap>
<sql id="Blob_Column_List">
cart_list
</sql>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.ViewOrder">
insert into view_order (ali_paid_amount, id, amount,
bank_paid_amount, billing_id, cash_paid_amount,
created_at, deduct_score, deposit_paid_amount,
discount_amount, freight_amount, is_master,
is_vip, master_id, member_id,
order_no, order_type, other_paid_amount,
paid_time, pay_amount, product_score,
product_type, ref_order_id, refund_able,
refund_amount, send_type, settlement_amount,
shop_id, small_change, status,
table_id, table_party, terminal_snap,
user_id, virtual_paid_amount, wx_paid_amount,
cart_list)
values (#{aliPaidAmount,jdbcType=DECIMAL}, #{id,jdbcType=INTEGER}, #{amount,jdbcType=DECIMAL},
#{bankPaidAmount,jdbcType=DECIMAL}, #{billingId,jdbcType=VARCHAR}, #{cashPaidAmount,jdbcType=DECIMAL},
#{createdAt,jdbcType=BIGINT}, #{deductScore,jdbcType=INTEGER}, #{depositPaidAmount,jdbcType=DECIMAL},
#{discountAmount,jdbcType=DECIMAL}, #{freightAmount,jdbcType=DECIMAL}, #{isMaster,jdbcType=TINYINT},
#{isVip,jdbcType=TINYINT}, #{masterId,jdbcType=VARCHAR}, #{memberId,jdbcType=VARCHAR},
#{orderNo,jdbcType=VARCHAR}, #{orderType,jdbcType=VARCHAR}, #{otherPaidAmount,jdbcType=DECIMAL},
#{paidTime,jdbcType=BIGINT}, #{payAmount,jdbcType=DECIMAL}, #{productScore,jdbcType=INTEGER},
#{productType,jdbcType=VARCHAR}, #{refOrderId,jdbcType=VARCHAR}, #{refundAble,jdbcType=TINYINT},
#{refundAmount,jdbcType=DECIMAL}, #{sendType,jdbcType=VARCHAR}, #{settlementAmount,jdbcType=DECIMAL},
#{shopId,jdbcType=VARCHAR}, #{smallChange,jdbcType=DECIMAL}, #{status,jdbcType=VARCHAR},
#{tableId,jdbcType=VARCHAR}, #{tableParty,jdbcType=VARCHAR}, #{terminalSnap,jdbcType=VARCHAR},
#{userId,jdbcType=VARCHAR}, #{virtualPaidAmount,jdbcType=DECIMAL}, #{wxPaidAmount,jdbcType=DECIMAL},
#{cartList,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.ViewOrder">
insert into view_order
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="aliPaidAmount != null">
ali_paid_amount,
</if>
<if test="id != null">
id,
</if>
<if test="amount != null">
amount,
</if>
<if test="bankPaidAmount != null">
bank_paid_amount,
</if>
<if test="billingId != null">
billing_id,
</if>
<if test="cashPaidAmount != null">
cash_paid_amount,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="deductScore != null">
deduct_score,
</if>
<if test="depositPaidAmount != null">
deposit_paid_amount,
</if>
<if test="discountAmount != null">
discount_amount,
</if>
<if test="freightAmount != null">
freight_amount,
</if>
<if test="isMaster != null">
is_master,
</if>
<if test="isVip != null">
is_vip,
</if>
<if test="masterId != null">
master_id,
</if>
<if test="memberId != null">
member_id,
</if>
<if test="orderNo != null">
order_no,
</if>
<if test="orderType != null">
order_type,
</if>
<if test="otherPaidAmount != null">
other_paid_amount,
</if>
<if test="paidTime != null">
paid_time,
</if>
<if test="payAmount != null">
pay_amount,
</if>
<if test="productScore != null">
product_score,
</if>
<if test="productType != null">
product_type,
</if>
<if test="refOrderId != null">
ref_order_id,
</if>
<if test="refundAble != null">
refund_able,
</if>
<if test="refundAmount != null">
refund_amount,
</if>
<if test="sendType != null">
send_type,
</if>
<if test="settlementAmount != null">
settlement_amount,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="smallChange != null">
small_change,
</if>
<if test="status != null">
status,
</if>
<if test="tableId != null">
table_id,
</if>
<if test="tableParty != null">
table_party,
</if>
<if test="terminalSnap != null">
terminal_snap,
</if>
<if test="userId != null">
user_id,
</if>
<if test="virtualPaidAmount != null">
virtual_paid_amount,
</if>
<if test="wxPaidAmount != null">
wx_paid_amount,
</if>
<if test="cartList != null">
cart_list,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="aliPaidAmount != null">
#{aliPaidAmount,jdbcType=DECIMAL},
</if>
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="amount != null">
#{amount,jdbcType=DECIMAL},
</if>
<if test="bankPaidAmount != null">
#{bankPaidAmount,jdbcType=DECIMAL},
</if>
<if test="billingId != null">
#{billingId,jdbcType=VARCHAR},
</if>
<if test="cashPaidAmount != null">
#{cashPaidAmount,jdbcType=DECIMAL},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="deductScore != null">
#{deductScore,jdbcType=INTEGER},
</if>
<if test="depositPaidAmount != null">
#{depositPaidAmount,jdbcType=DECIMAL},
</if>
<if test="discountAmount != null">
#{discountAmount,jdbcType=DECIMAL},
</if>
<if test="freightAmount != null">
#{freightAmount,jdbcType=DECIMAL},
</if>
<if test="isMaster != null">
#{isMaster,jdbcType=TINYINT},
</if>
<if test="isVip != null">
#{isVip,jdbcType=TINYINT},
</if>
<if test="masterId != null">
#{masterId,jdbcType=VARCHAR},
</if>
<if test="memberId != null">
#{memberId,jdbcType=VARCHAR},
</if>
<if test="orderNo != null">
#{orderNo,jdbcType=VARCHAR},
</if>
<if test="orderType != null">
#{orderType,jdbcType=VARCHAR},
</if>
<if test="otherPaidAmount != null">
#{otherPaidAmount,jdbcType=DECIMAL},
</if>
<if test="paidTime != null">
#{paidTime,jdbcType=BIGINT},
</if>
<if test="payAmount != null">
#{payAmount,jdbcType=DECIMAL},
</if>
<if test="productScore != null">
#{productScore,jdbcType=INTEGER},
</if>
<if test="productType != null">
#{productType,jdbcType=VARCHAR},
</if>
<if test="refOrderId != null">
#{refOrderId,jdbcType=VARCHAR},
</if>
<if test="refundAble != null">
#{refundAble,jdbcType=TINYINT},
</if>
<if test="refundAmount != null">
#{refundAmount,jdbcType=DECIMAL},
</if>
<if test="sendType != null">
#{sendType,jdbcType=VARCHAR},
</if>
<if test="settlementAmount != null">
#{settlementAmount,jdbcType=DECIMAL},
</if>
<if test="shopId != null">
#{shopId,jdbcType=VARCHAR},
</if>
<if test="smallChange != null">
#{smallChange,jdbcType=DECIMAL},
</if>
<if test="status != null">
#{status,jdbcType=VARCHAR},
</if>
<if test="tableId != null">
#{tableId,jdbcType=VARCHAR},
</if>
<if test="tableParty != null">
#{tableParty,jdbcType=VARCHAR},
</if>
<if test="terminalSnap != null">
#{terminalSnap,jdbcType=VARCHAR},
</if>
<if test="userId != null">
#{userId,jdbcType=VARCHAR},
</if>
<if test="virtualPaidAmount != null">
#{virtualPaidAmount,jdbcType=DECIMAL},
</if>
<if test="wxPaidAmount != null">
#{wxPaidAmount,jdbcType=DECIMAL},
</if>
<if test="cartList != null">
#{cartList,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
</mapper>