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

271 lines
10 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.TbReceiptSalesMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbReceiptSales">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="title" jdbcType="VARCHAR" property="title" />
<result column="logo" jdbcType="VARCHAR" property="logo" />
<result column="show_contact_info" jdbcType="BIT" property="showContactInfo" />
<result column="show_member" jdbcType="BIT" property="showMember" />
<result column="show_member_code" jdbcType="BIT" property="showMemberCode" />
<result column="show_member_score" jdbcType="BIT" property="showMemberScore" />
<result column="show_member_wallet" jdbcType="BIT" property="showMemberWallet" />
<result column="footer_remark" jdbcType="VARCHAR" property="footerRemark" />
<result column="show_cash_charge" jdbcType="BIT" property="showCashCharge" />
<result column="show_serial_no" jdbcType="BIT" property="showSerialNo" />
<result column="big_serial_no" jdbcType="BIT" property="bigSerialNo" />
<result column="header_text" jdbcType="VARCHAR" property="headerText" />
<result column="header_text_align" jdbcType="VARCHAR" property="headerTextAlign" />
<result column="footer_text" jdbcType="VARCHAR" property="footerText" />
<result column="footer_text_align" jdbcType="VARCHAR" property="footerTextAlign" />
<result column="footer_image" jdbcType="VARCHAR" property="footerImage" />
<result column="pre_print" jdbcType="VARCHAR" property="prePrint" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
</resultMap>
<sql id="Base_Column_List">
id, title, logo, show_contact_info, show_member, show_member_code, show_member_score,
show_member_wallet, footer_remark, show_cash_charge, show_serial_no, big_serial_no,
header_text, header_text_align, footer_text, footer_text_align, footer_image, pre_print,
created_at, updated_at
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_receipt_sales
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_receipt_sales
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbReceiptSales">
insert into tb_receipt_sales (id, title, logo,
show_contact_info, show_member, show_member_code,
show_member_score, show_member_wallet, footer_remark,
show_cash_charge, show_serial_no, big_serial_no,
header_text, header_text_align, footer_text,
footer_text_align, footer_image, pre_print,
created_at, updated_at)
values (#{id,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{logo,jdbcType=VARCHAR},
#{showContactInfo,jdbcType=BIT}, #{showMember,jdbcType=BIT}, #{showMemberCode,jdbcType=BIT},
#{showMemberScore,jdbcType=BIT}, #{showMemberWallet,jdbcType=BIT}, #{footerRemark,jdbcType=VARCHAR},
#{showCashCharge,jdbcType=BIT}, #{showSerialNo,jdbcType=BIT}, #{bigSerialNo,jdbcType=BIT},
#{headerText,jdbcType=VARCHAR}, #{headerTextAlign,jdbcType=VARCHAR}, #{footerText,jdbcType=VARCHAR},
#{footerTextAlign,jdbcType=VARCHAR}, #{footerImage,jdbcType=VARCHAR}, #{prePrint,jdbcType=VARCHAR},
#{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbReceiptSales">
insert into tb_receipt_sales
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="title != null">
title,
</if>
<if test="logo != null">
logo,
</if>
<if test="showContactInfo != null">
show_contact_info,
</if>
<if test="showMember != null">
show_member,
</if>
<if test="showMemberCode != null">
show_member_code,
</if>
<if test="showMemberScore != null">
show_member_score,
</if>
<if test="showMemberWallet != null">
show_member_wallet,
</if>
<if test="footerRemark != null">
footer_remark,
</if>
<if test="showCashCharge != null">
show_cash_charge,
</if>
<if test="showSerialNo != null">
show_serial_no,
</if>
<if test="bigSerialNo != null">
big_serial_no,
</if>
<if test="headerText != null">
header_text,
</if>
<if test="headerTextAlign != null">
header_text_align,
</if>
<if test="footerText != null">
footer_text,
</if>
<if test="footerTextAlign != null">
footer_text_align,
</if>
<if test="footerImage != null">
footer_image,
</if>
<if test="prePrint != null">
pre_print,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="title != null">
#{title,jdbcType=VARCHAR},
</if>
<if test="logo != null">
#{logo,jdbcType=VARCHAR},
</if>
<if test="showContactInfo != null">
#{showContactInfo,jdbcType=BIT},
</if>
<if test="showMember != null">
#{showMember,jdbcType=BIT},
</if>
<if test="showMemberCode != null">
#{showMemberCode,jdbcType=BIT},
</if>
<if test="showMemberScore != null">
#{showMemberScore,jdbcType=BIT},
</if>
<if test="showMemberWallet != null">
#{showMemberWallet,jdbcType=BIT},
</if>
<if test="footerRemark != null">
#{footerRemark,jdbcType=VARCHAR},
</if>
<if test="showCashCharge != null">
#{showCashCharge,jdbcType=BIT},
</if>
<if test="showSerialNo != null">
#{showSerialNo,jdbcType=BIT},
</if>
<if test="bigSerialNo != null">
#{bigSerialNo,jdbcType=BIT},
</if>
<if test="headerText != null">
#{headerText,jdbcType=VARCHAR},
</if>
<if test="headerTextAlign != null">
#{headerTextAlign,jdbcType=VARCHAR},
</if>
<if test="footerText != null">
#{footerText,jdbcType=VARCHAR},
</if>
<if test="footerTextAlign != null">
#{footerTextAlign,jdbcType=VARCHAR},
</if>
<if test="footerImage != null">
#{footerImage,jdbcType=VARCHAR},
</if>
<if test="prePrint != null">
#{prePrint,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbReceiptSales">
update tb_receipt_sales
<set>
<if test="title != null">
title = #{title,jdbcType=VARCHAR},
</if>
<if test="logo != null">
logo = #{logo,jdbcType=VARCHAR},
</if>
<if test="showContactInfo != null">
show_contact_info = #{showContactInfo,jdbcType=BIT},
</if>
<if test="showMember != null">
show_member = #{showMember,jdbcType=BIT},
</if>
<if test="showMemberCode != null">
show_member_code = #{showMemberCode,jdbcType=BIT},
</if>
<if test="showMemberScore != null">
show_member_score = #{showMemberScore,jdbcType=BIT},
</if>
<if test="showMemberWallet != null">
show_member_wallet = #{showMemberWallet,jdbcType=BIT},
</if>
<if test="footerRemark != null">
footer_remark = #{footerRemark,jdbcType=VARCHAR},
</if>
<if test="showCashCharge != null">
show_cash_charge = #{showCashCharge,jdbcType=BIT},
</if>
<if test="showSerialNo != null">
show_serial_no = #{showSerialNo,jdbcType=BIT},
</if>
<if test="bigSerialNo != null">
big_serial_no = #{bigSerialNo,jdbcType=BIT},
</if>
<if test="headerText != null">
header_text = #{headerText,jdbcType=VARCHAR},
</if>
<if test="headerTextAlign != null">
header_text_align = #{headerTextAlign,jdbcType=VARCHAR},
</if>
<if test="footerText != null">
footer_text = #{footerText,jdbcType=VARCHAR},
</if>
<if test="footerTextAlign != null">
footer_text_align = #{footerTextAlign,jdbcType=VARCHAR},
</if>
<if test="footerImage != null">
footer_image = #{footerImage,jdbcType=VARCHAR},
</if>
<if test="prePrint != null">
pre_print = #{prePrint,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbReceiptSales">
update tb_receipt_sales
set title = #{title,jdbcType=VARCHAR},
logo = #{logo,jdbcType=VARCHAR},
show_contact_info = #{showContactInfo,jdbcType=BIT},
show_member = #{showMember,jdbcType=BIT},
show_member_code = #{showMemberCode,jdbcType=BIT},
show_member_score = #{showMemberScore,jdbcType=BIT},
show_member_wallet = #{showMemberWallet,jdbcType=BIT},
footer_remark = #{footerRemark,jdbcType=VARCHAR},
show_cash_charge = #{showCashCharge,jdbcType=BIT},
show_serial_no = #{showSerialNo,jdbcType=BIT},
big_serial_no = #{bigSerialNo,jdbcType=BIT},
header_text = #{headerText,jdbcType=VARCHAR},
header_text_align = #{headerTextAlign,jdbcType=VARCHAR},
footer_text = #{footerText,jdbcType=VARCHAR},
footer_text_align = #{footerTextAlign,jdbcType=VARCHAR},
footer_image = #{footerImage,jdbcType=VARCHAR},
pre_print = #{prePrint,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>