<?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.TmsQuoteFeeMapper">
|
|
<resultMap type="com.ruoyi.tms.domain.TmsQuoteFee" id="TmsQuoteFeeResult">
|
<result property="id" column="id" />
|
<result property="dispatchId" column="dispatch_id" />
|
<result property="free" column="free" />
|
<result property="freeName" column="free_name" />
|
<result property="price" column="price" />
|
<result property="currency" column="currency" />
|
<result property="count" column="count" />
|
<result property="sum" column="sum" />
|
<result property="isYF" column="is_yf" />
|
<result property="serviceProviderId" column="service_provider_id" />
|
<result property="serviceProviderType" column="service_provider_type" />
|
<result property="isCZYF" column="is_cz_yf" />
|
<result property="yfId" column="yf_id" />
|
<result property="yfPrice" column="yf_price" />
|
<result property="yfCount" column="yf_count" />
|
<result property="yfSum" column="yf_sum" />
|
<result property="yfCurrency" column="yf_currency" />
|
<result property="createTime" column="create_time" />
|
<result property="updateTime" column="update_time" />
|
</resultMap>
|
|
<sql id="selectTmsQuoteFeeVo">
|
select thisTab.id, thisTab.dispatch_id, thisTab.free, thisTab.free_name, thisTab.price, thisTab.currency, thisTab.count, thisTab.sum, thisTab.is_yf, thisTab.service_provider_id, thisTab.service_provider_type, thisTab.is_cz_yf, thisTab.yf_id, thisTab.yf_price, thisTab.yf_count, thisTab.yf_sum, thisTab.yf_currency, thisTab.create_time, thisTab.update_time from tms_quote_fee AS thisTab
|
</sql>
|
<sql id="selectTmsQuoteFeeVoCount">
|
select count(0) from tms_quote_fee as thisTab
|
</sql>
|
|
<sql id="whereCondition">
|
<if test="dispatchId != null "> and thisTab.dispatch_id = #{dispatchId}</if>
|
<if test="free != null and free != ''"> and thisTab.free = #{free}</if>
|
<if test="freeName != null and freeName != ''"> and thisTab.free_name like concat('%', #{freeName}, '%')</if>
|
<if test="price != null "> and thisTab.price = #{price}</if>
|
<if test="currency != null and currency != ''"> and thisTab.currency = #{currency}</if>
|
<if test="count != null "> and thisTab.count = #{count}</if>
|
<if test="sum != null "> and thisTab.sum = #{sum}</if>
|
<if test="isYF != null "> and thisTab.is_yf = #{isYF}</if>
|
<if test="serviceProviderId != null "> and thisTab.service_provider_id = #{serviceProviderId}</if>
|
<if test="serviceProviderType != null and serviceProviderType != ''"> and thisTab.service_provider_type = #{serviceProviderType}</if>
|
<if test="isCZYF != null "> and thisTab.is_cz_yf = #{isCZYF}</if>
|
<if test="yfId != null "> and thisTab.yf_id = #{yfId}</if>
|
<if test="yfPrice != null "> and thisTab.yf_price = #{yfPrice}</if>
|
<if test="yfCount != null "> and thisTab.yf_count = #{yfCount}</if>
|
<if test="yfSum != null "> and thisTab.yf_sum = #{yfSum}</if>
|
<if test="yfCurrency != null and yfCurrency != ''"> and thisTab.yf_currency = #{yfCurrency}</if>
|
</sql>
|
|
<!--查询-->
|
<select id="selectTmsQuoteFeeById" parameterType="Integer" resultMap="TmsQuoteFeeResult">
|
<include refid="selectTmsQuoteFeeVo"/>
|
where id = #{id}
|
</select>
|
|
<select id="selectTmsQuoteFeeCount" parameterType="com.ruoyi.tms.domain.TmsQuoteFee" resultType="int">
|
<include refid="selectTmsQuoteFeeVoCount"/>
|
<where>
|
<include refid="whereCondition"/>
|
</where>
|
</select>
|
|
<select id="selectTmsQuoteFeeList" parameterType="com.ruoyi.tms.domain.TmsQuoteFee" resultMap="TmsQuoteFeeResult">
|
<include refid="selectTmsQuoteFeeVo"/>
|
<where>
|
<include refid="whereCondition"/>
|
</where>
|
order by thisTab.id desc
|
</select>
|
|
<!-- 新增 -->
|
<insert id="insertTmsQuoteFee" parameterType="com.ruoyi.tms.domain.TmsQuoteFee" useGeneratedKeys="true" keyProperty="id">
|
insert into tms_quote_fee
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="dispatchId != null">dispatch_id,</if>
|
<if test="free != null">free,</if>
|
<if test="freeName != null">free_name,</if>
|
<if test="price != null">price,</if>
|
<if test="currency != null">currency,</if>
|
<if test="count != null">count,</if>
|
<if test="sum != null">sum,</if>
|
<if test="isYF != null">is_yf,</if>
|
<if test="serviceProviderId != null">service_provider_id,</if>
|
<if test="serviceProviderType != null">service_provider_type,</if>
|
<if test="isCZYF != null">is_cz_yf,</if>
|
<if test="yfId != null">yf_id,</if>
|
<if test="yfPrice != null">yf_price,</if>
|
<if test="yfCount != null">yf_count,</if>
|
<if test="yfSum != null">yf_sum,</if>
|
<if test="yfCurrency != null">yf_currency,</if>
|
<if test="createTime != null">create_time,</if>
|
<if test="updateTime != null">update_time,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="dispatchId != null">#{dispatchId},</if>
|
<if test="free != null">#{free},</if>
|
<if test="freeName != null">#{freeName},</if>
|
<if test="price != null">#{price},</if>
|
<if test="currency != null">#{currency},</if>
|
<if test="count != null">#{count},</if>
|
<if test="sum != null">#{sum},</if>
|
<if test="isYF != null">#{isYF},</if>
|
<if test="serviceProviderId != null">#{serviceProviderId},</if>
|
<if test="serviceProviderType != null">#{serviceProviderType},</if>
|
<if test="isCZYF != null">#{isCZYF},</if>
|
<if test="yfId != null">#{yfId},</if>
|
<if test="yfPrice != null">#{yfPrice},</if>
|
<if test="yfCount != null">#{yfCount},</if>
|
<if test="yfSum != null">#{yfSum},</if>
|
<if test="yfCurrency != null">#{yfCurrency},</if>
|
<if test="createTime != null">#{createTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
</trim>
|
</insert>
|
|
<insert id="insertTmsQuoteFeeBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
insert into tms_quote_fee
|
<trim prefix="(" suffix=") values" suffixOverrides=",">
|
id,dispatch_id,free,free_name,price,currency,count,sum,is_yf,service_provider_id,service_provider_type,is_cz_yf,yf_id,yf_price,yf_count,yf_sum,yf_currency,create_time,update_time,
|
</trim>
|
<foreach item="item" index="index" collection="list" separator=",">
|
<trim prefix="(" suffix=") " suffixOverrides=",">
|
#{item.id},#{item.dispatchId},#{item.free},#{item.freeName},#{item.price},#{item.currency},#{item.count},#{item.sum},#{item.isYF},#{item.serviceProviderId},#{item.serviceProviderType},#{item.isCZYF},#{item.yfId},#{item.yfPrice},#{item.yfCount},#{item.yfSum},#{item.yfCurrency},#{item.createTime},#{item.updateTime},
|
</trim>
|
</foreach>
|
</insert>
|
|
<!-- 修改 -->
|
<update id="updateTmsQuoteFee" parameterType="com.ruoyi.tms.domain.TmsQuoteFee">
|
update tms_quote_fee
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="dispatchId != null">dispatch_id = #{dispatchId},</if>
|
<if test="free != null">free = #{free},</if>
|
<if test="freeName != null">free_name = #{freeName},</if>
|
<if test="price != null">price = #{price},</if>
|
<if test="currency != null">currency = #{currency},</if>
|
<if test="count != null">count = #{count},</if>
|
<if test="sum != null">sum = #{sum},</if>
|
<if test="isYF != null">is_yf = #{isYF},</if>
|
service_provider_id = #{serviceProviderId},
|
service_provider_type = #{serviceProviderType},
|
is_cz_yf = #{isCZYF},
|
yf_id = #{yfId},
|
yf_price = #{yfPrice},
|
yf_count = #{yfCount},
|
yf_sum = #{yfSum},
|
yf_currency = #{yfCurrency},
|
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
<!-- 修改 -->
|
<update id="updateTmsQuoteFeeBatch" parameterType="java.util.List">
|
<foreach collection="list" item="item" index="index" separator=";">
|
update tms_quote_fee
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="item.dispatchId != null">dispatch_id = #{item.dispatchId},</if>
|
<if test="item.free != null">free = #{item.free},</if>
|
<if test="item.freeName != null">free_name = #{item.freeName},</if>
|
<if test="item.price != null">price = #{item.price},</if>
|
<if test="item.currency != null">currency = #{item.currency},</if>
|
<if test="item.count != null">count = #{item.count},</if>
|
<if test="item.sum != null">sum = #{item.sum},</if>
|
<if test="item.isYF != null">is_yf = #{item.isYF},</if>
|
<if test="item.serviceProviderId != null">service_provider_id = #{item.serviceProviderId},</if>
|
<if test="item.serviceProviderType != null">service_provider_type = #{item.serviceProviderType},</if>
|
<if test="item.isCZYF != null">is_cz_yf = #{item.isCZYF},</if>
|
<if test="item.yfId != null">yf_id = #{item.yfId},</if>
|
<if test="item.yfPrice != null">yf_price = #{item.yfPrice},</if>
|
<if test="item.yfCount != null">yf_count = #{item.yfCount},</if>
|
<if test="item.yfSum != null">yf_sum = #{item.yfSum},</if>
|
<if test="item.yfCurrency != null">yf_currency = #{item.yfCurrency},</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="deleteTmsQuoteFeeById" parameterType="Integer">
|
delete from tms_quote_fee where id = #{id}
|
</delete>
|
<delete id="deleteTmsQuoteFeeByIds" parameterType="Integer">
|
delete from tms_quote_fee where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
|
</mapper>
|