| | |
| | | <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" /> |
| | |
| | | </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 |
| | |
| | | <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> |
| | | </sql> |
| | | |
| | | <!--查询--> |
| | | <select id="selectTmsQuoteItemById" parameterType="Integer" resultMap="TmsQuoteItemResult"> |
| | |
| | | <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> |
| | | <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, |
| | | 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> |
| | |
| | | <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> |
| | |
| | | <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> |