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

188 lines
6.9 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.TbShopPurveyorTransactMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbShopPurveyorTransact">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
<result column="purveyor_name" jdbcType="VARCHAR" property="purveyorName" />
<result column="purveyor_id" jdbcType="VARCHAR" property="purveyorId" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="created_at" jdbcType="BIGINT" property="createdAt" />
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
<result column="total_amount" jdbcType="DECIMAL" property="totalAmount" />
<result column="wait_amount" jdbcType="DECIMAL" property="waitAmount" />
<result column="paid_amount" jdbcType="DECIMAL" property="paidAmount" />
<result column="paid_at" jdbcType="BIGINT" property="paidAt" />
<result column="type" jdbcType="VARCHAR" property="type" />
</resultMap>
<sql id="Base_Column_List">
id, shop_id, purveyor_name, purveyor_id, status, remark, created_at, updated_at,
total_amount, wait_amount, paid_amount, paid_at, type
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_shop_purveyor_transact
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_shop_purveyor_transact
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopPurveyorTransact">
insert into tb_shop_purveyor_transact (id, shop_id, purveyor_name,
purveyor_id, status, remark,
created_at, updated_at, total_amount,
wait_amount, paid_amount, paid_at,
type)
values (#{id,jdbcType=INTEGER}, #{shopId,jdbcType=VARCHAR}, #{purveyorName,jdbcType=VARCHAR},
#{purveyorId,jdbcType=VARCHAR}, #{status,jdbcType=TINYINT}, #{remark,jdbcType=VARCHAR},
#{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{totalAmount,jdbcType=DECIMAL},
#{waitAmount,jdbcType=DECIMAL}, #{paidAmount,jdbcType=DECIMAL}, #{paidAt,jdbcType=BIGINT},
#{type,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopPurveyorTransact">
insert into tb_shop_purveyor_transact
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="shopId != null">
shop_id,
</if>
<if test="purveyorName != null">
purveyor_name,
</if>
<if test="purveyorId != null">
purveyor_id,
</if>
<if test="status != null">
status,
</if>
<if test="remark != null">
remark,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="totalAmount != null">
total_amount,
</if>
<if test="waitAmount != null">
wait_amount,
</if>
<if test="paidAmount != null">
paid_amount,
</if>
<if test="paidAt != null">
paid_at,
</if>
<if test="type != null">
type,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="shopId != null">
#{shopId,jdbcType=VARCHAR},
</if>
<if test="purveyorName != null">
#{purveyorName,jdbcType=VARCHAR},
</if>
<if test="purveyorId != null">
#{purveyorId,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=TINYINT},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=BIGINT},
</if>
<if test="totalAmount != null">
#{totalAmount,jdbcType=DECIMAL},
</if>
<if test="waitAmount != null">
#{waitAmount,jdbcType=DECIMAL},
</if>
<if test="paidAmount != null">
#{paidAmount,jdbcType=DECIMAL},
</if>
<if test="paidAt != null">
#{paidAt,jdbcType=BIGINT},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopPurveyorTransact">
update tb_shop_purveyor_transact
<set>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=VARCHAR},
</if>
<if test="purveyorName != null">
purveyor_name = #{purveyorName,jdbcType=VARCHAR},
</if>
<if test="purveyorId != null">
purveyor_id = #{purveyorId,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=TINYINT},
</if>
<if test="remark != null">
remark = #{remark,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="totalAmount != null">
total_amount = #{totalAmount,jdbcType=DECIMAL},
</if>
<if test="waitAmount != null">
wait_amount = #{waitAmount,jdbcType=DECIMAL},
</if>
<if test="paidAmount != null">
paid_amount = #{paidAmount,jdbcType=DECIMAL},
</if>
<if test="paidAt != null">
paid_at = #{paidAt,jdbcType=BIGINT},
</if>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopPurveyorTransact">
update tb_shop_purveyor_transact
set shop_id = #{shopId,jdbcType=VARCHAR},
purveyor_name = #{purveyorName,jdbcType=VARCHAR},
purveyor_id = #{purveyorId,jdbcType=VARCHAR},
status = #{status,jdbcType=TINYINT},
remark = #{remark,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
total_amount = #{totalAmount,jdbcType=DECIMAL},
wait_amount = #{waitAmount,jdbcType=DECIMAL},
paid_amount = #{paidAmount,jdbcType=DECIMAL},
paid_at = #{paidAt,jdbcType=BIGINT},
type = #{type,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>