From e2aa651db9f17d58819329de571037edc0f9eba2 Mon Sep 17 00:00:00 2001
From: yaowanxin <3588231647@qq.com>
Date: 星期一, 23 六月 2025 18:13:37 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/main/resources/mapper/StockInMapper.xml |  130 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 130 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/StockInMapper.xml b/src/main/resources/mapper/StockInMapper.xml
new file mode 100644
index 0000000..3aa07c7
--- /dev/null
+++ b/src/main/resources/mapper/StockInMapper.xml
@@ -0,0 +1,130 @@
+<?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="inventory.mapper.StockInMapper">
+
+    <resultMap id="BaseResultMap" type="inventory.domain.StockIn">
+            <id property="id" column="id" jdbcType="INTEGER"/>
+            <result property="productId" column="product_id" jdbcType="INTEGER"/>
+            <result property="inboundTime" column="inbound_time" jdbcType="TIMESTAMP"/>
+            <result property="inboundBatch" column="inbound_batch" jdbcType="VARCHAR"/>
+            <result property="supplierName" column="supplier_name" jdbcType="VARCHAR"/>
+            <result property="inboundQuantity" column="inbound_quantity" jdbcType="INTEGER"/>
+            <result property="taxInclusivePrice" column="tax_inclusive_price" jdbcType="DECIMAL"/>
+            <result property="taxInclusiveTotal" column="tax_inclusive_total" jdbcType="DECIMAL"/>
+            <result property="taxRate" column="tax_rate" jdbcType="DECIMAL"/>
+            <result property="taxExclusiveTotal" column="tax_exclusive_total" jdbcType="DECIMAL"/>
+            <result property="inboundPerson" column="inbound_person" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,product_id,inbound_time,
+        inbound_batch,supplier_name,inbound_quantity,
+        tax_inclusive_price,tax_inclusive_total,tax_rate,
+        tax_exclusive_total,inbound_person
+    </sql>
+
+    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+        select
+        <include refid="Base_Column_List" />
+        from stock_in
+        where  id = #{id,jdbcType=INTEGER} 
+    </select>
+
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+        delete from stock_in
+        where  id = #{id,jdbcType=INTEGER} 
+    </delete>
+    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="inventory.domain.StockIn" useGeneratedKeys="true">
+        insert into stock_in
+        ( id,product_id,inbound_time
+        ,inbound_batch,supplier_name,inbound_quantity
+        ,tax_inclusive_price,tax_inclusive_total,tax_rate
+        ,tax_exclusive_total,inbound_person)
+        values (#{id,jdbcType=INTEGER},#{productId,jdbcType=INTEGER},#{inboundTime,jdbcType=TIMESTAMP}
+        ,#{inboundBatch,jdbcType=VARCHAR},#{supplierName,jdbcType=VARCHAR},#{inboundQuantity,jdbcType=INTEGER}
+        ,#{taxInclusivePrice,jdbcType=DECIMAL},#{taxInclusiveTotal,jdbcType=DECIMAL},#{taxRate,jdbcType=DECIMAL}
+        ,#{taxExclusiveTotal,jdbcType=DECIMAL},#{inboundPerson,jdbcType=VARCHAR})
+    </insert>
+    <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="inventory.domain.StockIn" useGeneratedKeys="true">
+        insert into stock_in
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+                <if test="id != null">id,</if>
+                <if test="productId != null">product_id,</if>
+                <if test="inboundTime != null">inbound_time,</if>
+                <if test="inboundBatch != null">inbound_batch,</if>
+                <if test="supplierName != null">supplier_name,</if>
+                <if test="inboundQuantity != null">inbound_quantity,</if>
+                <if test="taxInclusivePrice != null">tax_inclusive_price,</if>
+                <if test="taxInclusiveTotal != null">tax_inclusive_total,</if>
+                <if test="taxRate != null">tax_rate,</if>
+                <if test="taxExclusiveTotal != null">tax_exclusive_total,</if>
+                <if test="inboundPerson != null">inbound_person,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+                <if test="id != null">#{id,jdbcType=INTEGER},</if>
+                <if test="productId != null">#{productId,jdbcType=INTEGER},</if>
+                <if test="inboundTime != null">#{inboundTime,jdbcType=TIMESTAMP},</if>
+                <if test="inboundBatch != null">#{inboundBatch,jdbcType=VARCHAR},</if>
+                <if test="supplierName != null">#{supplierName,jdbcType=VARCHAR},</if>
+                <if test="inboundQuantity != null">#{inboundQuantity,jdbcType=INTEGER},</if>
+                <if test="taxInclusivePrice != null">#{taxInclusivePrice,jdbcType=DECIMAL},</if>
+                <if test="taxInclusiveTotal != null">#{taxInclusiveTotal,jdbcType=DECIMAL},</if>
+                <if test="taxRate != null">#{taxRate,jdbcType=DECIMAL},</if>
+                <if test="taxExclusiveTotal != null">#{taxExclusiveTotal,jdbcType=DECIMAL},</if>
+                <if test="inboundPerson != null">#{inboundPerson,jdbcType=VARCHAR},</if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="inventory.domain.StockIn">
+        update stock_in
+        <set>
+                <if test="productId != null">
+                    product_id = #{productId,jdbcType=INTEGER},
+                </if>
+                <if test="inboundTime != null">
+                    inbound_time = #{inboundTime,jdbcType=TIMESTAMP},
+                </if>
+                <if test="inboundBatch != null">
+                    inbound_batch = #{inboundBatch,jdbcType=VARCHAR},
+                </if>
+                <if test="supplierName != null">
+                    supplier_name = #{supplierName,jdbcType=VARCHAR},
+                </if>
+                <if test="inboundQuantity != null">
+                    inbound_quantity = #{inboundQuantity,jdbcType=INTEGER},
+                </if>
+                <if test="taxInclusivePrice != null">
+                    tax_inclusive_price = #{taxInclusivePrice,jdbcType=DECIMAL},
+                </if>
+                <if test="taxInclusiveTotal != null">
+                    tax_inclusive_total = #{taxInclusiveTotal,jdbcType=DECIMAL},
+                </if>
+                <if test="taxRate != null">
+                    tax_rate = #{taxRate,jdbcType=DECIMAL},
+                </if>
+                <if test="taxExclusiveTotal != null">
+                    tax_exclusive_total = #{taxExclusiveTotal,jdbcType=DECIMAL},
+                </if>
+                <if test="inboundPerson != null">
+                    inbound_person = #{inboundPerson,jdbcType=VARCHAR},
+                </if>
+        </set>
+        where   id = #{id,jdbcType=INTEGER} 
+    </update>
+    <update id="updateByPrimaryKey" parameterType="inventory.domain.StockIn">
+        update stock_in
+        set 
+            product_id =  #{productId,jdbcType=INTEGER},
+            inbound_time =  #{inboundTime,jdbcType=TIMESTAMP},
+            inbound_batch =  #{inboundBatch,jdbcType=VARCHAR},
+            supplier_name =  #{supplierName,jdbcType=VARCHAR},
+            inbound_quantity =  #{inboundQuantity,jdbcType=INTEGER},
+            tax_inclusive_price =  #{taxInclusivePrice,jdbcType=DECIMAL},
+            tax_inclusive_total =  #{taxInclusiveTotal,jdbcType=DECIMAL},
+            tax_rate =  #{taxRate,jdbcType=DECIMAL},
+            tax_exclusive_total =  #{taxExclusiveTotal,jdbcType=DECIMAL},
+            inbound_person =  #{inboundPerson,jdbcType=VARCHAR}
+        where   id = #{id,jdbcType=INTEGER} 
+    </update>
+</mapper>

--
Gitblit v1.9.3