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

183 lines
7.1 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.TbOrderExtendMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbOrderExtend">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="creator_snap" jdbcType="VARCHAR" property="creatorSnap" />
<result column="cashier_snap" jdbcType="VARCHAR" property="cashierSnap" />
<result column="terminal_snap" jdbcType="VARCHAR" property="terminalSnap" />
<result column="table_party" jdbcType="VARCHAR" property="tableParty" />
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
<result column="shop_snap" jdbcType="VARCHAR" property="shopSnap" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbOrderExtendWithBLOBs">
<result column="cart_list" jdbcType="LONGVARCHAR" property="cartList" />
<result column="payment_list" jdbcType="LONGVARCHAR" property="paymentList" />
</resultMap>
<sql id="Base_Column_List">
id, creator_snap, cashier_snap, terminal_snap, table_party, shop_id, created_at,
updated_at, shop_snap
</sql>
<sql id="Blob_Column_List">
cart_list, payment_list
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from tb_order_extend
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_order_extend
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbOrderExtendWithBLOBs">
insert into tb_order_extend (id, creator_snap, cashier_snap,
terminal_snap, table_party, shop_id,
created_at, updated_at, shop_snap,
cart_list, payment_list)
values (#{id,jdbcType=INTEGER}, #{creatorSnap,jdbcType=VARCHAR}, #{cashierSnap,jdbcType=VARCHAR},
#{terminalSnap,jdbcType=VARCHAR}, #{tableParty,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR},
#{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{shopSnap,jdbcType=VARCHAR},
#{cartList,jdbcType=LONGVARCHAR}, #{paymentList,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbOrderExtendWithBLOBs">
insert into tb_order_extend
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="creatorSnap != null">
creator_snap,
</if>
<if test="cashierSnap != null">
cashier_snap,
</if>
<if test="terminalSnap != null">
terminal_snap,
</if>
<if test="tableParty != null">
table_party,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="shopSnap != null">
shop_snap,
</if>
<if test="cartList != null">
cart_list,
</if>
<if test="paymentList != null">
payment_list,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="creatorSnap != null">
#{creatorSnap,jdbcType=VARCHAR},
</if>
<if test="cashierSnap != null">
#{cashierSnap,jdbcType=VARCHAR},
</if>
<if test="terminalSnap != null">
#{terminalSnap,jdbcType=VARCHAR},
</if>
<if test="tableParty != null">
#{tableParty,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
#{shopId,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
<if test="shopSnap != null">
#{shopSnap,jdbcType=VARCHAR},
</if>
<if test="cartList != null">
#{cartList,jdbcType=LONGVARCHAR},
</if>
<if test="paymentList != null">
#{paymentList,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbOrderExtendWithBLOBs">
update tb_order_extend
<set>
<if test="creatorSnap != null">
creator_snap = #{creatorSnap,jdbcType=VARCHAR},
</if>
<if test="cashierSnap != null">
cashier_snap = #{cashierSnap,jdbcType=VARCHAR},
</if>
<if test="terminalSnap != null">
terminal_snap = #{terminalSnap,jdbcType=VARCHAR},
</if>
<if test="tableParty != null">
table_party = #{tableParty,jdbcType=VARCHAR},
</if>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
<if test="shopSnap != null">
shop_snap = #{shopSnap,jdbcType=VARCHAR},
</if>
<if test="cartList != null">
cart_list = #{cartList,jdbcType=LONGVARCHAR},
</if>
<if test="paymentList != null">
payment_list = #{paymentList,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.system.cashierservice.entity.TbOrderExtendWithBLOBs">
update tb_order_extend
set creator_snap = #{creatorSnap,jdbcType=VARCHAR},
cashier_snap = #{cashierSnap,jdbcType=VARCHAR},
terminal_snap = #{terminalSnap,jdbcType=VARCHAR},
table_party = #{tableParty,jdbcType=VARCHAR},
shop_id = #{shopId,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
shop_snap = #{shopSnap,jdbcType=VARCHAR},
cart_list = #{cartList,jdbcType=LONGVARCHAR},
payment_list = #{paymentList,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbOrderExtend">
update tb_order_extend
set creator_snap = #{creatorSnap,jdbcType=VARCHAR},
cashier_snap = #{cashierSnap,jdbcType=VARCHAR},
terminal_snap = #{terminalSnap,jdbcType=VARCHAR},
table_party = #{tableParty,jdbcType=VARCHAR},
shop_id = #{shopId,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
shop_snap = #{shopSnap,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>