Files
cashier-client/src/main/resources/mapper/TbShopCashSpreadMapper.xml
韩鹏辉 b96a251fd8 提交
2024-03-21 10:17:54 +08:00

143 lines
5.7 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.TbShopCashSpreadMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbShopCashSpread">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbShopCashSpreadWithBLOBs">
<result column="sale_receipt" jdbcType="LONGVARCHAR" property="saleReceipt" />
<result column="triplicate_receipt" jdbcType="LONGVARCHAR" property="triplicateReceipt" />
<result column="screen_config" jdbcType="LONGVARCHAR" property="screenConfig" />
<result column="tag_config" jdbcType="LONGVARCHAR" property="tagConfig" />
<result column="scale_config" jdbcType="LONGVARCHAR" property="scaleConfig" />
</resultMap>
<sql id="Base_Column_List">
id, created_at, updated_at
</sql>
<sql id="Blob_Column_List">
sale_receipt, triplicate_receipt, screen_config, tag_config, scale_config
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from tb_shop_cash_spread
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_shop_cash_spread
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopCashSpreadWithBLOBs">
insert into tb_shop_cash_spread (id, created_at, updated_at,
sale_receipt, triplicate_receipt,
screen_config, tag_config, scale_config
)
values (#{id,jdbcType=INTEGER}, #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT},
#{saleReceipt,jdbcType=LONGVARCHAR}, #{triplicateReceipt,jdbcType=LONGVARCHAR},
#{screenConfig,jdbcType=LONGVARCHAR}, #{tagConfig,jdbcType=LONGVARCHAR}, #{scaleConfig,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopCashSpreadWithBLOBs">
insert into tb_shop_cash_spread
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="saleReceipt != null">
sale_receipt,
</if>
<if test="triplicateReceipt != null">
triplicate_receipt,
</if>
<if test="screenConfig != null">
screen_config,
</if>
<if test="tagConfig != null">
tag_config,
</if>
<if test="scaleConfig != null">
scale_config,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
<if test="saleReceipt != null">
#{saleReceipt,jdbcType=LONGVARCHAR},
</if>
<if test="triplicateReceipt != null">
#{triplicateReceipt,jdbcType=LONGVARCHAR},
</if>
<if test="screenConfig != null">
#{screenConfig,jdbcType=LONGVARCHAR},
</if>
<if test="tagConfig != null">
#{tagConfig,jdbcType=LONGVARCHAR},
</if>
<if test="scaleConfig != null">
#{scaleConfig,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopCashSpreadWithBLOBs">
update tb_shop_cash_spread
<set>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
<if test="saleReceipt != null">
sale_receipt = #{saleReceipt,jdbcType=LONGVARCHAR},
</if>
<if test="triplicateReceipt != null">
triplicate_receipt = #{triplicateReceipt,jdbcType=LONGVARCHAR},
</if>
<if test="screenConfig != null">
screen_config = #{screenConfig,jdbcType=LONGVARCHAR},
</if>
<if test="tagConfig != null">
tag_config = #{tagConfig,jdbcType=LONGVARCHAR},
</if>
<if test="scaleConfig != null">
scale_config = #{scaleConfig,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopCashSpreadWithBLOBs">
update tb_shop_cash_spread
set created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
sale_receipt = #{saleReceipt,jdbcType=LONGVARCHAR},
triplicate_receipt = #{triplicateReceipt,jdbcType=LONGVARCHAR},
screen_config = #{screenConfig,jdbcType=LONGVARCHAR},
tag_config = #{tagConfig,jdbcType=LONGVARCHAR},
scale_config = #{scaleConfig,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopCashSpread">
update tb_shop_cash_spread
set created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>