| 
					
				 | 
			
			
				@@ -8,8 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result property="id"    column="id"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result property="parentId"    column="parent_id"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result property="ruleTerms"    column="rule_terms"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <result property="greadId"    column="gread_id"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <result property="gread"    column="gread"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <result property="grade"    column="grade"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result property="oilName"    column="oil_name"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result property="saleAmt"    column="sale_amt"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result property="integral"    column="integral"    /> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -18,23 +17,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </resultMap> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <sql id="selectIntegralRuleDetailVo"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        select id, parent_id, rule_terms, gread_id, gread, oil_name, sale_amt, integral, rule_type from integral_rule_detail 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        select id, parent_id, rule_terms, grade, oil_name, sale_amt, integral, rule_type from integral_rule_detail 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </sql> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <select id="selectIntegralRuleDetailList" parameterType="IntegralRuleDetail" resultMap="IntegralRuleDetailResult"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <include refid="selectIntegralRuleDetailVo"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        select id, parent_id, rule_terms,grade, oil_name, sale_amt, integral, rule_type , d.dict_value as oil_type 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        from integral_rule_detail r join sys_dict_data d on r.oil_name = d.dict_label and dict_type = "oil_name" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="parentId != null "> and parent_id = #{parentId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="ruleTerms != null "> and rule_terms = #{ruleTerms}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="greadId != null "> and gread_id = #{greadId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="gread != null  and gread != ''"> and gread = #{gread}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="grade != null  and grade != ''"> and grade = #{grade}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="oilName != null  and oilName != ''"> and oil_name like concat('%', #{oilName}, '%')</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="saleAmt != null "> and sale_amt = #{saleAmt}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="integral != null "> and integral = #{integral}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="ruleType != null  and ruleType != ''"> and rule_type = #{ruleType}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <select id="selectIntegralRuleDetailById" parameterType="Long" resultMap="IntegralRuleDetailResult"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <include refid="selectIntegralRuleDetailVo"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         where id = #{id} 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -45,8 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <trim prefix="(" suffix=")" suffixOverrides=","> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="parentId != null">parent_id,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="ruleTerms != null">rule_terms,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="greadId != null">gread_id,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="gread != null">gread,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="grade != null">grade,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="oilName != null">oil_name,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="saleAmt != null">sale_amt,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="integral != null">integral,</if> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -55,8 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <trim prefix="values (" suffix=")" suffixOverrides=","> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="parentId != null">#{parentId},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="ruleTerms != null">#{ruleTerms},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="greadId != null">#{greadId},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="gread != null">#{gread},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="grade != null">#{grade},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="oilName != null">#{oilName},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="saleAmt != null">#{saleAmt},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="integral != null">#{integral},</if> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -69,8 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <trim prefix="SET" suffixOverrides=","> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="parentId != null">parent_id = #{parentId},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="ruleTerms != null">rule_terms = #{ruleTerms},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="greadId != null">gread_id = #{greadId},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="gread != null">gread = #{gread},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="grade!= null">grade = #{grade},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="oilName != null">oil_name = #{oilName},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="saleAmt != null">sale_amt = #{saleAmt},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="integral != null">integral = #{integral},</if> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -94,8 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="parentId != null "> and parent_id = #{parentId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="ruleTerms != null "> and rule_terms = #{ruleTerms}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="greadId != null "> and gread_id = #{greadId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="gread != null  and gread != ''"> and gread = #{gread}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="grade != null  and grade != ''"> and grade = #{grade}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="oilName != null  and oilName != ''"> and oil_name like concat('%', #{oilName}, '%')</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="saleAmt != null "> and sale_amt = #{saleAmt}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="integral != null "> and integral = #{integral}</if> 
			 |