cashier-client/src/main/resources/mapper/tbHandoverMapper.xml

306 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.tbHandoverMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.tbHandover">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="trade_day" jdbcType="VARCHAR" property="tradeDay" />
<result column="print_no" jdbcType="VARCHAR" property="printNo" />
<result column="duty_id" jdbcType="INTEGER" property="dutyId" />
<result column="shop_id" jdbcType="INTEGER" property="shopId" />
<result column="merchant_name" jdbcType="VARCHAR" property="merchantName" />
<result column="start_time" jdbcType="VARCHAR" property="startTime" />
<result column="end_time" jdbcType="VARCHAR" property="endTime" />
<result column="staff_id" jdbcType="INTEGER" property="staffId" />
<result column="staff_name" jdbcType="VARCHAR" property="staffName" />
<result column="pay_infos" jdbcType="VARCHAR" property="payInfos" />
<result column="member_data" jdbcType="VARCHAR" property="memberData" />
<result column="product_categories" jdbcType="VARCHAR" property="productCategories" />
<result column="total_amount" jdbcType="VARCHAR" property="totalAmount" />
<result column="imprest" jdbcType="VARCHAR" property="imprest" />
<result column="payable" jdbcType="VARCHAR" property="payable" />
<result column="hand_in" jdbcType="VARCHAR" property="handIn" />
<result column="return_amount" jdbcType="VARCHAR" property="returnAmount" />
<result column="order_num" jdbcType="VARCHAR" property="orderNum" />
<result column="quick_amount" jdbcType="VARCHAR" property="quickAmount" />
<result column="product_info_pos" jdbcType="VARCHAR" property="productInfoPos" />
<result column="product_infos" jdbcType="VARCHAR" property="productInfos" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
</resultMap>
<sql id="Base_Column_List">
id, trade_day, print_no, duty_id, shop_id, merchant_name, start_time, end_time, staff_id,
staff_name, pay_infos, member_data, product_categories, total_amount, imprest, payable,
hand_in, return_amount, order_num, quick_amount, product_info_pos, product_infos,
create_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_handover
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_handover
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.tbHandover">
insert into tb_handover (id, trade_day, print_no,
duty_id, shop_id, merchant_name,
start_time, end_time, staff_id,
staff_name, pay_infos, member_data,
product_categories, total_amount, imprest,
payable, hand_in, return_amount,
order_num, quick_amount, product_info_pos,
product_infos, create_time)
values (#{id,jdbcType=INTEGER}, #{tradeDay,jdbcType=VARCHAR}, #{printNo,jdbcType=VARCHAR},
#{dutyId,jdbcType=INTEGER}, #{shopId,jdbcType=INTEGER}, #{merchantName,jdbcType=VARCHAR},
#{startTime,jdbcType=VARCHAR}, #{endTime,jdbcType=VARCHAR}, #{staffId,jdbcType=INTEGER},
#{staffName,jdbcType=VARCHAR}, #{payInfos,jdbcType=VARCHAR}, #{memberData,jdbcType=VARCHAR},
#{productCategories,jdbcType=VARCHAR}, #{totalAmount,jdbcType=VARCHAR}, #{imprest,jdbcType=VARCHAR},
#{payable,jdbcType=VARCHAR}, #{handIn,jdbcType=VARCHAR}, #{returnAmount,jdbcType=VARCHAR},
#{orderNum,jdbcType=VARCHAR}, #{quickAmount,jdbcType=VARCHAR}, #{productInfoPos,jdbcType=VARCHAR},
#{productInfos,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.tbHandover">
insert into tb_handover
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="tradeDay != null">
trade_day,
</if>
<if test="printNo != null">
print_no,
</if>
<if test="dutyId != null">
duty_id,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="merchantName != null">
merchant_name,
</if>
<if test="startTime != null">
start_time,
</if>
<if test="endTime != null">
end_time,
</if>
<if test="staffId != null">
staff_id,
</if>
<if test="staffName != null">
staff_name,
</if>
<if test="payInfos != null">
pay_infos,
</if>
<if test="memberData != null">
member_data,
</if>
<if test="productCategories != null">
product_categories,
</if>
<if test="totalAmount != null">
total_amount,
</if>
<if test="imprest != null">
imprest,
</if>
<if test="payable != null">
payable,
</if>
<if test="handIn != null">
hand_in,
</if>
<if test="returnAmount != null">
return_amount,
</if>
<if test="orderNum != null">
order_num,
</if>
<if test="quickAmount != null">
quick_amount,
</if>
<if test="productInfoPos != null">
product_info_pos,
</if>
<if test="productInfos != null">
product_infos,
</if>
<if test="createTime != null">
create_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="tradeDay != null">
#{tradeDay,jdbcType=VARCHAR},
</if>
<if test="printNo != null">
#{printNo,jdbcType=VARCHAR},
</if>
<if test="dutyId != null">
#{dutyId,jdbcType=INTEGER},
</if>
<if test="shopId != null">
#{shopId,jdbcType=INTEGER},
</if>
<if test="merchantName != null">
#{merchantName,jdbcType=VARCHAR},
</if>
<if test="startTime != null">
#{startTime,jdbcType=VARCHAR},
</if>
<if test="endTime != null">
#{endTime,jdbcType=VARCHAR},
</if>
<if test="staffId != null">
#{staffId,jdbcType=INTEGER},
</if>
<if test="staffName != null">
#{staffName,jdbcType=VARCHAR},
</if>
<if test="payInfos != null">
#{payInfos,jdbcType=VARCHAR},
</if>
<if test="memberData != null">
#{memberData,jdbcType=VARCHAR},
</if>
<if test="productCategories != null">
#{productCategories,jdbcType=VARCHAR},
</if>
<if test="totalAmount != null">
#{totalAmount,jdbcType=VARCHAR},
</if>
<if test="imprest != null">
#{imprest,jdbcType=VARCHAR},
</if>
<if test="payable != null">
#{payable,jdbcType=VARCHAR},
</if>
<if test="handIn != null">
#{handIn,jdbcType=VARCHAR},
</if>
<if test="returnAmount != null">
#{returnAmount,jdbcType=VARCHAR},
</if>
<if test="orderNum != null">
#{orderNum,jdbcType=VARCHAR},
</if>
<if test="quickAmount != null">
#{quickAmount,jdbcType=VARCHAR},
</if>
<if test="productInfoPos != null">
#{productInfoPos,jdbcType=VARCHAR},
</if>
<if test="productInfos != null">
#{productInfos,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.tbHandover">
update tb_handover
<set>
<if test="tradeDay != null">
trade_day = #{tradeDay,jdbcType=VARCHAR},
</if>
<if test="printNo != null">
print_no = #{printNo,jdbcType=VARCHAR},
</if>
<if test="dutyId != null">
duty_id = #{dutyId,jdbcType=INTEGER},
</if>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=INTEGER},
</if>
<if test="merchantName != null">
merchant_name = #{merchantName,jdbcType=VARCHAR},
</if>
<if test="startTime != null">
start_time = #{startTime,jdbcType=VARCHAR},
</if>
<if test="endTime != null">
end_time = #{endTime,jdbcType=VARCHAR},
</if>
<if test="staffId != null">
staff_id = #{staffId,jdbcType=INTEGER},
</if>
<if test="staffName != null">
staff_name = #{staffName,jdbcType=VARCHAR},
</if>
<if test="payInfos != null">
pay_infos = #{payInfos,jdbcType=VARCHAR},
</if>
<if test="memberData != null">
member_data = #{memberData,jdbcType=VARCHAR},
</if>
<if test="productCategories != null">
product_categories = #{productCategories,jdbcType=VARCHAR},
</if>
<if test="totalAmount != null">
total_amount = #{totalAmount,jdbcType=VARCHAR},
</if>
<if test="imprest != null">
imprest = #{imprest,jdbcType=VARCHAR},
</if>
<if test="payable != null">
payable = #{payable,jdbcType=VARCHAR},
</if>
<if test="handIn != null">
hand_in = #{handIn,jdbcType=VARCHAR},
</if>
<if test="returnAmount != null">
return_amount = #{returnAmount,jdbcType=VARCHAR},
</if>
<if test="orderNum != null">
order_num = #{orderNum,jdbcType=VARCHAR},
</if>
<if test="quickAmount != null">
quick_amount = #{quickAmount,jdbcType=VARCHAR},
</if>
<if test="productInfoPos != null">
product_info_pos = #{productInfoPos,jdbcType=VARCHAR},
</if>
<if test="productInfos != null">
product_infos = #{productInfos,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.tbHandover">
update tb_handover
set trade_day = #{tradeDay,jdbcType=VARCHAR},
print_no = #{printNo,jdbcType=VARCHAR},
duty_id = #{dutyId,jdbcType=INTEGER},
shop_id = #{shopId,jdbcType=INTEGER},
merchant_name = #{merchantName,jdbcType=VARCHAR},
start_time = #{startTime,jdbcType=VARCHAR},
end_time = #{endTime,jdbcType=VARCHAR},
staff_id = #{staffId,jdbcType=INTEGER},
staff_name = #{staffName,jdbcType=VARCHAR},
pay_infos = #{payInfos,jdbcType=VARCHAR},
member_data = #{memberData,jdbcType=VARCHAR},
product_categories = #{productCategories,jdbcType=VARCHAR},
total_amount = #{totalAmount,jdbcType=VARCHAR},
imprest = #{imprest,jdbcType=VARCHAR},
payable = #{payable,jdbcType=VARCHAR},
hand_in = #{handIn,jdbcType=VARCHAR},
return_amount = #{returnAmount,jdbcType=VARCHAR},
order_num = #{orderNum,jdbcType=VARCHAR},
quick_amount = #{quickAmount,jdbcType=VARCHAR},
product_info_pos = #{productInfoPos,jdbcType=VARCHAR},
product_infos = #{productInfos,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>