zhangback
2025-12-16 ca98866230c89e247bf4b93222c07cea0437ff20
tms/src/main/resources/mapper/tms/TmsQuoteItemMapper.xml
@@ -8,6 +8,7 @@
        <result property="id"    column="id"    />
        <result property="quotePlanId"    column="quote_plan_id"    />
        <result property="freeName"    column="free_name"    />
        <result property="free"    column="free"    />
        <result property="unit"    column="unit"    />
        <result property="price"    column="price"    />
        <result property="currency"    column="currency"    />
@@ -16,7 +17,7 @@
    </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
        select thisTab.id, thisTab.quote_plan_id, thisTab.free_name,thisTab.free, 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
@@ -27,6 +28,7 @@
        <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="free != null "> and thisTab.free = #{free}</if>
        <if test="currency != null  and currency != ''"> and thisTab.currency = #{currency}</if>
 </sql>
@@ -62,10 +64,12 @@
            <if test="currency != null">currency,</if>
            <if test="createTime != null">create_time,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="free != null">free,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="quotePlanId != null">#{quotePlanId},</if>
            <if test="freeName != null and freeName != ''">#{freeName},</if>
            <if test="free != null ">#{free},</if>
            <if test="unit != null">#{unit},</if>
            <if test="price != null">#{price},</if>
            <if test="currency != null">#{currency},</if>
@@ -78,11 +82,11 @@
    <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,
            id,quote_plan_id,free_name,unit,price,currency,free,
        </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},
                #{item.id},#{item.quotePlanId},#{item.freeName},#{item.unit},#{item.price},#{item.currency},#{item.free},
            </trim>
        </foreach>
    </insert>
@@ -98,6 +102,7 @@
            <if test="currency != null">currency = #{currency},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="free != null">free = #{free},</if>
        </trim>
        where id = #{id}
    </update>
@@ -113,6 +118,7 @@
                <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>
                <if test="item.free != null">free = #{item.free},</if>
            </trim>
        where id = #{item.id}
        </foreach>