From 3849263b31a16a91ff08acaa42786ecfde76f33c Mon Sep 17 00:00:00 2001
From: zhangback <zhangback@163.com>
Date: 星期四, 27 十一月 2025 20:18:08 +0800
Subject: [PATCH] 提交
---
tms/src/main/resources/mapper/tms/TmsQuoteItemMapper.xml | 131 +++++++++++++++++++++++++++++++++++++++++++
1 files changed, 131 insertions(+), 0 deletions(-)
diff --git a/tms/src/main/resources/mapper/tms/TmsQuoteItemMapper.xml b/tms/src/main/resources/mapper/tms/TmsQuoteItemMapper.xml
new file mode 100644
index 0000000..d1c509e
--- /dev/null
+++ b/tms/src/main/resources/mapper/tms/TmsQuoteItemMapper.xml
@@ -0,0 +1,131 @@
+<?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.ruoyi.tms.mapper.TmsQuoteItemMapper">
+
+ <resultMap type="com.ruoyi.tms.domain.TmsQuoteItem" id="TmsQuoteItemResult">
+ <result property="id" column="id" />
+ <result property="quotePlanId" column="quote_plan_id" />
+ <result property="freeName" column="free_name" />
+ <result property="unit" column="unit" />
+ <result property="price" column="price" />
+ <result property="currency" column="currency" />
+ <result property="createTime" column="create_time" />
+ <result property="updateTime" column="update_time" />
+ </resultMap>
+
+ <sql id="selectTmsQuoteItemVo">
+ select thisTab.id, thisTab.quote_plan_id, thisTab.free_name, thisTab.unit, thisTab.price, thisTab.currency, thisTab.create_time, thisTab.update_time from tms_quote_item AS thisTab
+ </sql>
+ <sql id="selectTmsQuoteItemVoCount">
+ select count(0) from tms_quote_item as thisTab
+ </sql>
+
+ <sql id="whereCondition">
+ <if test="quotePlanId != null "> and thisTab.quote_plan_id = #{quotePlanId}</if>
+ <if test="freeName != null and freeName != ''"> and thisTab.free_name like concat('%', #{freeName}, '%')</if>
+ <if test="unit != null and unit != ''"> and thisTab.unit = #{unit}</if>
+ <if test="price != null "> and thisTab.price = #{price}</if>
+ <if test="currency != null and currency != ''"> and thisTab.currency = #{currency}</if>
+ </sql>
+
+ <!--鏌ヨ-->
+ <select id="selectTmsQuoteItemById" parameterType="Integer" resultMap="TmsQuoteItemResult">
+ <include refid="selectTmsQuoteItemVo"/>
+ where id = #{id}
+ </select>
+
+ <select id="selectTmsQuoteItemCount" parameterType="com.ruoyi.tms.domain.TmsQuoteItem" resultType="int">
+ <include refid="selectTmsQuoteItemVoCount"/>
+ <where>
+ <include refid="whereCondition"/>
+ </where>
+ </select>
+
+ <select id="selectTmsQuoteItemList" parameterType="com.ruoyi.tms.domain.TmsQuoteItem" resultMap="TmsQuoteItemResult">
+ <include refid="selectTmsQuoteItemVo"/>
+ <where>
+ <include refid="whereCondition"/>
+ </where>
+ order by thisTab.id desc
+ </select>
+
+ <!-- 鏂板 -->
+ <insert id="insertTmsQuoteItem" parameterType="com.ruoyi.tms.domain.TmsQuoteItem" useGeneratedKeys="true" keyProperty="id">
+ insert into tms_quote_item
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="quotePlanId != null">quote_plan_id,</if>
+ <if test="freeName != null and freeName != ''">free_name,</if>
+ <if test="unit != null">unit,</if>
+ <if test="price != null">price,</if>
+ <if test="currency != null">currency,</if>
+ <if test="createTime != null">create_time,</if>
+ <if test="updateTime != null">update_time,</if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="quotePlanId != null">#{quotePlanId},</if>
+ <if test="freeName != null and freeName != ''">#{freeName},</if>
+ <if test="unit != null">#{unit},</if>
+ <if test="price != null">#{price},</if>
+ <if test="currency != null">#{currency},</if>
+ <if test="createTime != null">#{createTime},</if>
+ <if test="updateTime != null">#{updateTime},</if>
+ </trim>
+ </insert>
+
+ <insert id="insertTmsQuoteItemBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
+ insert into tms_quote_item
+ <trim prefix="(" suffix=") values" suffixOverrides=",">
+ id,quote_plan_id,free_name,unit,price,currency,
+ </trim>
+ <foreach item="item" index="index" collection="list" separator=",">
+ <trim prefix="(" suffix=") " suffixOverrides=",">
+ #{item.id},#{item.quotePlanId},#{item.freeName},#{item.unit},#{item.price},#{item.currency},
+ </trim>
+ </foreach>
+ </insert>
+
+ <!-- 淇敼 -->
+ <update id="updateTmsQuoteItem" parameterType="com.ruoyi.tms.domain.TmsQuoteItem">
+ update tms_quote_item
+ <trim prefix="SET" suffixOverrides=",">
+ <if test="quotePlanId != null">quote_plan_id = #{quotePlanId},</if>
+ <if test="freeName != null and freeName != ''">free_name = #{freeName},</if>
+ <if test="unit != null">unit = #{unit},</if>
+ <if test="price != null">price = #{price},</if>
+ <if test="currency != null">currency = #{currency},</if>
+ <if test="createTime != null">create_time = #{createTime},</if>
+ <if test="updateTime != null">update_time = #{updateTime},</if>
+ </trim>
+ where id = #{id}
+ </update>
+ <!-- 淇敼 -->
+ <update id="updateTmsQuoteItemBatch" parameterType="java.util.List">
+ <foreach collection="list" item="item" index="index" separator=";">
+ update tms_quote_item
+ <trim prefix="SET" suffixOverrides=",">
+ <if test="item.quotePlanId != null">quote_plan_id = #{item.quotePlanId},</if>
+ <if test="item.freeName != null and item.freeName != ''">free_name = #{item.freeName},</if>
+ <if test="item.unit != null">unit = #{item.unit},</if>
+ <if test="item.price != null">price = #{item.price},</if>
+ <if test="item.currency != null">currency = #{item.currency},</if>
+ <if test="item.createTime != null">create_time = #{item.createTime},</if>
+ <if test="item.updateTime != null">update_time = #{item.updateTime},</if>
+ </trim>
+ where id = #{item.id}
+ </foreach>
+ </update>
+
+ <!--鍒犻櫎-->
+ <delete id="deleteTmsQuoteItemById" parameterType="Integer">
+ delete from tms_quote_item where id = #{id}
+ </delete>
+ <delete id="deleteTmsQuoteItemByIds" parameterType="Integer">
+ delete from tms_quote_item where id in
+ <foreach item="id" collection="array" open="(" separator="," close=")">
+ #{id}
+ </foreach>
+ </delete>
+
+</mapper>
\ No newline at end of file
--
Gitblit v1.8.0