| 
					
				 | 
			
			
				@@ -3,55 +3,27 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <mapper namespace="com.yijia.customer.mapper.CustomerGradeSettingMapper"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <resultMap type="CustomerGradeSetting" id="CustomerGradeSettingResult"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result property="id"    column="id"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result property="grade"    column="grade"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <result property="discountWay"    column="discount_way"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <result property="gasoilDiscountLitre"    column="gasoil_discount_litre"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <result property="dieseloilDiscountLitre"    column="dieseloil_discount_litre"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <result property="gradeType"    column="grade_type"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <result property="gasoilConsume"    column="gasoil_consume"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <result property="gasoilGrowthValue"    column="gasoil_growth_value"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <result property="dieseloilConsume"    column="dieseloil_consume"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <result property="dieseloilGrowthValue"    column="dieseloil_growth_value"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <result property="memberRecharge"    column="member_recharge"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <result property="memberGrowthValue"    column="member_growth_value"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <result property="growthValue"    column="growth_value"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <result property="date"    column="date"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <result property="deductionGrowthValue"    column="deduction_growth_value"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <result property="memberCondit"    column="member_condit"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <result property="stationId"    column="station_id"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <result property="stationName"    column="station_name"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result property="oilName"    column="oil_name"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result property="memberConditStart"    column="member_condit_start"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result property="memberConditEnd"    column="member_condit_end"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <result property="discountAmt"    column="discount_amt"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <result property="stationId"    column="station_id"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </resultMap> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <sql id="selectCustomerGradeSettingVo"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        select id, grade, discount_way, gasoil_discount_litre, dieseloil_discount_litre, grade_type, gasoil_consume, gasoil_growth_value, dieseloil_consume, dieseloil_growth_value, member_recharge, member_growth_value, growth_value, date, deduction_growth_value, member_condit, station_id, station_name, oil_name, member_condit_start, member_condit_end from customer_grade_setting 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        select id, grade, discount_amt, station_id, oil_name, member_condit_start, member_condit_end from customer_grade_setting 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </sql> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <select id="selectCustomerGradeSettingList" parameterType="CustomerGradeSetting" resultMap="CustomerGradeSettingResult"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <include refid="selectCustomerGradeSettingVo"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="grade != null  and grade != ''"> and grade = #{grade}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="discountWay != null  and discountWay != ''"> and discount_way = #{discountWay}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="gasoilDiscountLitre != null  and gasoilDiscountLitre != ''"> and gasoil_discount_litre = #{gasoilDiscountLitre}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="dieseloilDiscountLitre != null  and dieseloilDiscountLitre != ''"> and dieseloil_discount_litre = #{dieseloilDiscountLitre}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="gradeType != null  and gradeType != ''"> and grade_type = #{gradeType}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="gasoilConsume != null  and gasoilConsume != ''"> and gasoil_consume = #{gasoilConsume}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="gasoilGrowthValue != null  and gasoilGrowthValue != ''"> and gasoil_growth_value = #{gasoilGrowthValue}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="dieseloilConsume != null  and dieseloilConsume != ''"> and dieseloil_consume = #{dieseloilConsume}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="dieseloilGrowthValue != null  and dieseloilGrowthValue != ''"> and dieseloil_growth_value = #{dieseloilGrowthValue}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="memberRecharge != null  and memberRecharge != ''"> and member_recharge = #{memberRecharge}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="memberGrowthValue != null  and memberGrowthValue != ''"> and member_growth_value = #{memberGrowthValue}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="growthValue != null  and growthValue != ''"> and growth_value = #{growthValue}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="date != null "> and date = #{date}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="deductionGrowthValue != null  and deductionGrowthValue != ''"> and deduction_growth_value = #{deductionGrowthValue}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="memberCondit != null  and memberCondit != ''"> and member_condit = #{memberCondit}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="discountAmt != null  and discountAmt != ''"> and discount_amt = #{discountAmt}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="stationId != null "> and station_id = #{stationId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="stationName != null  and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="oilName != null  and oilName != ''"> and oil_name like concat('%', #{oilName}, '%')</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="memberConditStart != null "> and member_condit_start = #{memberConditStart}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="memberConditEnd != null "> and member_condit_end = #{memberConditEnd}</if> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -70,49 +42,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <include refid="selectCustomerGradeSettingVo"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         where id = #{id} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-         
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <insert id="insertCustomerGradeSetting" parameterType="CustomerGradeSetting" useGeneratedKeys="true" keyProperty="id"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         insert into customer_grade_setting 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <trim prefix="(" suffix=")" suffixOverrides=","> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="grade != null">grade,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="discountWay != null">discount_way,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="gasoilDiscountLitre != null">gasoil_discount_litre,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="dieseloilDiscountLitre != null">dieseloil_discount_litre,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="gradeType != null">grade_type,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="gasoilConsume != null">gasoil_consume,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="gasoilGrowthValue != null">gasoil_growth_value,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="dieseloilConsume != null">dieseloil_consume,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="dieseloilGrowthValue != null">dieseloil_growth_value,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="memberRecharge != null">member_recharge,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="memberGrowthValue != null">member_growth_value,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="growthValue != null">growth_value,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="date != null">date,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="deductionGrowthValue != null">deduction_growth_value,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="memberCondit != null">member_condit,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="discountAmt != null">discount_amt,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="stationId != null">station_id,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="stationName != null">station_name,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="oilName != null">oil_name,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="memberConditStart != null">member_condit_start,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="memberConditEnd != null">member_condit_end,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				          </trim> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <trim prefix="values (" suffix=")" suffixOverrides=","> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="grade != null">#{grade},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="discountWay != null">#{discountWay},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="gasoilDiscountLitre != null">#{gasoilDiscountLitre},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="dieseloilDiscountLitre != null">#{dieseloilDiscountLitre},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="gradeType != null">#{gradeType},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="gasoilConsume != null">#{gasoilConsume},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="gasoilGrowthValue != null">#{gasoilGrowthValue},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="dieseloilConsume != null">#{dieseloilConsume},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="dieseloilGrowthValue != null">#{dieseloilGrowthValue},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="memberRecharge != null">#{memberRecharge},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="memberGrowthValue != null">#{memberGrowthValue},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="growthValue != null">#{growthValue},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="date != null">#{date},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="deductionGrowthValue != null">#{deductionGrowthValue},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="memberCondit != null">#{memberCondit},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="discountAmt != null">discount_amt,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="stationId != null">#{stationId},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="stationName != null">#{stationName},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="oilName != null">#{oilName},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="memberConditStart != null">#{memberConditStart},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="memberConditEnd != null">#{memberConditEnd},</if> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -123,25 +67,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         update customer_grade_setting 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <trim prefix="SET" suffixOverrides=","> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="grade != null">grade = #{grade},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="discountWay != null">discount_way = #{discountWay},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="gasoilDiscountLitre != null">gasoil_discount_litre = #{gasoilDiscountLitre},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="dieseloilDiscountLitre != null">dieseloil_discount_litre = #{dieseloilDiscountLitre},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="gradeType != null">grade_type = #{gradeType},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="gasoilConsume != null">gasoil_consume = #{gasoilConsume},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="gasoilGrowthValue != null">gasoil_growth_value = #{gasoilGrowthValue},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="dieseloilConsume != null">dieseloil_consume = #{dieseloilConsume},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="dieseloilGrowthValue != null">dieseloil_growth_value = #{dieseloilGrowthValue},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="memberRecharge != null">member_recharge = #{memberRecharge},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="memberGrowthValue != null">member_growth_value = #{memberGrowthValue},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="growthValue != null">growth_value = #{growthValue},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="date != null">date = #{date},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="deductionGrowthValue != null">deduction_growth_value = #{deductionGrowthValue},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="memberCondit != null">member_condit = #{memberCondit},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="stationId != null">station_id = #{stationId},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="stationName != null">station_name = #{stationName},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="oilName != null">oil_name = #{oilName},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="memberConditStart != null">member_condit_start = #{memberConditStart},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="memberConditEnd != null">member_condit_end = #{memberConditEnd},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="discountAmt != null">discount_amt = #{discountAmt},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="stationId != null">station_id = #{stationId},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </trim> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         where id = #{id} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </update> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -151,10 +81,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </delete> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <delete id="deleteCustomerGradeSettingByIds" parameterType="String"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        delete from customer_grade_setting where id in  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        delete from customer_grade_setting where id in 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <foreach item="id" collection="array" open="(" separator="," close=")"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             #{id} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </foreach> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </delete> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-</mapper> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+</mapper> 
			 |