Parcourir la source

修改积分规则设置,积分明细设置

MS-QJVSRANLTYEO\Administrator il y a 4 ans
Parent
commit
28fca0604b

+ 22 - 5
yijia-integral/src/main/java/com/yijia/integral/controller/IntegralRuleController.java

@@ -91,7 +91,6 @@ public class IntegralRuleController extends BaseController
             integralRule.setStationId(null);
         }
         IntegralRule rule = integralRuleService.selectIntegralRule(integralRule);
-
         return AjaxResult.success(rule);
     }
     /**
@@ -146,11 +145,29 @@ public class IntegralRuleController extends BaseController
     public AjaxResult edit(@RequestBody IntegralRule integralRule)
     {
         LoginUser currentUser = SecurityUtils.getLoginUser();
-        integralRule.setStationId(currentUser.getUser().getDeptId());
-        if(integralRule!=null && integralRule.getIntegralActivity()==null){
-            integralRule.setIntegralActivity("0");
+        int i =0;
+        if(integralRule!=null&&integralRule.getIntegralFlag()!=null && !integralRule.getIntegralFlag().equals("")){
+            if(integralRule.getIntegralFlag().equals("1")){
+                SysDept dept =new SysDept();
+                dept.setDeptId(currentUser.getUser().getDeptId());
+                dept.setIntegralFlag(integralRule.getIntegralFlag());
+                integralRule.setStationId(currentUser.getUser().getDeptId());
+                i = sysDeptService.updateDept(dept);
+                if(integralRule!=null && integralRule.getIntegralActivity()==null){
+                    integralRule.setIntegralActivity("0");
+                    integralRule.setDatePickerTime("");
+                    i= integralRuleService.updateIntegralRule(integralRule);
+                }else if(integralRule!=null){
+                    i= integralRuleService.updateIntegralRule(integralRule);
+                }
+            }else if(integralRule.getIntegralFlag().equals("0")){
+                SysDept dept =new SysDept();
+                dept.setDeptId(currentUser.getUser().getDeptId());
+                dept.setIntegralFlag(integralRule.getIntegralFlag());
+                i= sysDeptService.updateDept(dept);
+            }
         }
-        return toAjax(integralRuleService.updateIntegralRule(integralRule));
+        return toAjax(i);
     }
 
     /**

+ 5 - 5
yijia-integral/src/main/java/com/yijia/integral/domain/IntegralRule.java

@@ -57,7 +57,7 @@ public class IntegralRule extends BaseEntity
     private BigDecimal ruleTerms;
     private String ruleType;
     /** 会员等级 */
-    private String gread;
+    private String grade;
     /** 油品名称 */
     private String oilName;
     /** 每消费金额 */
@@ -85,12 +85,12 @@ public class IntegralRule extends BaseEntity
         this.ruleTerms = ruleTerms;
     }
 
-    public String getGread() {
-        return gread;
+    public String getGrade() {
+        return grade;
     }
 
-    public void setGread(String gread) {
-        this.gread = gread;
+    public void setGrade(String grade) {
+        this.grade = grade;
     }
 
     public String getOilName() {

+ 30 - 21
yijia-integral/src/main/java/com/yijia/integral/domain/IntegralRuleDetail.java

@@ -1,6 +1,10 @@
 package com.yijia.integral.domain;
 
 import java.math.BigDecimal;
+import java.util.List;
+
+import com.yijia.customer.domain.CustomerGradeSetting;
+import com.yijia.station.domain.StationOilPrice;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.yijia.common.annotation.Excel;
@@ -27,13 +31,9 @@ public class IntegralRuleDetail extends BaseEntity
     @Excel(name = "规则满足条件", readConverterExp = "满=足多少升,多少元")
     private BigDecimal ruleTerms;
 
-    /** 等级主键id */
-    @Excel(name = "等级主键id")
-    private Long greadId;
-
     /** 会员等级 */
     @Excel(name = "会员等级")
-    private String gread;
+    private String grade;
 
     /** 油品名称 */
     @Excel(name = "油品名称")
@@ -50,6 +50,25 @@ public class IntegralRuleDetail extends BaseEntity
     /** 规则类型 */
     @Excel(name = "规则类型")
     private String ruleType;
+    private String oilType;
+
+    private List<CustomerGradeSetting> gradeList;
+
+    public List<CustomerGradeSetting> getGradeList() {
+        return gradeList;
+    }
+
+    public void setGradeList(List<CustomerGradeSetting> gradeList) {
+        this.gradeList = gradeList;
+    }
+
+    public String getOilType() {
+        return oilType;
+    }
+
+    public void setOilType(String oilType) {
+        this.oilType = oilType;
+    }
 
     public void setId(Long id)
     {
@@ -78,24 +97,15 @@ public class IntegralRuleDetail extends BaseEntity
     {
         return ruleTerms;
     }
-    public void setGreadId(Long greadId)
-    {
-        this.greadId = greadId;
-    }
 
-    public Long getGreadId()
-    {
-        return greadId;
-    }
-    public void setGread(String gread)
-    {
-        this.gread = gread;
+    public String getGrade() {
+        return grade;
     }
 
-    public String getGread()
-    {
-        return gread;
+    public void setGrade(String grade) {
+        this.grade = grade;
     }
+
     public void setOilName(String oilName)
     {
         this.oilName = oilName;
@@ -139,8 +149,7 @@ public class IntegralRuleDetail extends BaseEntity
             .append("id", getId())
             .append("parentId", getParentId())
             .append("ruleTerms", getRuleTerms())
-            .append("greadId", getGreadId())
-            .append("gread", getGread())
+            .append("grade", getGrade())
             .append("oilName", getOilName())
             .append("saleAmt", getSaleAmt())
             .append("integral", getIntegral())

+ 46 - 18
yijia-integral/src/main/java/com/yijia/integral/service/impl/IntegralRuleServiceImpl.java

@@ -6,10 +6,16 @@ import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.List;
 
+import com.yijia.common.core.domain.model.LoginUser;
+import com.yijia.common.utils.SecurityUtils;
+import com.yijia.customer.domain.CustomerGradeSetting;
+import com.yijia.customer.mapper.CustomerGradeSettingMapper;
 import com.yijia.integral.domain.IntegralRuleDetail;
 import com.yijia.integral.domain.IntegralShopPic;
 import com.yijia.integral.mapper.IntegralRuleDetailMapper;
 import com.yijia.integral.mapper.IntegralShopPicMapper;
+import com.yijia.station.domain.StationOilPrice;
+import com.yijia.station.mapper.StationOilPriceMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.yijia.integral.mapper.IntegralRuleMapper;
@@ -31,6 +37,8 @@ public class IntegralRuleServiceImpl implements IIntegralRuleService
     private IntegralRuleDetailMapper integralRuleDetailMapper;
     @Autowired
     private IntegralShopPicMapper integralShopPicMapper;
+    @Autowired
+    private CustomerGradeSettingMapper customerGradeSettingMapper;
     /**
      * 查询积分规则
      *
@@ -80,14 +88,14 @@ public class IntegralRuleServiceImpl implements IIntegralRuleService
     @Override
     public int insertIntegralRule(IntegralRule integralRule)
     {
-
-        try {
-            if(integralRule !=null && integralRule.getTermDateManage()!=null && integralRule.getTermDateManage().equals("1")){
-                SimpleDateFormat sdf =   new SimpleDateFormat( "yyyy-MM-dd");
-                integralRule.setEmptyDate(sdf.parse("2099-12-31") );
-            }
-        } catch (ParseException e) {
-            e.printStackTrace();
+        if(integralRule.getIntegralProportion()==null){
+            integralRule.setIntegralProportion("1");
+        }
+        if(integralRule.getDatePickerTime()==null){
+            integralRule.setDatePickerTime("");
+        }
+        if(integralRule.getDatePicker()==null){
+            integralRule.setDatePicker("");
         }
         int i =integralRuleMapper.insertIntegralRule(integralRule);
       //  IntegralRule rule=  integralRuleMapper.insertIntegralRule(integralRule);
@@ -148,14 +156,6 @@ public class IntegralRuleServiceImpl implements IIntegralRuleService
                 integralShopPicMapper.insertIntegralShopPic(img);
             }
         }
-        try {
-            if(integralRule !=null && integralRule.getTermDateManage()!=null && integralRule.getTermDateManage().equals("1")){
-                SimpleDateFormat sdf =   new SimpleDateFormat( "yyyy-MM-dd");
-                integralRule.setEmptyDate(sdf.parse("2099-12-31") );
-            }
-        } catch (ParseException e) {
-            e.printStackTrace();
-        }
         return  integralRuleMapper.updateIntegralRule(integralRule);
     }
 
@@ -192,9 +192,27 @@ public class IntegralRuleServiceImpl implements IIntegralRuleService
     public IntegralRule selectIntegralRule(IntegralRule integralRule) {
         IntegralRule rule = integralRuleMapper.selectIntegralRule(integralRule);
         if(rule!=null){
+            LoginUser currentUser = SecurityUtils.getLoginUser();
             IntegralRuleDetail  detail  = new  IntegralRuleDetail();
             detail.setParentId(rule.getId());
             List<IntegralRuleDetail> list =  integralRuleDetailMapper.selectIntegralRuleDetailList(detail);
+            if(list!=null && list.size()>0){
+                for(IntegralRuleDetail ruleDetail:list){
+                    //查询油站的油品信息
+                    if(ruleDetail.getOilName()!=null && !ruleDetail.getOilName().equals("")){
+                        //查询当前油品对应的所有的等级
+                        CustomerGradeSetting  customerGradeSetting =new CustomerGradeSetting();
+                        customerGradeSetting.setDelFlag("0");
+                        customerGradeSetting.setStationId(currentUser.getUser().getDeptId());
+                        customerGradeSetting.setOilName(ruleDetail.getOilName());
+                        List<CustomerGradeSetting> greadList = customerGradeSettingMapper.selectCustomerGradeSettingList(customerGradeSetting);
+                        ruleDetail.setGradeList(greadList);
+                    }
+                }
+            }else{
+                IntegralRuleDetail integralRuleDetail = new IntegralRuleDetail();
+                list.add(integralRuleDetail);
+            }
             rule.setItemsDetail(list);
             //查询图片信息
             IntegralShopPic shopPic =new IntegralShopPic();
@@ -202,9 +220,19 @@ public class IntegralRuleServiceImpl implements IIntegralRuleService
             List<IntegralShopPic> shopPicList = integralShopPicMapper.selectIntegralShopPicList(shopPic);
             rule.setImgFileList(shopPicList);
         }else{
-            List<IntegralRuleDetail> list =new ArrayList<>();
+            rule =new IntegralRule();
+            rule.setIntegralFlag("0");
+            rule.setIntegralActivity("0");
+            rule.setIntegralProportion("1");
+            rule.setIntegralTermSetting("1");
+            rule.setTermDateManage("1");
+            List<IntegralRuleDetail> list = new ArrayList<IntegralRuleDetail>();
+            IntegralRuleDetail integralRuleDetail = new IntegralRuleDetail();
+            list.add(integralRuleDetail);
             rule.setItemsDetail(list);
-            List<IntegralShopPic> shopPicList =new ArrayList<>();
+            List<IntegralShopPic> shopPicList = new ArrayList<IntegralShopPic>();
+//            IntegralShopPic pic =new IntegralShopPic();
+//            shopPicList.add(pic);
             rule.setImgFileList(shopPicList);
         }
         return rule;

+ 12 - 14
yijia-integral/src/main/resources/mapper/integral/IntegralOrderMapper.xml

@@ -3,7 +3,7 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.yijia.integral.mapper.IntegralOrderMapper">
-    
+
     <resultMap type="IntegralOrder" id="IntegralOrderResult">
         <result property="id"    column="id"    />
         <result property="integralOrderNo"    column="integral_order_no"    />
@@ -23,13 +23,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectIntegralOrderVo">
-        select id, integral_order_no, wares_type, wares_name, wares_id, union_id, customer_name, exchange_num, exchange_time, status, integral, station_id, station_name,mobile_phone from integral_order
+        select id, integral_order_no, wares_type, wares_name, wares_id, union_id, customer_name, exchange_num, exchange_time,
+         p.status, integral, station_id,d.dept_name as station_name,mobile_phone
+         from integral_order p join  sys_dept d on p.station_id =d.dept_id
     </sql>
 
     <select id="selectIntegralOrderList" parameterType="IntegralOrder" resultMap="IntegralOrderResult">
         <include refid="selectIntegralOrderVo"/>
-        <where>  
-            <if test="integralOrderNo != null  and integralOrderNo != ''"> and integral_order_no = #{integralOrderNo}</if>
+        <where>
+            <if test="integralOrderNo != null  and integralOrderNo != ''"> and integral_order_no like concat('%', #{integralOrderNo}, '%')</if>
             <if test="waresType != null  and waresType != ''"> and wares_type = #{waresType}</if>
             <if test="waresName != null  and waresName != ''"> and wares_name like concat('%', #{waresName}, '%')</if>
             <if test="waresId != null "> and wares_id = #{waresId}</if>
@@ -37,11 +39,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="customerName != null  and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
             <if test="exchangeNum != null "> and exchange_num = #{exchangeNum}</if>
             <if test="exchangeTime != null "> and exchange_time = #{exchangeTime}</if>
-            <if test="status != null  and status != ''"> and status = #{status}</if>
+            <if test="status != null  and status != ''"> and p.status = #{status}</if>
             <if test="integral != null "> and integral = #{integral}</if>
             <if test="stationId != null "> and station_id = #{stationId}</if>
             <if test="mobilePhone != null "> and mobile_phone = #{mobilePhone}</if>
-            <if test="stationName != null  and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
             <if test="stationIdList != null ">
                 and station_id in
                 <foreach item="item" index="index" collection="stationIdList"
@@ -52,12 +53,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
         order by  id desc
     </select>
-    
+
     <select id="selectIntegralOrderById" parameterType="Long" resultMap="IntegralOrderResult">
         <include refid="selectIntegralOrderVo"/>
         where id = #{id}
     </select>
-        
+
     <insert id="insertIntegralOrder" parameterType="IntegralOrder" useGeneratedKeys="true" keyProperty="id">
         insert into integral_order
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -72,7 +73,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="status != null">status,</if>
             <if test="integral != null">integral,</if>
             <if test="stationId != null">station_id,</if>
-            <if test="stationName != null">station_name,</if>
             <if test="mobilePhone != null "> mobile_phone,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -87,7 +87,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="status != null">#{status},</if>
             <if test="integral != null">#{integral},</if>
             <if test="stationId != null">#{stationId},</if>
-            <if test="stationName != null">#{stationName},</if>
             <if test="mobilePhone != null">#{mobilePhone},</if>
          </trim>
     </insert>
@@ -106,7 +105,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="status != null">status = #{status},</if>
             <if test="integral != null">integral = #{integral},</if>
             <if test="stationId != null">station_id = #{stationId},</if>
-            <if test="stationName != null">station_name = #{stationName},</if>
             <if test="mobilePhone != null "> mobile_phone = #{mobilePhone},</if>
         </trim>
         where id = #{id}
@@ -117,10 +115,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deleteIntegralOrderByIds" parameterType="String">
-        delete from integral_order where id in 
+        delete from integral_order where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>
     </delete>
-    
-</mapper>
+
+</mapper>

+ 9 - 15
yijia-integral/src/main/resources/mapper/integral/IntegralRuleDetailMapper.xml

@@ -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>

+ 7 - 10
yijia-integral/src/main/resources/mapper/integral/IntegralRuleMapper.xml

@@ -17,7 +17,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="datePickerTime"    column="date_picker_time"    />
         <result property="integralTermSetting"    column="integral_term_setting"    />
         <result property="ruleTerms"    column="rule_terms"    />
-        <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"    />
@@ -27,12 +27,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="createTime"    column="create_time"    />
         <result property="updateBy"    column="update_by"    />
         <result property="updateTime"    column="update_time"    />
+        <result property="integralFlag"    column="integral_flag"    />
     </resultMap>
 
     <sql id="selectIntegralRuleVo">
        select id, station_id,d.dept_name as station_name, rule_type, term_date_manage, empty_date, integral_activity,
         date_picker, integral_proportion,date_picker_time,integral_term_setting,r.create_by,r.create_time,
-        r.update_by,r.update_time
+        r.update_by,r.update_time,d.integral_flag
         from integral_rule r join sys_dept d on r.station_id =d.dept_id
     </sql>
 
@@ -45,9 +46,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="termDateManage != null  and termDateManage != ''"> and term_date_manage = #{termDateManage}</if>
             <if test="emptyDate != null "> and empty_date = #{emptyDate}</if>
             <if test="integralActivity != null  and integralActivity != ''"> and integral_activity = #{integralActivity}</if>
-            <if test="datePicker != null  and datePicker != ''"> and date_picker = #{datePicker}</if>
-            <if test="integralProportion != null  and integralProportion != ''"> and integral_proportion = #{integralProportion}</if>
-            <if test="datePickerTime != null  and datePickerTime != ''"> and date_picker_time = #{datePickerTime}</if>
+            <if test="datePicker != null"> and date_picker = #{datePicker}</if>
+            <if test="integralProportion != null  "> and integral_proportion = #{integralProportion}</if>
+            <if test="datePickerTime != null "> and date_picker_time = #{datePickerTime}</if>
             <if test="integralTermSetting != null  and integralTermSetting != ''"> and integral_term_setting = #{integralTermSetting}</if>
             <if test="stationIdList != null ">
                 and station_id in
@@ -89,14 +90,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="ruleType != null">#{ruleType},</if>
             <if test="termDateManage != null">#{termDateManage},</if>
             <if test="emptyDate != null">#{emptyDate},</if>
-            <if test="expirationReminder != null">#{expirationReminder},</if>
-            <if test="remindDate != null">#{remindDate},</if>
             <if test="integralActivity != null">#{integralActivity},</if>
             <if test="datePicker != null">#{datePicker},</if>
             <if test="integralProportion != null">#{integralProportion},</if>
-            <if test="integralDeductionOil != null">#{integralDeductionOil},</if>
             <if test="datePickerTime != null">#{datePickerTime},</if>
-            <if test="integralEmptyTime != null">#{integralEmptyTime},</if>
             <if test="integralTermSetting != null">#{integralTermSetting},</if>
             <if test="createBy != null">#{createBy},</if>
             <if test="createTime != null">#{createTime},</if>
@@ -162,7 +159,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="listRuleInfo" parameterType="IntegralRule" resultMap="IntegralRuleResult">
         SELECT a.station_id,d.dept_name as station_name,a.term_date_manage,a.integral_activity,empty_date,date_picker,integral_proportion,
-        b.rule_type,rule_terms,gread,
+        b.rule_type,rule_terms,grade,
         oil_name,sale_amt,integral,oil_type,c.integral_flag
         from integral_rule a
         join integral_rule_detail b on a.id =b.parent_id