| 
														
															@@ -21,17 +21,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         <result property="createTime"    column="create_time"  /> 
														 | 
														
														 | 
														
															         <result property="createTime"    column="create_time"  /> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         <result property="updateBy"    column="update_by"    /> 
														 | 
														
														 | 
														
															         <result property="updateBy"    column="update_by"    /> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         <result property="updateTime"    column="update_time"    /> 
														 | 
														
														 | 
														
															         <result property="updateTime"    column="update_time"    /> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        <result property="discountSettingFlag"    column="discount_setting_flag"    /> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        <result property="discountType"    column="discount_type" /> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        <result property="discountDate"    column="discount_date" /> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        <result property="discountActivityAmt"    column="discount_activity_amt"/> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     </resultMap> 
														 | 
														
														 | 
														
															     </resultMap> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     <sql id="selectMarkertPlanVo"> 
														 | 
														
														 | 
														
															     <sql id="selectMarkertPlanVo"> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															        select p.id, p.grade, p.discount_term, p.discount_amt, p.gasoil_discount_amt, p.vip_discounty_plus, p.coupon_plus, p.discount_plan_type, 
														 | 
														
														 | 
														
															        select p.id, p.grade, p.discount_term, p.discount_amt, p.gasoil_discount_amt, p.vip_discounty_plus, p.coupon_plus, p.discount_plan_type, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-         p.oil_name, p.station_id,d.dept_name as station_name, p.status,p.create_by,p.create_time,p.update_by,p.update_time 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+         p.oil_name, p.station_id,d.dept_name as station_name, p.status,p.create_by,p.create_time,p.update_by,p.update_time, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+         p.discount_setting_flag,p.discount_type,p.discount_date,p.discount_activity_amt 
														 | 
													
												
											
												
													
														| 
														 | 
														
															           from markert_plan p join sys_dept d on p.station_id = d.dept_id 
														 | 
														
														 | 
														
															           from markert_plan p join sys_dept d on p.station_id = d.dept_id 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     </sql> 
														 | 
														
														 | 
														
															     </sql> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     <select id="selectMarkertPlanList" parameterType="MarkertPlan" resultMap="MarkertPlanResult"> 
														 | 
														
														 | 
														
															     <select id="selectMarkertPlanList" parameterType="MarkertPlan" resultMap="MarkertPlanResult"> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         select  p.id,  p.grade, p.discount_term,  p.discount_amt,  p.gasoil_discount_amt, p.vip_discounty_plus, p.coupon_plus, p.discount_plan_type, 
														 | 
														
														 | 
														
															         select  p.id,  p.grade, p.discount_term,  p.discount_amt,  p.gasoil_discount_amt, p.vip_discounty_plus, p.coupon_plus, p.discount_plan_type, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        p.oil_name, station_id, p.status,p.create_by,p.create_time,p.update_by,p.update_time,d.dept_name as station_name 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        p.oil_name, station_id, p.status,p.create_by,p.create_time,p.update_by,p.update_time,d.dept_name as station_name, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        p.discount_setting_flag,p.discount_type,p.discount_date,p.discount_activity_amt 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         from markert_plan p join sys_dept d on  d.dept_id =p.station_id 
														 | 
														
														 | 
														
															         from markert_plan p join sys_dept d on  d.dept_id =p.station_id 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         <where> 
														 | 
														
														 | 
														
															         <where> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="grade != null  and grade != ''"> and p.grade = #{grade}</if> 
														 | 
														
														 | 
														
															             <if test="grade != null  and grade != ''"> and p.grade = #{grade}</if> 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -56,7 +62,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     <select id="selectMarkertPlanById" parameterType="Long" resultMap="MarkertPlanResult"> 
														 | 
														
														 | 
														
															     <select id="selectMarkertPlanById" parameterType="Long" resultMap="MarkertPlanResult"> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															           select  p.id,  p.grade, p.discount_term,  p.discount_amt,  p.gasoil_discount_amt, p.vip_discounty_plus, p.coupon_plus, p.discount_plan_type, 
														 | 
														
														 | 
														
															           select  p.id,  p.grade, p.discount_term,  p.discount_amt,  p.gasoil_discount_amt, p.vip_discounty_plus, p.coupon_plus, p.discount_plan_type, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-          p.oil_name, station_id, p.status,p.create_by,p.create_time,p.update_by,p.update_time,d.dept_name as station_name 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+          p.oil_name, station_id, p.status,p.create_by,p.create_time,p.update_by,p.update_time,d.dept_name as station_name, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+          p.discount_setting_flag,p.discount_type,p.discount_date,p.discount_activity_amt 
														 | 
													
												
											
												
													
														| 
														 | 
														
															           from markert_plan p join sys_dept d on  d.dept_id =p.station_id 
														 | 
														
														 | 
														
															           from markert_plan p join sys_dept d on  d.dept_id =p.station_id 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         where id = #{id} 
														 | 
														
														 | 
														
															         where id = #{id} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     </select> 
														 | 
														
														 | 
														
															     </select> 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -78,6 +85,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="createTime != null">create_time,</if> 
														 | 
														
														 | 
														
															             <if test="createTime != null">create_time,</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="updateBy != null">update_by,</if> 
														 | 
														
														 | 
														
															             <if test="updateBy != null">update_by,</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="updateTime != null">update_time,</if> 
														 | 
														
														 | 
														
															             <if test="updateTime != null">update_time,</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            <if test="discountSettingFlag != null">discount_setting_flag,</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            <if test="discountType != null">discount_type,</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            <if test="discountDate != null">discount_date,</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            <if test="discountActivityAmt != null">discount_activity_amt,</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															          </trim> 
														 | 
														
														 | 
														
															          </trim> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         <trim prefix="values (" suffix=")" suffixOverrides=","> 
														 | 
														
														 | 
														
															         <trim prefix="values (" suffix=")" suffixOverrides=","> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="grade != null">#{grade},</if> 
														 | 
														
														 | 
														
															             <if test="grade != null">#{grade},</if> 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -94,6 +105,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="createTime != null">#{createTime},</if> 
														 | 
														
														 | 
														
															             <if test="createTime != null">#{createTime},</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="updateBy != null">#{updateBy},</if> 
														 | 
														
														 | 
														
															             <if test="updateBy != null">#{updateBy},</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="updateTime != null">#{updateTime},</if> 
														 | 
														
														 | 
														
															             <if test="updateTime != null">#{updateTime},</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            <if test="discountSettingFlag != null">#{discountSettingFlag},</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            <if test="discountType != null">#{discountType},</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            <if test="discountDate != null">#{discountDate},</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            <if test="discountActivityAmt != null">#{discountActivityAmt},</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															          </trim> 
														 | 
														
														 | 
														
															          </trim> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     </insert> 
														 | 
														
														 | 
														
															     </insert> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -114,6 +129,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="createTime != null">create_time = #{createTime},</if> 
														 | 
														
														 | 
														
															             <if test="createTime != null">create_time = #{createTime},</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="updateBy != null">update_by = #{updateBy},</if> 
														 | 
														
														 | 
														
															             <if test="updateBy != null">update_by = #{updateBy},</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             <if test="updateTime != null">update_time = #{updateTime},</if> 
														 | 
														
														 | 
														
															             <if test="updateTime != null">update_time = #{updateTime},</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            <if test="discountSettingFlag != null">discount_setting_flag = #{discountSettingFlag},</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            <if test="discountType != null">discount_type=#{discountType},</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            <if test="discountDate != null">discount_date =#{discountDate},</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            <if test="discountActivityAmt != null">discount_activity_amt = #{discountActivityAmt},</if> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         </trim> 
														 | 
														
														 | 
														
															         </trim> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         where id = #{id} 
														 | 
														
														 | 
														
															         where id = #{id} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     </update> 
														 | 
														
														 | 
														
															     </update> 
														 |