فهرست منبع

客户端管理

XF--LRQYEJOKYDS\Administrator 4 سال پیش
والد
کامیت
8b440b6e61

+ 31 - 0
Yijia-SaaS/yijia-customer/pom.xml

@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>yijia</artifactId>
+        <groupId>com.yijia</groupId>
+        <version>1.0.1</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>yijia-customer</artifactId>
+
+    <description>客户管理模块</description>
+
+
+    <dependencies>
+
+        <!-- 通用工具-->
+        <dependency>
+            <groupId>com.yijia</groupId>
+            <artifactId>yijia-common</artifactId>
+        </dependency>
+        <!--定时任务-->
+        <dependency>
+            <groupId>com.yijia</groupId>
+            <artifactId>yijia-quartz</artifactId>
+        </dependency>
+    </dependencies>
+
+</project>

+ 103 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/controller/CustomerGradeSettingController.java

@@ -0,0 +1,103 @@
+package com.yijia.customer.controller;
+
+import java.util.List;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.yijia.common.annotation.Log;
+import com.yijia.common.core.controller.BaseController;
+import com.yijia.common.core.domain.AjaxResult;
+import com.yijia.common.enums.BusinessType;
+import com.yijia.customer.domain.CustomerGradeSetting;
+import com.yijia.customer.service.ICustomerGradeSettingService;
+import com.yijia.common.utils.poi.ExcelUtil;
+import com.yijia.common.core.page.TableDataInfo;
+
+/**
+ * 客户优惠等级设置Controller
+ * 
+ * @author yijia
+ * @date 2020-12-21
+ */
+@RestController
+@RequestMapping("/customer/setting")
+public class CustomerGradeSettingController extends BaseController
+{
+    @Autowired
+    private ICustomerGradeSettingService customerGradeSettingService;
+
+    /**
+     * 查询客户优惠等级设置列表
+     */
+    @PreAuthorize("@ss.hasPermi('customer:setting:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(CustomerGradeSetting customerGradeSetting)
+    {
+        startPage();
+        List<CustomerGradeSetting> list = customerGradeSettingService.selectCustomerGradeSettingList(customerGradeSetting);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出客户优惠等级设置列表
+     */
+    @PreAuthorize("@ss.hasPermi('customer:setting:export')")
+    @Log(title = "客户优惠等级设置", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(CustomerGradeSetting customerGradeSetting)
+    {
+        List<CustomerGradeSetting> list = customerGradeSettingService.selectCustomerGradeSettingList(customerGradeSetting);
+        ExcelUtil<CustomerGradeSetting> util = new ExcelUtil<CustomerGradeSetting>(CustomerGradeSetting.class);
+        return util.exportExcel(list, "setting");
+    }
+
+    /**
+     * 获取客户优惠等级设置详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('customer:setting:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(customerGradeSettingService.selectCustomerGradeSettingById(id));
+    }
+
+    /**
+     * 新增客户优惠等级设置
+     */
+    @PreAuthorize("@ss.hasPermi('customer:setting:add')")
+    @Log(title = "客户优惠等级设置", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody CustomerGradeSetting customerGradeSetting)
+    {
+        return toAjax(customerGradeSettingService.insertCustomerGradeSetting(customerGradeSetting));
+    }
+
+    /**
+     * 修改客户优惠等级设置
+     */
+    @PreAuthorize("@ss.hasPermi('customer:setting:edit')")
+    @Log(title = "客户优惠等级设置", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody CustomerGradeSetting customerGradeSetting)
+    {
+        return toAjax(customerGradeSettingService.updateCustomerGradeSetting(customerGradeSetting));
+    }
+
+    /**
+     * 删除客户优惠等级设置
+     */
+    @PreAuthorize("@ss.hasPermi('customer:setting:remove')")
+    @Log(title = "客户优惠等级设置", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(customerGradeSettingService.deleteCustomerGradeSettingByIds(ids));
+    }
+}

+ 208 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/domain/CustomerGradeSetting.java

@@ -0,0 +1,208 @@
+package com.yijia.customer.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.yijia.common.annotation.Excel;
+import com.yijia.common.core.domain.BaseEntity;
+
+/**
+ * 客户优惠等级设置对象 customer_grade_setting
+ * 
+ * @author yijia
+ * @date 2020-12-21
+ */
+public class CustomerGradeSetting extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 等级 */
+    @Excel(name = "等级")
+    private String grade;
+
+    /** 优惠方式 */
+    @Excel(name = "优惠方式")
+    private String discountWay;
+
+    /** 汽油优惠/L */
+    @Excel(name = "汽油优惠/L")
+    private String gasoilDiscountLitre;
+
+    /** 柴油优惠/L */
+    @Excel(name = "柴油优惠/L")
+    private String dieseloilDiscountLitre;
+
+    /** 1(固态等级设置,2动态等级-成长值规则,3动态等级-会员规则) */
+    @Excel(name = "1(固态等级设置,2动态等级-成长值规则,3动态等级-会员规则)")
+    private String gradeType;
+
+    /** 汽油消费 */
+    @Excel(name = "汽油消费")
+    private String gasoilConsume;
+
+    /** 汽油成长值 */
+    @Excel(name = "汽油成长值")
+    private String gasoilGrowthValue;
+
+    /** 柴油消费 */
+    @Excel(name = "柴油消费")
+    private String dieseloilConsume;
+
+    /** 柴油成长值 */
+    @Excel(name = "柴油成长值")
+    private String dieseloilGrowthValue;
+
+    /** 成长值 */
+    @Excel(name = "成长值")
+    private String growthValue;
+
+    /** 有效期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "有效期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date date;
+
+    /** 到期扣除成长值 */
+    @Excel(name = "到期扣除成长值")
+    private String deductionGrowthValue;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setGrade(String grade) 
+    {
+        this.grade = grade;
+    }
+
+    public String getGrade() 
+    {
+        return grade;
+    }
+    public void setDiscountWay(String discountWay) 
+    {
+        this.discountWay = discountWay;
+    }
+
+    public String getDiscountWay() 
+    {
+        return discountWay;
+    }
+    public void setGasoilDiscountLitre(String gasoilDiscountLitre) 
+    {
+        this.gasoilDiscountLitre = gasoilDiscountLitre;
+    }
+
+    public String getGasoilDiscountLitre() 
+    {
+        return gasoilDiscountLitre;
+    }
+    public void setDieseloilDiscountLitre(String dieseloilDiscountLitre) 
+    {
+        this.dieseloilDiscountLitre = dieseloilDiscountLitre;
+    }
+
+    public String getDieseloilDiscountLitre() 
+    {
+        return dieseloilDiscountLitre;
+    }
+    public void setGradeType(String gradeType) 
+    {
+        this.gradeType = gradeType;
+    }
+
+    public String getGradeType() 
+    {
+        return gradeType;
+    }
+    public void setGasoilConsume(String gasoilConsume) 
+    {
+        this.gasoilConsume = gasoilConsume;
+    }
+
+    public String getGasoilConsume() 
+    {
+        return gasoilConsume;
+    }
+    public void setGasoilGrowthValue(String gasoilGrowthValue) 
+    {
+        this.gasoilGrowthValue = gasoilGrowthValue;
+    }
+
+    public String getGasoilGrowthValue() 
+    {
+        return gasoilGrowthValue;
+    }
+    public void setDieseloilConsume(String dieseloilConsume) 
+    {
+        this.dieseloilConsume = dieseloilConsume;
+    }
+
+    public String getDieseloilConsume() 
+    {
+        return dieseloilConsume;
+    }
+    public void setDieseloilGrowthValue(String dieseloilGrowthValue) 
+    {
+        this.dieseloilGrowthValue = dieseloilGrowthValue;
+    }
+
+    public String getDieseloilGrowthValue() 
+    {
+        return dieseloilGrowthValue;
+    }
+    public void setGrowthValue(String growthValue) 
+    {
+        this.growthValue = growthValue;
+    }
+
+    public String getGrowthValue() 
+    {
+        return growthValue;
+    }
+    public void setDate(Date date) 
+    {
+        this.date = date;
+    }
+
+    public Date getDate() 
+    {
+        return date;
+    }
+    public void setDeductionGrowthValue(String deductionGrowthValue) 
+    {
+        this.deductionGrowthValue = deductionGrowthValue;
+    }
+
+    public String getDeductionGrowthValue() 
+    {
+        return deductionGrowthValue;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("grade", getGrade())
+            .append("discountWay", getDiscountWay())
+            .append("gasoilDiscountLitre", getGasoilDiscountLitre())
+            .append("dieseloilDiscountLitre", getDieseloilDiscountLitre())
+            .append("gradeType", getGradeType())
+            .append("gasoilConsume", getGasoilConsume())
+            .append("gasoilGrowthValue", getGasoilGrowthValue())
+            .append("dieseloilConsume", getDieseloilConsume())
+            .append("dieseloilGrowthValue", getDieseloilGrowthValue())
+            .append("growthValue", getGrowthValue())
+            .append("date", getDate())
+            .append("deductionGrowthValue", getDeductionGrowthValue())
+            .toString();
+    }
+}

+ 61 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/mapper/CustomerGradeSettingMapper.java

@@ -0,0 +1,61 @@
+package com.yijia.customer.mapper;
+
+import java.util.List;
+import com.yijia.customer.domain.CustomerGradeSetting;
+
+/**
+ * 客户优惠等级设置Mapper接口
+ * 
+ * @author yijia
+ * @date 2020-12-21
+ */
+public interface CustomerGradeSettingMapper 
+{
+    /**
+     * 查询客户优惠等级设置
+     * 
+     * @param id 客户优惠等级设置ID
+     * @return 客户优惠等级设置
+     */
+    public CustomerGradeSetting selectCustomerGradeSettingById(Long id);
+
+    /**
+     * 查询客户优惠等级设置列表
+     * 
+     * @param customerGradeSetting 客户优惠等级设置
+     * @return 客户优惠等级设置集合
+     */
+    public List<CustomerGradeSetting> selectCustomerGradeSettingList(CustomerGradeSetting customerGradeSetting);
+
+    /**
+     * 新增客户优惠等级设置
+     * 
+     * @param customerGradeSetting 客户优惠等级设置
+     * @return 结果
+     */
+    public int insertCustomerGradeSetting(CustomerGradeSetting customerGradeSetting);
+
+    /**
+     * 修改客户优惠等级设置
+     * 
+     * @param customerGradeSetting 客户优惠等级设置
+     * @return 结果
+     */
+    public int updateCustomerGradeSetting(CustomerGradeSetting customerGradeSetting);
+
+    /**
+     * 删除客户优惠等级设置
+     * 
+     * @param id 客户优惠等级设置ID
+     * @return 结果
+     */
+    public int deleteCustomerGradeSettingById(Long id);
+
+    /**
+     * 批量删除客户优惠等级设置
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteCustomerGradeSettingByIds(Long[] ids);
+}

+ 61 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/service/ICustomerGradeSettingService.java

@@ -0,0 +1,61 @@
+package com.yijia.customer.service;
+
+import java.util.List;
+import com.yijia.customer.domain.CustomerGradeSetting;
+
+/**
+ * 客户优惠等级设置Service接口
+ * 
+ * @author yijia
+ * @date 2020-12-21
+ */
+public interface ICustomerGradeSettingService 
+{
+    /**
+     * 查询客户优惠等级设置
+     * 
+     * @param id 客户优惠等级设置ID
+     * @return 客户优惠等级设置
+     */
+    public CustomerGradeSetting selectCustomerGradeSettingById(Long id);
+
+    /**
+     * 查询客户优惠等级设置列表
+     * 
+     * @param customerGradeSetting 客户优惠等级设置
+     * @return 客户优惠等级设置集合
+     */
+    public List<CustomerGradeSetting> selectCustomerGradeSettingList(CustomerGradeSetting customerGradeSetting);
+
+    /**
+     * 新增客户优惠等级设置
+     * 
+     * @param customerGradeSetting 客户优惠等级设置
+     * @return 结果
+     */
+    public int insertCustomerGradeSetting(CustomerGradeSetting customerGradeSetting);
+
+    /**
+     * 修改客户优惠等级设置
+     * 
+     * @param customerGradeSetting 客户优惠等级设置
+     * @return 结果
+     */
+    public int updateCustomerGradeSetting(CustomerGradeSetting customerGradeSetting);
+
+    /**
+     * 批量删除客户优惠等级设置
+     * 
+     * @param ids 需要删除的客户优惠等级设置ID
+     * @return 结果
+     */
+    public int deleteCustomerGradeSettingByIds(Long[] ids);
+
+    /**
+     * 删除客户优惠等级设置信息
+     * 
+     * @param id 客户优惠等级设置ID
+     * @return 结果
+     */
+    public int deleteCustomerGradeSettingById(Long id);
+}

+ 63 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/service/ICustomerManageService.java

@@ -0,0 +1,63 @@
+package com.yijia.customer.service;
+
+import java.util.List;
+
+import com.yijia.customer.domain.CustomerManage;
+
+
+/**
+ * 客户管理Service接口
+ * 
+ * @author yijia
+ * @date 2020-12-21
+ */
+public interface ICustomerManageService 
+{
+    /**
+     * 查询客户管理
+     * 
+     * @param id 客户管理ID
+     * @return 客户管理
+     */
+    public CustomerManage selectCustomerManageById(Long id);
+
+    /**
+     * 查询客户管理列表
+     * 
+     * @param customerManage 客户管理
+     * @return 客户管理集合
+     */
+    public List<CustomerManage> selectCustomerManageList(CustomerManage customerManage);
+
+    /**
+     * 新增客户管理
+     * 
+     * @param customerManage 客户管理
+     * @return 结果
+     */
+    public int insertCustomerManage(CustomerManage customerManage);
+
+    /**
+     * 修改客户管理
+     * 
+     * @param customerManage 客户管理
+     * @return 结果
+     */
+    public int updateCustomerManage(CustomerManage customerManage);
+
+    /**
+     * 批量删除客户管理
+     * 
+     * @param ids 需要删除的客户管理ID
+     * @return 结果
+     */
+    public int deleteCustomerManageByIds(Long[] ids);
+
+    /**
+     * 删除客户管理信息
+     * 
+     * @param id 客户管理ID
+     * @return 结果
+     */
+    public int deleteCustomerManageById(Long id);
+}

+ 93 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/service/impl/CustomerGradeSettingServiceImpl.java

@@ -0,0 +1,93 @@
+package com.yijia.customer.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.yijia.customer.mapper.CustomerGradeSettingMapper;
+import com.yijia.customer.domain.CustomerGradeSetting;
+import com.yijia.customer.service.ICustomerGradeSettingService;
+
+/**
+ * 客户优惠等级设置Service业务层处理
+ * 
+ * @author yijia
+ * @date 2020-12-21
+ */
+@Service
+public class CustomerGradeSettingServiceImpl implements ICustomerGradeSettingService 
+{
+    @Autowired
+    private CustomerGradeSettingMapper customerGradeSettingMapper;
+
+    /**
+     * 查询客户优惠等级设置
+     * 
+     * @param id 客户优惠等级设置ID
+     * @return 客户优惠等级设置
+     */
+    @Override
+    public CustomerGradeSetting selectCustomerGradeSettingById(Long id)
+    {
+        return customerGradeSettingMapper.selectCustomerGradeSettingById(id);
+    }
+
+    /**
+     * 查询客户优惠等级设置列表
+     * 
+     * @param customerGradeSetting 客户优惠等级设置
+     * @return 客户优惠等级设置
+     */
+    @Override
+    public List<CustomerGradeSetting> selectCustomerGradeSettingList(CustomerGradeSetting customerGradeSetting)
+    {
+        return customerGradeSettingMapper.selectCustomerGradeSettingList(customerGradeSetting);
+    }
+
+    /**
+     * 新增客户优惠等级设置
+     * 
+     * @param customerGradeSetting 客户优惠等级设置
+     * @return 结果
+     */
+    @Override
+    public int insertCustomerGradeSetting(CustomerGradeSetting customerGradeSetting)
+    {
+        return customerGradeSettingMapper.insertCustomerGradeSetting(customerGradeSetting);
+    }
+
+    /**
+     * 修改客户优惠等级设置
+     * 
+     * @param customerGradeSetting 客户优惠等级设置
+     * @return 结果
+     */
+    @Override
+    public int updateCustomerGradeSetting(CustomerGradeSetting customerGradeSetting)
+    {
+        return customerGradeSettingMapper.updateCustomerGradeSetting(customerGradeSetting);
+    }
+
+    /**
+     * 批量删除客户优惠等级设置
+     * 
+     * @param ids 需要删除的客户优惠等级设置ID
+     * @return 结果
+     */
+    @Override
+    public int deleteCustomerGradeSettingByIds(Long[] ids)
+    {
+        return customerGradeSettingMapper.deleteCustomerGradeSettingByIds(ids);
+    }
+
+    /**
+     * 删除客户优惠等级设置信息
+     * 
+     * @param id 客户优惠等级设置ID
+     * @return 结果
+     */
+    @Override
+    public int deleteCustomerGradeSettingById(Long id)
+    {
+        return customerGradeSettingMapper.deleteCustomerGradeSettingById(id);
+    }
+}

+ 95 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/service/impl/CustomerManageServiceImpl.java

@@ -0,0 +1,95 @@
+package com.yijia.customer.service.impl;
+
+
+import com.yijia.customer.domain.CustomerManage;
+import com.yijia.customer.mapper.CustomerManageMapper;
+import com.yijia.customer.service.ICustomerManageService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 客户管理Service业务层处理
+ * 
+ * @author yijia
+ * @date 2020-12-21
+ */
+@Service
+public class CustomerManageServiceImpl implements ICustomerManageService
+{
+    @Autowired
+    private CustomerManageMapper customerManageMapper;
+
+    /**
+     * 查询客户管理
+     * 
+     * @param id 客户管理ID
+     * @return 客户管理
+     */
+    @Override
+    public CustomerManage selectCustomerManageById(Long id)
+    {
+        return customerManageMapper.selectCustomerManageById(id);
+    }
+
+    /**
+     * 查询客户管理列表
+     * 
+     * @param customerManage 客户管理
+     * @return 客户管理
+     */
+    @Override
+    public List<CustomerManage> selectCustomerManageList(CustomerManage customerManage)
+    {
+        return customerManageMapper.selectCustomerManageList(customerManage);
+    }
+
+    /**
+     * 新增客户管理
+     * 
+     * @param customerManage 客户管理
+     * @return 结果
+     */
+    @Override
+    public int insertCustomerManage(CustomerManage customerManage)
+    {
+        return customerManageMapper.insertCustomerManage(customerManage);
+    }
+
+    /**
+     * 修改客户管理
+     * 
+     * @param customerManage 客户管理
+     * @return 结果
+     */
+    @Override
+    public int updateCustomerManage(CustomerManage customerManage)
+    {
+        return customerManageMapper.updateCustomerManage(customerManage);
+    }
+
+    /**
+     * 批量删除客户管理
+     * 
+     * @param ids 需要删除的客户管理ID
+     * @return 结果
+     */
+    @Override
+    public int deleteCustomerManageByIds(Long[] ids)
+    {
+        return customerManageMapper.deleteCustomerManageByIds(ids);
+    }
+
+    /**
+     * 删除客户管理信息
+     * 
+     * @param id 客户管理ID
+     * @return 结果
+     */
+    @Override
+    public int deleteCustomerManageById(Long id)
+    {
+        return customerManageMapper.deleteCustomerManageById(id);
+    }
+}

+ 114 - 0
Yijia-SaaS/yijia-customer/src/main/resources/mapper/customer/CustomerGradeSettingMapper.xml

@@ -0,0 +1,114 @@
+<?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.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="growthValue"    column="growth_value"    />
+        <result property="date"    column="date"    />
+        <result property="deductionGrowthValue"    column="deduction_growth_value"    />
+    </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, growth_value, date, deduction_growth_value 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="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>
+        </where>
+    </select>
+    
+    <select id="selectCustomerGradeSettingById" parameterType="Long" resultMap="CustomerGradeSettingResult">
+        <include refid="selectCustomerGradeSettingVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertCustomerGradeSetting" parameterType="CustomerGradeSetting">
+        insert into customer_grade_setting
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <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="growthValue != null">growth_value,</if>
+            <if test="date != null">date,</if>
+            <if test="deductionGrowthValue != null">deduction_growth_value,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <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="growthValue != null">#{growthValue},</if>
+            <if test="date != null">#{date},</if>
+            <if test="deductionGrowthValue != null">#{deductionGrowthValue},</if>
+         </trim>
+    </insert>
+
+    <update id="updateCustomerGradeSetting" parameterType="CustomerGradeSetting">
+        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="growthValue != null">growth_value = #{growthValue},</if>
+            <if test="date != null">date = #{date},</if>
+            <if test="deductionGrowthValue != null">deduction_growth_value = #{deductionGrowthValue},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteCustomerGradeSettingById" parameterType="Long">
+        delete from customer_grade_setting where id = #{id}
+    </delete>
+
+    <delete id="deleteCustomerGradeSettingByIds" parameterType="String">
+        delete from customer_grade_setting where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+    
+</mapper>