<?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.jeeplus.modules.sg.overheadline.mapper.FeeAdjustMapper">

	<select id="getTzFee" parameterType="com.jeeplus.modules.sg.overheadline.entity.JkxlAdjustFee" resultType="com.jeeplus.modules.sg.overheadline.entity.JkxlAdjustFee">
		select id,type,fee from sg_fee_adjust_jkxl
		<where>
			<if test="type != null and type != ''">
				type = #{type} and
			</if>
			id = #{id}
		</where>
		order by type
	</select>

	<update id="updateTzFee" parameterType="com.jeeplus.modules.sg.overheadline.entity.JkxlAdjustFee">
		update sg_fee_adjust_jkxl set fee = #{fee}
		<where>
			<if test="type != null and type != ''">
				type = #{type} and
			</if>
			id = #{id}
		</where>
	</update>

	<insert id="saveTzFee" parameterType="com.jeeplus.modules.sg.overheadline.entity.JkxlAdjustFee">
		insert into sg_fee_adjust_jkxl
		(
		 id,
		 type,
		 fee
		)values (
		#{id},
		#{type},
		#{fee}
		)
	</insert>

	<delete id="delete" parameterType="String">
		delete  from  sg_fee_adjust_jkxl
		<where>
			id = #{id}
		</where>
	</delete>
</mapper>