瀏覽代碼

整合数据库字段,客户表,

zangguocen 4 年之前
父節點
當前提交
44b6707b21

+ 0 - 16
yijia-customer/src/main/java/com/yijia/customer/controller/CustomerCardRecordConsumptionController.java

@@ -157,22 +157,6 @@ public class CustomerCardRecordConsumptionController extends BaseController
     /**
      * 获取客户电子会员卡消费汇总折线图充值数据
      */
-    @GetMapping(value = "/listXFData")
-    public AjaxResult listXFData(CustomerCardRecordConsumption customerCardRecordConsumption)
-    {
-        if(customerCardRecordConsumption!=null &&customerCardRecordConsumption.getStationId()!=null){
-            SysDept dept =new SysDept();
-            dept.setDeptId(Long.valueOf(customerCardRecordConsumption.getStationId()));
-            List<String> list = deptService.selectDeptId(dept);
-            customerCardRecordConsumption.setStationIdList(list);
-            customerCardRecordConsumption.setStationId(null);
-        }
-        customerCardRecordConsumption.setStatus("1");
-        return AjaxResult.success(customerCardRecordConsumptionService.listXFData(customerCardRecordConsumption));
-    }
-    /**
-     * 获取客户电子会员卡消费汇总折线图充值数据
-     */
     @GetMapping(value = "/listQydataXF")
     public TableDataInfo listQydataXF(CustomerCardRecordConsumption customerCardRecordConsumption)
     {

+ 17 - 0
yijia-customer/src/main/java/com/yijia/customer/controller/CustomerCardUseRecordController.java

@@ -5,6 +5,7 @@ import java.util.List;
 import com.yijia.common.core.domain.entity.SysDept;
 import com.yijia.common.core.domain.model.LoginUser;
 import com.yijia.common.utils.SecurityUtils;
+import com.yijia.customer.domain.CustomerCardRecordConsumption;
 import com.yijia.system.service.ISysDeptService;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -61,6 +62,22 @@ public class CustomerCardUseRecordController extends BaseController
     }
 
     /**
+     * 查询客户充值/消费记录汇总
+     */
+    @GetMapping(value = "/listCZXFData")
+    public AjaxResult listCZXFData(CustomerCardUseRecord customerCardUseRecord)
+    {
+        LoginUser currentUser = SecurityUtils.getLoginUser();
+        SysDept dept =new SysDept();
+        dept.setDeptId(currentUser.getUser().getDeptId());
+        List<String> list = sysDeptService.selectDeptId(dept);
+        if(list!=null && list.size()>0){
+            customerCardUseRecord.setStationIdList(list);
+            customerCardUseRecord.setStationId(null);
+        }
+        return AjaxResult.success(customerCardUseRecordService.listCZXFData(customerCardUseRecord));
+    }
+    /**
      * 导出客户电子会员卡充值消费记录列表
      */
     @Log(title = "客户电子会员卡充值消费记录", businessType = BusinessType.EXPORT)

+ 48 - 30
yijia-customer/src/main/java/com/yijia/customer/domain/CustomerCardUseRecord.java

@@ -8,7 +8,7 @@ import com.yijia.common.core.domain.BaseEntity;
 
 /**
  * 客户电子会员卡充值消费记录对象 customer_card_use_record
- * 
+ *
  * @author yijia
  * @date 2021-05-18
  */
@@ -71,129 +71,148 @@ public class CustomerCardUseRecord extends BaseEntity
     @Excel(name = "是否充值或者消费成功:0,未成功;1,成功")
     private String status;
 
-    public void setId(Long id) 
+    private String czAmt;
+    private String xfAmt;
+
+    public String getCzAmt() {
+        return czAmt;
+    }
+
+    public void setCzAmt(String czAmt) {
+        this.czAmt = czAmt;
+    }
+
+    public String getXfAmt() {
+        return xfAmt;
+    }
+
+    public void setXfAmt(String xfAmt) {
+        this.xfAmt = xfAmt;
+    }
+
+    public void setId(Long id)
     {
         this.id = id;
     }
 
-    public Long getId() 
+    public Long getId()
     {
         return id;
     }
-    public void setOrderNo(String orderNo) 
+    public void setOrderNo(String orderNo)
     {
         this.orderNo = orderNo;
     }
 
-    public String getOrderNo() 
+    public String getOrderNo()
     {
         return orderNo;
     }
-    public void setUnionId(String unionId) 
+    public void setUnionId(String unionId)
     {
         this.unionId = unionId;
     }
 
-    public String getUnionId() 
+    public String getUnionId()
     {
         return unionId;
     }
-    public void setCustomerNo(String customerNo) 
+    public void setCustomerNo(String customerNo)
     {
         this.customerNo = customerNo;
     }
 
-    public String getCustomerNo() 
+    public String getCustomerNo()
     {
         return customerNo;
     }
-    public void setCustomerName(String customerName) 
+    public void setCustomerName(String customerName)
     {
         this.customerName = customerName;
     }
 
-    public String getCustomerName() 
+    public String getCustomerName()
     {
         return customerName;
     }
-    public void setUsageType(String usageType) 
+    public void setUsageType(String usageType)
     {
         this.usageType = usageType;
     }
 
-    public String getUsageType() 
+    public String getUsageType()
     {
         return usageType;
     }
-    public void setPayType(String payType) 
+    public void setPayType(String payType)
     {
         this.payType = payType;
     }
 
-    public String getPayType() 
+    public String getPayType()
     {
         return payType;
     }
-    public void setCardOilsType(String cardOilsType) 
+    public void setCardOilsType(String cardOilsType)
     {
         this.cardOilsType = cardOilsType;
     }
 
-    public String getCardOilsType() 
+    public String getCardOilsType()
     {
         return cardOilsType;
     }
-    public void setAmt(BigDecimal amt) 
+    public void setAmt(BigDecimal amt)
     {
         this.amt = amt;
     }
 
-    public BigDecimal getAmt() 
+    public BigDecimal getAmt()
     {
         return amt;
     }
-    public void setPresentAmt(BigDecimal presentAmt) 
+    public void setPresentAmt(BigDecimal presentAmt)
     {
         this.presentAmt = presentAmt;
     }
 
-    public BigDecimal getPresentAmt() 
+    public BigDecimal getPresentAmt()
     {
         return presentAmt;
     }
-    public void setBalance(BigDecimal balance) 
+    public void setBalance(BigDecimal balance)
     {
         this.balance = balance;
     }
 
-    public BigDecimal getBalance() 
+    public BigDecimal getBalance()
     {
         return balance;
     }
-    public void setStationId(Integer stationId) 
+    public void setStationId(Integer stationId)
     {
         this.stationId = stationId;
     }
 
-    public Integer getStationId() 
+    public Integer getStationId()
     {
         return stationId;
     }
-    public void setStationName(String stationName) 
+    public void setStationName(String stationName)
     {
         this.stationName = stationName;
     }
 
-    public String getStationName() 
+    public String getStationName()
     {
         return stationName;
     }
-    public void setStatus(String status) 
+    public void setStatus(String status)
     {
         this.status = status;
     }
 
-    public String getStatus() 
+    public String getStatus()
     {
         return status;
     }
@@ -214,7 +233,6 @@ public class CustomerCardUseRecord extends BaseEntity
             .append("balance", getBalance())
             .append("createTime", getCreateTime())
             .append("stationId", getStationId())
-            .append("stationName", getStationName())
             .append("status", getStatus())
             .toString();
     }

+ 0 - 29
yijia-customer/src/main/java/com/yijia/customer/domain/CustomerElectronicCard.java

@@ -24,15 +24,6 @@ public class CustomerElectronicCard extends BaseEntity
     /** 微信用户唯一标识unionId */
     @Excel(name = "微信用户唯一标识unionId")
     private String unionId;
-
-    /** 公众号openId */
-    @Excel(name = "公众号openId")
-    private String blogOpenid;
-
-    /** 小程序openId */
-    @Excel(name = "小程序openId")
-    private String minaOpenid;
-
     /** 会员编号 */
     @Excel(name = "会员编号")
     private String customerNo;
@@ -172,24 +163,6 @@ public class CustomerElectronicCard extends BaseEntity
     {
         return unionId;
     }
-    public void setBlogOpenid(String blogOpenid)
-    {
-        this.blogOpenid = blogOpenid;
-    }
-
-    public String getBlogOpenid()
-    {
-        return blogOpenid;
-    }
-    public void setMinaOpenid(String minaOpenid)
-    {
-        this.minaOpenid = minaOpenid;
-    }
-
-    public String getMinaOpenid()
-    {
-        return minaOpenid;
-    }
     public void setCustomerNo(String customerNo)
     {
         this.customerNo = customerNo;
@@ -268,8 +241,6 @@ public class CustomerElectronicCard extends BaseEntity
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
             .append("id", getId())
             .append("unionId", getUnionId())
-            .append("blogOpenid", getBlogOpenid())
-            .append("minaOpenid", getMinaOpenid())
             .append("customerNo", getCustomerNo())
             .append("customerName", getCustomerName())
             .append("mobilePhone", getMobilePhone())

+ 16 - 131
yijia-customer/src/main/java/com/yijia/customer/domain/CustomerManage.java

@@ -35,9 +35,6 @@ public class CustomerManage extends BaseEntity
     @Excel(name = "推荐人")
     private String commendMan;
 
-    /** 会员等级 */
-    @Excel(name = "会员等级")
-    private String memberGrade;
 
     /** 手机号 */
     @Excel(name = "手机号")
@@ -72,22 +69,6 @@ public class CustomerManage extends BaseEntity
     @Excel(name = "油站名称")
     private String stationName;
 
-    /** 柴油等级 */
-    @Excel(name = "柴油等级")
-    private String cyGrade;
-
-    /** 汽油等级 */
-    @Excel(name = "汽油等级")
-    private String qyGrade;
-
-    /** 柴油加油总升数 */
-    @Excel(name = "柴油加油总升数")
-    private BigDecimal cyLiters;
-
-    /** 汽油加油总升数 */
-    @Excel(name = "汽油加油总升数")
-    private BigDecimal qyLiters;
-
     /** 柴油加油消费总金额 */
     @Excel(name = "柴油加油消费总金额")
     private BigDecimal cyAmt;
@@ -96,18 +77,6 @@ public class CustomerManage extends BaseEntity
     @Excel(name = "汽油加油消费总金额")
     private BigDecimal qyAmt;
 
-    /** 公众号openid */
-    @Excel(name = "公众号openid")
-    private String blogOpenid;
-
-    /** 小程序openid */
-    @Excel(name = "小程序openid")
-    private String minaOpenid;
-
-    /** 公众号userid */
-    @Excel(name = "公众号userid")
-    private Long blogUserId;
-
     /** 小程序的userid */
     @Excel(name = "小程序的userid")
     private Long minaUserId;
@@ -131,9 +100,7 @@ public class CustomerManage extends BaseEntity
     /** 微信UnionID */
     @Excel(name = "微信UnionID")
     private String unionId;
-
     private Date payDate;
-
     private String fyAmt;
     private String lngAmt;
     private String cngAmt;
@@ -179,6 +146,22 @@ public class CustomerManage extends BaseEntity
         return stationIdList;
     }
 
+    public BigDecimal getCyAmt() {
+        return cyAmt;
+    }
+
+    public void setCyAmt(BigDecimal cyAmt) {
+        this.cyAmt = cyAmt;
+    }
+
+    public BigDecimal getQyAmt() {
+        return qyAmt;
+    }
+
+    public void setQyAmt(BigDecimal qyAmt) {
+        this.qyAmt = qyAmt;
+    }
+
     public void setStationIdList(List<String> stationIdList) {
         this.stationIdList = stationIdList;
     }
@@ -219,15 +202,7 @@ public class CustomerManage extends BaseEntity
     {
         return commendMan;
     }
-    public void setMemberGrade(String memberGrade)
-    {
-        this.memberGrade = memberGrade;
-    }
 
-    public String getMemberGrade()
-    {
-        return memberGrade;
-    }
     public void setPhoneNumber(String phoneNumber)
     {
         this.phoneNumber = phoneNumber;
@@ -300,87 +275,7 @@ public class CustomerManage extends BaseEntity
     {
         return stationName;
     }
-    public void setCyGrade(String cyGrade)
-    {
-        this.cyGrade = cyGrade;
-    }
-
-    public String getCyGrade()
-    {
-        return cyGrade;
-    }
-    public void setQyGrade(String qyGrade)
-    {
-        this.qyGrade = qyGrade;
-    }
-
-    public String getQyGrade()
-    {
-        return qyGrade;
-    }
-    public void setCyLiters(BigDecimal cyLiters)
-    {
-        this.cyLiters = cyLiters;
-    }
 
-    public BigDecimal getCyLiters()
-    {
-        return cyLiters;
-    }
-    public void setQyLiters(BigDecimal qyLiters)
-    {
-        this.qyLiters = qyLiters;
-    }
-
-    public BigDecimal getQyLiters()
-    {
-        return qyLiters;
-    }
-    public void setCyAmt(BigDecimal cyAmt)
-    {
-        this.cyAmt = cyAmt;
-    }
-
-    public BigDecimal getCyAmt()
-    {
-        return cyAmt;
-    }
-    public void setQyAmt(BigDecimal qyAmt)
-    {
-        this.qyAmt = qyAmt;
-    }
-
-    public BigDecimal getQyAmt()
-    {
-        return qyAmt;
-    }
-    public void setBlogOpenid(String blogOpenid)
-    {
-        this.blogOpenid = blogOpenid;
-    }
-
-    public String getBlogOpenid()
-    {
-        return blogOpenid;
-    }
-    public void setMinaOpenid(String minaOpenid)
-    {
-        this.minaOpenid = minaOpenid;
-    }
-
-    public String getMinaOpenid()
-    {
-        return minaOpenid;
-    }
-    public void setBlogUserId(Long blogUserId)
-    {
-        this.blogUserId = blogUserId;
-    }
-
-    public Long getBlogUserId()
-    {
-        return blogUserId;
-    }
     public void setMinaUserId(Long minaUserId)
     {
         this.minaUserId = minaUserId;
@@ -443,7 +338,6 @@ public class CustomerManage extends BaseEntity
             .append("memberId", getMemberId())
             .append("customerName", getCustomerName())
             .append("commendMan", getCommendMan())
-            .append("memberGrade", getMemberGrade())
             .append("phoneNumber", getPhoneNumber())
             .append("carNumber", getCarNumber())
             .append("balance", getBalance())
@@ -452,15 +346,6 @@ public class CustomerManage extends BaseEntity
             .append("regtime", getRegtime())
             .append("stationId", getStationId())
             .append("stationName", getStationName())
-            .append("cyGrade", getCyGrade())
-            .append("qyGrade", getQyGrade())
-            .append("cyLiters", getCyLiters())
-            .append("qyLiters", getQyLiters())
-            .append("cyAmt", getCyAmt())
-            .append("qyAmt", getQyAmt())
-            .append("blogOpenid", getBlogOpenid())
-            .append("minaOpenid", getMinaOpenid())
-            .append("blogUserId", getBlogUserId())
             .append("minaUserId", getMinaUserId())
             .append("oilName", getOilName())
             .append("grade", getGrade())

+ 15 - 8
yijia-customer/src/main/java/com/yijia/customer/mapper/CustomerCardUseRecordMapper.java

@@ -5,15 +5,15 @@ import com.yijia.customer.domain.CustomerCardUseRecord;
 
 /**
  * 客户电子会员卡充值消费记录Mapper接口
- * 
+ *
  * @author yijia
  * @date 2021-05-18
  */
-public interface CustomerCardUseRecordMapper 
+public interface CustomerCardUseRecordMapper
 {
     /**
      * 查询客户电子会员卡充值消费记录
-     * 
+     *
      * @param id 客户电子会员卡充值消费记录ID
      * @return 客户电子会员卡充值消费记录
      */
@@ -21,7 +21,7 @@ public interface CustomerCardUseRecordMapper
 
     /**
      * 查询客户电子会员卡充值消费记录列表
-     * 
+     *
      * @param customerCardUseRecord 客户电子会员卡充值消费记录
      * @return 客户电子会员卡充值消费记录集合
      */
@@ -29,7 +29,7 @@ public interface CustomerCardUseRecordMapper
 
     /**
      * 新增客户电子会员卡充值消费记录
-     * 
+     *
      * @param customerCardUseRecord 客户电子会员卡充值消费记录
      * @return 结果
      */
@@ -37,7 +37,7 @@ public interface CustomerCardUseRecordMapper
 
     /**
      * 修改客户电子会员卡充值消费记录
-     * 
+     *
      * @param customerCardUseRecord 客户电子会员卡充值消费记录
      * @return 结果
      */
@@ -45,7 +45,7 @@ public interface CustomerCardUseRecordMapper
 
     /**
      * 删除客户电子会员卡充值消费记录
-     * 
+     *
      * @param id 客户电子会员卡充值消费记录ID
      * @return 结果
      */
@@ -53,9 +53,16 @@ public interface CustomerCardUseRecordMapper
 
     /**
      * 批量删除客户电子会员卡充值消费记录
-     * 
+     *
      * @param ids 需要删除的数据ID
      * @return 结果
      */
     public int deleteCustomerCardUseRecordByIds(Long[] ids);
+
+    /***
+     * 充值消费汇总
+     * @param customerCardUseRecord
+     * @return
+     */
+    public CustomerCardUseRecord listCZXFData(CustomerCardUseRecord customerCardUseRecord);
 }

+ 8 - 8
yijia-customer/src/main/java/com/yijia/customer/service/ICustomerCardRecordRechargeService.java

@@ -5,15 +5,15 @@ import com.yijia.customer.domain.CustomerCardRecordRecharge;
 
 /**
  * 客户电子会员卡充值记录Service接口
- * 
+ *
  * @author yijia
  * @date 2021-04-13
  */
-public interface ICustomerCardRecordRechargeService 
+public interface ICustomerCardRecordRechargeService
 {
     /**
      * 查询客户电子会员卡充值记录
-     * 
+     *
      * @param id 客户电子会员卡充值记录ID
      * @return 客户电子会员卡充值记录
      */
@@ -21,7 +21,7 @@ public interface ICustomerCardRecordRechargeService
 
     /**
      * 查询客户电子会员卡充值记录列表
-     * 
+     *
      * @param customerCardRecordRecharge 客户电子会员卡充值记录
      * @return 客户电子会员卡充值记录集合
      */
@@ -29,7 +29,7 @@ public interface ICustomerCardRecordRechargeService
 
     /**
      * 新增客户电子会员卡充值记录
-     * 
+     *
      * @param customerCardRecordRecharge 客户电子会员卡充值记录
      * @return 结果
      */
@@ -37,7 +37,7 @@ public interface ICustomerCardRecordRechargeService
 
     /**
      * 修改客户电子会员卡充值记录
-     * 
+     *
      * @param customerCardRecordRecharge 客户电子会员卡充值记录
      * @return 结果
      */
@@ -45,7 +45,7 @@ public interface ICustomerCardRecordRechargeService
 
     /**
      * 批量删除客户电子会员卡充值记录
-     * 
+     *
      * @param ids 需要删除的客户电子会员卡充值记录ID
      * @return 结果
      */
@@ -53,7 +53,7 @@ public interface ICustomerCardRecordRechargeService
 
     /**
      * 删除客户电子会员卡充值记录信息
-     * 
+     *
      * @param id 客户电子会员卡充值记录ID
      * @return 结果
      */

+ 15 - 8
yijia-customer/src/main/java/com/yijia/customer/service/ICustomerCardUseRecordService.java

@@ -5,15 +5,15 @@ import com.yijia.customer.domain.CustomerCardUseRecord;
 
 /**
  * 客户电子会员卡充值消费记录Service接口
- * 
+ *
  * @author yijia
  * @date 2021-05-18
  */
-public interface ICustomerCardUseRecordService 
+public interface ICustomerCardUseRecordService
 {
     /**
      * 查询客户电子会员卡充值消费记录
-     * 
+     *
      * @param id 客户电子会员卡充值消费记录ID
      * @return 客户电子会员卡充值消费记录
      */
@@ -21,7 +21,7 @@ public interface ICustomerCardUseRecordService
 
     /**
      * 查询客户电子会员卡充值消费记录列表
-     * 
+     *
      * @param customerCardUseRecord 客户电子会员卡充值消费记录
      * @return 客户电子会员卡充值消费记录集合
      */
@@ -29,7 +29,7 @@ public interface ICustomerCardUseRecordService
 
     /**
      * 新增客户电子会员卡充值消费记录
-     * 
+     *
      * @param customerCardUseRecord 客户电子会员卡充值消费记录
      * @return 结果
      */
@@ -37,7 +37,7 @@ public interface ICustomerCardUseRecordService
 
     /**
      * 修改客户电子会员卡充值消费记录
-     * 
+     *
      * @param customerCardUseRecord 客户电子会员卡充值消费记录
      * @return 结果
      */
@@ -45,7 +45,7 @@ public interface ICustomerCardUseRecordService
 
     /**
      * 批量删除客户电子会员卡充值消费记录
-     * 
+     *
      * @param ids 需要删除的客户电子会员卡充值消费记录ID
      * @return 结果
      */
@@ -53,9 +53,16 @@ public interface ICustomerCardUseRecordService
 
     /**
      * 删除客户电子会员卡充值消费记录信息
-     * 
+     *
      * @param id 客户电子会员卡充值消费记录ID
      * @return 结果
      */
     public int deleteCustomerCardUseRecordById(Long id);
+
+    /**
+     * 充值,消费记录汇总
+     * @param customerCardUseRecord
+     * @return
+     */
+    public CustomerCardUseRecord listCZXFData(CustomerCardUseRecord customerCardUseRecord);
 }

+ 15 - 8
yijia-customer/src/main/java/com/yijia/customer/service/impl/CustomerCardUseRecordServiceImpl.java

@@ -10,19 +10,19 @@ import com.yijia.customer.service.ICustomerCardUseRecordService;
 
 /**
  * 客户电子会员卡充值消费记录Service业务层处理
- * 
+ *
  * @author yijia
  * @date 2021-05-18
  */
 @Service
-public class CustomerCardUseRecordServiceImpl implements ICustomerCardUseRecordService 
+public class CustomerCardUseRecordServiceImpl implements ICustomerCardUseRecordService
 {
     @Autowired
     private CustomerCardUseRecordMapper customerCardUseRecordMapper;
 
     /**
      * 查询客户电子会员卡充值消费记录
-     * 
+     *
      * @param id 客户电子会员卡充值消费记录ID
      * @return 客户电子会员卡充值消费记录
      */
@@ -34,7 +34,7 @@ public class CustomerCardUseRecordServiceImpl implements ICustomerCardUseRecordS
 
     /**
      * 查询客户电子会员卡充值消费记录列表
-     * 
+     *
      * @param customerCardUseRecord 客户电子会员卡充值消费记录
      * @return 客户电子会员卡充值消费记录
      */
@@ -46,7 +46,7 @@ public class CustomerCardUseRecordServiceImpl implements ICustomerCardUseRecordS
 
     /**
      * 新增客户电子会员卡充值消费记录
-     * 
+     *
      * @param customerCardUseRecord 客户电子会员卡充值消费记录
      * @return 结果
      */
@@ -59,7 +59,7 @@ public class CustomerCardUseRecordServiceImpl implements ICustomerCardUseRecordS
 
     /**
      * 修改客户电子会员卡充值消费记录
-     * 
+     *
      * @param customerCardUseRecord 客户电子会员卡充值消费记录
      * @return 结果
      */
@@ -71,7 +71,7 @@ public class CustomerCardUseRecordServiceImpl implements ICustomerCardUseRecordS
 
     /**
      * 批量删除客户电子会员卡充值消费记录
-     * 
+     *
      * @param ids 需要删除的客户电子会员卡充值消费记录ID
      * @return 结果
      */
@@ -83,7 +83,7 @@ public class CustomerCardUseRecordServiceImpl implements ICustomerCardUseRecordS
 
     /**
      * 删除客户电子会员卡充值消费记录信息
-     * 
+     *
      * @param id 客户电子会员卡充值消费记录ID
      * @return 结果
      */
@@ -92,4 +92,11 @@ public class CustomerCardUseRecordServiceImpl implements ICustomerCardUseRecordS
     {
         return customerCardUseRecordMapper.deleteCustomerCardUseRecordById(id);
     }
+
+    /*充值消费汇总
+     */
+    @Override
+    public CustomerCardUseRecord listCZXFData(CustomerCardUseRecord customerCardUseRecord) {
+        return customerCardUseRecordMapper.listCZXFData(customerCardUseRecord);
+    }
 }

+ 4 - 2
yijia-customer/src/main/resources/mapper/customer/CustomerCardSettingDetailMapper.xml

@@ -25,7 +25,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectCustomerCardSettingDetailVo">
-        select id, parent_id, setting_rule_type, discount_amt_start,discount_amt_end, present_amt,card_type,status,del_flag
+        select id, parent_id, setting_rule_type, discount_amt_start,discount_amt_end,
+        present_amt,card_type,status,del_flag
          from customer_card_setting_detail
     </sql>
 
@@ -52,7 +53,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="listDetailInfo" parameterType="CustomerCardSetting" resultMap="CustomerCardSettingDetailResult">
         SELECT a.setting_rule_type,a.discount_amt_start,a.discount_amt_end,a.present_amt,card_type,b.card_oils_type,
-        b.discount_time_setting,b.discount_time_type,b.is_discount_coupon,b.is_market,b.is_grade_setting,b.present_scale,b.enjoy_integral_multiple
+        b.discount_time_setting,b.discount_time_type,b.is_discount_coupon,b.is_market,b.is_grade_setting,b.present_scale,
+        b.enjoy_integral_multiple
         from customer_card_setting_detail a join customer_card_setting b on a.parent_id= b.id
         <where>
 <!--            <if test="parentId != null "> and parent_id = #{parentId}</if>-->

+ 49 - 24
yijia-customer/src/main/resources/mapper/customer/CustomerCardUseRecordMapper.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.customer.mapper.CustomerCardUseRecordMapper">
-    
+
     <resultMap type="CustomerCardUseRecord" id="CustomerCardUseRecordResult">
         <result property="id"    column="id"    />
         <result property="orderNo"    column="order_no"    />
@@ -20,36 +20,64 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="stationId"    column="station_id"    />
         <result property="stationName"    column="station_name"    />
         <result property="status"    column="status"    />
+        <result property="xfAmt"    column="xf_amt"    />
+        <result property="czAmt"    column="cz_amt"    />
     </resultMap>
 
     <sql id="selectCustomerCardUseRecordVo">
-        select id, order_no, union_id, customer_no, customer_name, usage_type, pay_type, card_oils_type, amt, present_amt, balance, create_time, station_id, station_name, status from customer_card_use_record
+        select c.id, c.order_no, c.union_id, c.customer_no, c.customer_name, c.usage_type, c.pay_type,
+         c.card_oils_type, c.amt, c.present_amt, c.balance, c.create_time, c.station_id,d.dept_name as station_name,
+         c.status from customer_card_use_record c join sys_dept d on c.station_id = d.dept_id
     </sql>
 
     <select id="selectCustomerCardUseRecordList" parameterType="CustomerCardUseRecord" resultMap="CustomerCardUseRecordResult">
         <include refid="selectCustomerCardUseRecordVo"/>
-        <where>  
-            <if test="orderNo != null  and orderNo != ''"> and order_no = #{orderNo}</if>
-            <if test="unionId != null  and unionId != ''"> and union_id = #{unionId}</if>
-            <if test="customerNo != null  and customerNo != ''"> and customer_no = #{customerNo}</if>
-            <if test="customerName != null  and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
-            <if test="usageType != null  and usageType != ''"> and usage_type = #{usageType}</if>
-            <if test="payType != null  and payType != ''"> and pay_type = #{payType}</if>
-            <if test="cardOilsType != null  and cardOilsType != ''"> and card_oils_type = #{cardOilsType}</if>
-            <if test="amt != null "> and amt = #{amt}</if>
-            <if test="presentAmt != null "> and present_amt = #{presentAmt}</if>
-            <if test="balance != null "> and balance = #{balance}</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="status != null  and status != ''"> and status = #{status}</if>
+        <where>
+            <if test="orderNo != null  and orderNo != ''"> and c.order_no = #{orderNo}</if>
+            <if test="unionId != null  and unionId != ''"> and c.union_id = #{unionId}</if>
+            <if test="customerNo != null  and customerNo != ''"> and c.customer_no = #{customerNo}</if>
+            <if test="customerName != null  and customerName != ''"> and c.customer_name like concat('%', #{customerName}, '%')</if>
+            <if test="usageType != null  and usageType != ''"> and c.usage_type = #{usageType}</if>
+            <if test="payType != null  and payType != ''"> and c.pay_type = #{payType}</if>
+            <if test="cardOilsType != null  and cardOilsType != ''"> and c.card_oils_type = #{cardOilsType}</if>
+            <if test="amt != null "> and c.amt = #{amt}</if>
+            <if test="presentAmt != null "> and c.present_amt = #{presentAmt}</if>
+            <if test="balance != null "> and c.balance = #{balance}</if>
+            <if test="stationId != null "> and c.station_id = #{stationId}</if>
+            <if test="stationIdList != null ">
+                and c.station_id in
+                <foreach item="item" index="index" collection="stationIdList"
+                         open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="status != null  and status != ''"> and c.status = #{status}</if>
         </where>
     </select>
-    
+
     <select id="selectCustomerCardUseRecordById" parameterType="Long" resultMap="CustomerCardUseRecordResult">
         <include refid="selectCustomerCardUseRecordVo"/>
         where id = #{id}
     </select>
-        
+    <select id="listCZXFData" parameterType="CustomerCardUseRecord" resultMap="CustomerCardUseRecordResult">
+        select sum(CASE usage_type  WHEN '+' THEN  amt ELSE 0 END ) cz_amt,
+        sum(CASE usage_type  WHEN '-' THEN amt ELSE 0 END ) xf_amt
+        from customer_card_use_record c
+        <where>
+            <if test="orderNo != null  and orderNo != ''"> and c.order_no = #{orderNo}</if>
+            <if test="unionId != null  and unionId != ''"> and c.union_id = #{unionId}</if>
+            <if test="customerNo != null  and customerNo != ''"> and c.customer_no = #{customerNo}</if>
+            <if test="customerName != null  and customerName != ''"> and c.customer_name like concat('%', #{customerName}, '%')</if>
+            <if test="usageType != null  and usageType != ''"> and c.usage_type = #{usageType}</if>
+            <if test="payType != null  and payType != ''"> and c.pay_type = #{payType}</if>
+            <if test="cardOilsType != null  and cardOilsType != ''"> and c.card_oils_type = #{cardOilsType}</if>
+            <if test="amt != null "> and c.amt = #{amt}</if>
+            <if test="presentAmt != null "> and c.present_amt = #{presentAmt}</if>
+            <if test="balance != null "> and c.balance = #{balance}</if>
+            <if test="stationId != null "> and c.station_id = #{stationId}</if>
+            <if test="status != null  and status != ''"> and c.status = #{status}</if>
+        </where>
+     </select>
     <insert id="insertCustomerCardUseRecord" parameterType="CustomerCardUseRecord" useGeneratedKeys="true" keyProperty="id">
         insert into customer_card_use_record
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -65,7 +93,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="balance != null">balance,</if>
             <if test="createTime != null">create_time,</if>
             <if test="stationId != null">station_id,</if>
-            <if test="stationName != null">station_name,</if>
             <if test="status != null">status,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -81,7 +108,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="balance != null">#{balance},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="stationId != null">#{stationId},</if>
-            <if test="stationName != null">#{stationName},</if>
             <if test="status != null">#{status},</if>
          </trim>
     </insert>
@@ -101,7 +127,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="balance != null">balance = #{balance},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="stationId != null">station_id = #{stationId},</if>
-            <if test="stationName != null">station_name = #{stationName},</if>
             <if test="status != null">status = #{status},</if>
         </trim>
         where id = #{id}
@@ -112,10 +137,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deleteCustomerCardUseRecordByIds" parameterType="String">
-        delete from customer_card_use_record where id in 
+        delete from customer_card_use_record where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>
     </delete>
-    
-</mapper>
+
+</mapper>

+ 9 - 30
yijia-customer/src/main/resources/mapper/customer/CustomerElectronicCardMapper.xml

@@ -3,12 +3,10 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.yijia.customer.mapper.CustomerElectronicCardMapper">
-    
+
     <resultMap type="CustomerElectronicCard" id="CustomerElectronicCardResult">
         <result property="id"    column="id"    />
         <result property="unionId"    column="union_id"    />
-        <result property="blogOpenid"    column="blog_openid"    />
-        <result property="minaOpenid"    column="mina_openid"    />
         <result property="customerNo"    column="customer_no"    />
         <result property="customerName"    column="customer_name"    />
         <result property="mobilePhone"    column="mobile_phone"    />
@@ -27,22 +25,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectCustomerElectronicCardVo">
-        select id, union_id, blog_openid, mina_openid, customer_no, customer_name, mobile_phone, amt, card_oils_type, station_id, station_name, create_time, recently_time from customer_electronic_card
+        select c.id, c.union_id,c.customer_no,c.customer_name, c.mobile_phone, c.amt, c.card_oils_type,
+         c.station_id,d.dept_name as station_name, c.create_time, c.recently_time
+         from customer_electronic_card c join  sys_dept d on c.station_id =d.dept_id
     </sql>
 
     <select id="selectCustomerElectronicCardList" parameterType="CustomerElectronicCard" resultMap="CustomerElectronicCardResult">
         <include refid="selectCustomerElectronicCardVo"/>
-        <where>  
+        <where>
             <if test="unionId != null  and unionId != ''"> and union_id = #{unionId}</if>
-            <if test="blogOpenid != null  and blogOpenid != ''"> and blog_openid = #{blogOpenid}</if>
-            <if test="minaOpenid != null  and minaOpenid != ''"> and mina_openid = #{minaOpenid}</if>
             <if test="customerNo != null  and customerNo != ''"> and customer_no = #{customerNo}</if>
             <if test="customerName != null  and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
             <if test="mobilePhone != null  and mobilePhone != ''"> and mobile_phone = #{mobilePhone}</if>
             <if test="amt != null "> and amt = #{amt}</if>
             <if test="cardOilsType != null  and cardOilsType != ''"> and card_oils_type = #{cardOilsType}</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="recentlyTime != null "> and recently_time = #{recentlyTime}</if>
             <if test="stationIdList != null ">
                 and station_id in
@@ -58,34 +55,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectCustomerElectronicCardVo"/>
         where id = #{id}
     </select>
-        
+
     <insert id="insertCustomerElectronicCard" parameterType="CustomerElectronicCard" useGeneratedKeys="true" keyProperty="id">
         insert into customer_electronic_card
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="unionId != null">union_id,</if>
-            <if test="blogOpenid != null">blog_openid,</if>
-            <if test="minaOpenid != null">mina_openid,</if>
             <if test="customerNo != null">customer_no,</if>
             <if test="customerName != null">customer_name,</if>
             <if test="mobilePhone != null">mobile_phone,</if>
             <if test="amt != null">amt,</if>
             <if test="cardOilsType != null">card_oils_type,</if>
             <if test="stationId != null">station_id,</if>
-            <if test="stationName != null">station_name,</if>
             <if test="createTime != null">create_time,</if>
             <if test="recentlyTime != null">recently_time,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="unionId != null">#{unionId},</if>
-            <if test="blogOpenid != null">#{blogOpenid},</if>
-            <if test="minaOpenid != null">#{minaOpenid},</if>
             <if test="customerNo != null">#{customerNo},</if>
             <if test="customerName != null">#{customerName},</if>
             <if test="mobilePhone != null">#{mobilePhone},</if>
             <if test="amt != null">#{amt},</if>
             <if test="cardOilsType != null">#{cardOilsType},</if>
             <if test="stationId != null">#{stationId},</if>
-            <if test="stationName != null">#{stationName},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="recentlyTime != null">#{recentlyTime},</if>
          </trim>
@@ -95,15 +86,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         update customer_electronic_card
         <trim prefix="SET" suffixOverrides=",">
             <if test="unionId != null">union_id = #{unionId},</if>
-            <if test="blogOpenid != null">blog_openid = #{blogOpenid},</if>
-            <if test="minaOpenid != null">mina_openid = #{minaOpenid},</if>
             <if test="customerNo != null">customer_no = #{customerNo},</if>
             <if test="customerName != null">customer_name = #{customerName},</if>
             <if test="mobilePhone != null">mobile_phone = #{mobilePhone},</if>
             <if test="amt != null">amt = #{amt},</if>
             <if test="cardOilsType != null">card_oils_type = #{cardOilsType},</if>
             <if test="stationId != null">station_id = #{stationId},</if>
-            <if test="stationName != null">station_name = #{stationName},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="recentlyTime != null">recently_time = #{recentlyTime},</if>
         </trim>
@@ -115,7 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deleteCustomerElectronicCardByIds" parameterType="String">
-        delete from customer_electronic_card where id in 
+        delete from customer_electronic_card where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>
@@ -126,15 +114,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         from customer_electronic_card
         <where>
             <if test="unionId != null  and unionId != ''"> and union_id = #{unionId}</if>
-            <if test="blogOpenid != null  and blogOpenid != ''"> and blog_openid = #{blogOpenid}</if>
-            <if test="minaOpenid != null  and minaOpenid != ''"> and mina_openid = #{minaOpenid}</if>
             <if test="customerNo != null  and customerNo != ''"> and customer_no = #{customerNo}</if>
             <if test="customerName != null  and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
             <if test="mobilePhone != null  and mobilePhone != ''"> and mobile_phone = #{mobilePhone}</if>
             <if test="amt != null "> and amt = #{amt}</if>
             <if test="cardOilsType != null  and cardOilsType != ''"> and card_oils_type = #{cardOilsType}</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="recentlyTime != null "> and recently_time = #{recentlyTime}</if>
             <if test="stationIdList != null ">
                 and station_id in
@@ -151,15 +136,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         from customer_electronic_card
         <where>
             <if test="unionId != null  and unionId != ''"> and union_id = #{unionId}</if>
-            <if test="blogOpenid != null  and blogOpenid != ''"> and blog_openid = #{blogOpenid}</if>
-            <if test="minaOpenid != null  and minaOpenid != ''"> and mina_openid = #{minaOpenid}</if>
             <if test="customerNo != null  and customerNo != ''"> and customer_no = #{customerNo}</if>
             <if test="customerName != null  and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
             <if test="mobilePhone != null  and mobilePhone != ''"> and mobile_phone = #{mobilePhone}</if>
             <if test="amt != null "> and amt = #{amt}</if>
             <if test="cardOilsType != null  and cardOilsType != ''"> and card_oils_type = #{cardOilsType}</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="recentlyTime != null "> and recently_time = #{recentlyTime}</if>
             <if test="stationIdList != null ">
                 and station_id in
@@ -174,16 +156,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         SELECT count(DISTINCT union_id ) as num from customer_electronic_card
         <where>
             <if test="unionId != null  and unionId != ''"> and union_id = #{unionId}</if>
-            <if test="blogOpenid != null  and blogOpenid != ''"> and blog_openid = #{blogOpenid}</if>
-            <if test="minaOpenid != null  and minaOpenid != ''"> and mina_openid = #{minaOpenid}</if>
             <if test="customerNo != null  and customerNo != ''"> and customer_no = #{customerNo}</if>
             <if test="customerName != null  and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
             <if test="mobilePhone != null  and mobilePhone != ''"> and mobile_phone = #{mobilePhone}</if>
             <if test="amt != null "> and amt = #{amt}</if>
             <if test="cardOilsType != null  and cardOilsType != ''"> and card_oils_type = #{cardOilsType}</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="recentlyTime != null "> and recently_time = #{recentlyTime}</if>
+           <if test="recentlyTime != null "> and recently_time = #{recentlyTime}</if>
             <if test="stationIdList != null ">
                 and station_id in
                 <foreach item="item" index="index" collection="stationIdList"
@@ -209,4 +188,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectCardPage" parameterType="CustomerElectronicCard" statementType="CALLABLE" resultMap="CustomerElectronicCardResult">
           CALL selectCardPage(#{strSql,mode=IN});
     </select>
-</mapper>
+</mapper>

+ 1 - 1
yijia-customer/src/main/resources/mapper/customer/CustomerGradeSettingMapper.xml

@@ -64,7 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="oilName != null">oil_name,</if>
             <if test="memberConditStart != null">member_condit_start,</if>
             <if test="memberConditEnd != null">member_condit_end,</if>
-            <if test="delFlag != null">delFlag,</if>
+            <if test="delFlag != null">del_flag,</if>
             <if test="createBy != null">create_by,</if>
             <if test="createTime != null">create_time,</if>
             <if test="updateBy != null">update_by,</if>

+ 6 - 74
yijia-customer/src/main/resources/mapper/customer/CustomerManageMapper.xml

@@ -9,7 +9,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="memberId"    column="member_id"    />
         <result property="customerName"    column="customer_name"    />
         <result property="commendMan"    column="commend_man"    />
-        <result property="memberGrade"    column="member_grade"    />
         <result property="phoneNumber"    column="phone_number"    />
         <result property="carNumber"    column="car_number"    />
         <result property="balance"    column="balance"    />
@@ -18,15 +17,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="regtime"    column="regtime"    />
         <result property="stationId"    column="station_id"    />
         <result property="stationName"    column="station_name"    />
-        <result property="cyGrade"    column="cy_grade"    />
-        <result property="qyGrade"    column="qy_grade"    />
-        <result property="cyLiters"    column="cy_liters"    />
-        <result property="qyLiters"    column="qy_liters"    />
         <result property="cyAmt"    column="cy_amt"    />
         <result property="qyAmt"    column="qy_amt"    />
-        <result property="blogOpenid"    column="blog_openid"    />
-        <result property="minaOpenid"    column="mina_openid"    />
-        <result property="blogUserId"    column="blog_user_id"    />
         <result property="minaUserId"    column="mina_user_id"    />
         <result property="oilName"    column="oil_name"    />
         <result property="grade"    column="grade"    />
@@ -40,7 +32,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectCustomerManageVo">
-        select id, member_id, customer_name, commend_man, member_grade, phone_number, car_number, balance, integral, special_car_type, regtime, station_id, station_name, cy_grade, qy_grade, cy_liters, qy_liters, cy_amt, qy_amt, blog_openid, mina_openid, blog_user_id, mina_user_id, oil_name, grade, liters, amt, union_id from customer_manage
+        select id, member_id, customer_name, commend_man, phone_number, car_number, balance,
+        integral, special_car_type, regtime, station_id, mina_user_id, oil_name, grade,
+         liters, amt, union_id ,d.dept_name as station_name
+         from customer_manage m join  sys_dept d on m.station_id = d.dept_id
     </sql>
 
     <select id="selectCustomerManageList" parameterType="CustomerManage" resultMap="CustomerManageResult">
@@ -49,7 +44,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="memberId != null  and memberId != ''"> and member_id = #{memberId}</if>
             <if test="customerName != null  and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
             <if test="commendMan != null  and commendMan != ''"> and commend_man = #{commendMan}</if>
-            <if test="memberGrade != null  and memberGrade != ''"> and member_grade like concat('%', #{memberGrade}, '%')</if>
             <if test="phoneNumber != null  and phoneNumber != ''"> and phone_number like concat('%', #{phoneNumber}, '%')</if>
             <if test="carNumber != null  and carNumber != ''"> and car_number = #{carNumber}</if>
             <if test="balance != null "> and balance = #{balance}</if>
@@ -57,16 +51,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="specialCarType != null  and specialCarType != ''"> and special_car_type = #{specialCarType}</if>
             <if test="regtime != null "> and regtime = #{regtime}</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="cyGrade != null  and cyGrade != ''"> and cy_grade = #{cyGrade}</if>
-            <if test="qyGrade != null  and qyGrade != ''"> and qy_grade = #{qyGrade}</if>
-            <if test="cyLiters != null "> and cy_liters = #{cyLiters}</if>
-            <if test="qyLiters != null "> and qy_liters = #{qyLiters}</if>
-            <if test="cyAmt != null "> and cy_amt = #{cyAmt}</if>
-            <if test="qyAmt != null "> and qy_amt = #{qyAmt}</if>
-            <if test="blogOpenid != null  and blogOpenid != ''"> and blog_openid = #{blogOpenid}</if>
-            <if test="minaOpenid != null  and minaOpenid != ''"> and mina_openid = #{minaOpenid}</if>
-            <if test="blogUserId != null "> and blog_user_id = #{blogUserId}</if>
             <if test="minaUserId != null "> and mina_user_id = #{minaUserId}</if>
             <if test="oilName != null  and oilName != ''"> and oil_name like concat('%', #{oilName}, '%')</if>
             <if test="grade != null  and grade != ''"> and grade like concat('%', #{grade},'%')</if>
@@ -95,7 +79,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="memberId != null">member_id,</if>
             <if test="customerName != null">customer_name,</if>
             <if test="commendMan != null">commend_man,</if>
-            <if test="memberGrade != null">member_grade,</if>
             <if test="phoneNumber != null">phone_number,</if>
             <if test="carNumber != null">car_number,</if>
             <if test="balance != null">balance,</if>
@@ -103,16 +86,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="specialCarType != null">special_car_type,</if>
             <if test="regtime != null">regtime,</if>
             <if test="stationId != null">station_id,</if>
-            <if test="stationName != null">station_name,</if>
-            <if test="cyGrade != null">cy_grade,</if>
-            <if test="qyGrade != null">qy_grade,</if>
-            <if test="cyLiters != null">cy_liters,</if>
-            <if test="qyLiters != null">qy_liters,</if>
-            <if test="cyAmt != null">cy_amt,</if>
-            <if test="qyAmt != null">qy_amt,</if>
-            <if test="blogOpenid != null">blog_openid,</if>
-            <if test="minaOpenid != null">mina_openid,</if>
-            <if test="blogUserId != null">blog_user_id,</if>
             <if test="minaUserId != null">mina_user_id,</if>
             <if test="oilName != null">oil_name,</if>
             <if test="grade != null">grade,</if>
@@ -124,7 +97,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="memberId != null">#{memberId},</if>
             <if test="customerName != null">#{customerName},</if>
             <if test="commendMan != null">#{commendMan},</if>
-            <if test="memberGrade != null">#{memberGrade},</if>
             <if test="phoneNumber != null">#{phoneNumber},</if>
             <if test="carNumber != null">#{carNumber},</if>
             <if test="balance != null">#{balance},</if>
@@ -132,15 +104,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="specialCarType != null">#{specialCarType},</if>
             <if test="regtime != null">#{regtime},</if>
             <if test="stationId != null">#{stationId},</if>
-            <if test="stationName != null">#{stationName},</if>
-            <if test="cyGrade != null">#{cyGrade},</if>
-            <if test="qyGrade != null">#{qyGrade},</if>
-            <if test="cyLiters != null">#{cyLiters},</if>
-            <if test="qyLiters != null">#{qyLiters},</if>
-            <if test="cyAmt != null">#{cyAmt},</if>
-            <if test="qyAmt != null">#{qyAmt},</if>
-            <if test="blogOpenid != null">#{blogOpenid},</if>
-            <if test="minaOpenid != null">#{minaOpenid},</if>
             <if test="blogUserId != null">#{blogUserId},</if>
             <if test="minaUserId != null">#{minaUserId},</if>
             <if test="oilName != null">#{oilName},</if>
@@ -157,7 +120,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="memberId != null">member_id = #{memberId},</if>
             <if test="customerName != null">customer_name = #{customerName},</if>
             <if test="commendMan != null">commend_man = #{commendMan},</if>
-            <if test="memberGrade != null">member_grade = #{memberGrade},</if>
             <if test="phoneNumber != null">phone_number = #{phoneNumber},</if>
             <if test="carNumber != null">car_number = #{carNumber},</if>
             <if test="balance != null">balance = #{balance},</if>
@@ -165,16 +127,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="specialCarType != null">special_car_type = #{specialCarType},</if>
             <if test="regtime != null">regtime = #{regtime},</if>
             <if test="stationId != null">station_id = #{stationId},</if>
-            <if test="stationName != null">station_name = #{stationName},</if>
-            <if test="cyGrade != null">cy_grade = #{cyGrade},</if>
-            <if test="qyGrade != null">qy_grade = #{qyGrade},</if>
-            <if test="cyLiters != null">cy_liters = #{cyLiters},</if>
-            <if test="qyLiters != null">qy_liters = #{qyLiters},</if>
-            <if test="cyAmt != null">cy_amt = #{cyAmt},</if>
-            <if test="qyAmt != null">qy_amt = #{qyAmt},</if>
-            <if test="blogOpenid != null">blog_openid = #{blogOpenid},</if>
-            <if test="minaOpenid != null">mina_openid = #{minaOpenid},</if>
-            <if test="blogUserId != null">blog_user_id = #{blogUserId},</if>
             <if test="minaUserId != null">mina_user_id = #{minaUserId},</if>
             <if test="oilName != null">oil_name = #{oilName},</if>
             <if test="grade != null">grade = #{grade},</if>
@@ -195,27 +147,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </delete>
-<!--    <select id="selectCustomerManage" parameterType="CustomerManage" resultMap="CustomerManageResult">-->
-<!--        SELECT m.member_id,m.customer_name,m.phone_number,m.car_number,GROUP_CONCAT(DISTINCT(m.oil_name)) oil_name,GROUP_CONCAT(DISTINCT(m.grade)) as grade,m.union_id,p.points as integral,sum(CASE c.card_oils_type  WHEN '1' THEN  c.amt ELSE 0 END ) qy_amt,sum(CASE c.card_oils_type  WHEN '2' THEN  c.amt ELSE 0 END ) cy_amt-->
-<!--        from customer_manage m-->
-<!--        left join customer_points p on m.union_id = p.union_id and m.station_id = p.station_id-->
-<!--        left join customer_electronic_card c on c.union_id =m.union_id and c.station_id = m.station_id-->
-<!--        <where>-->
-<!--            <if test="stationIdList != null ">-->
-<!--                and m.station_id in-->
-<!--                <foreach item="item" index="index" collection="stationIdList"-->
-<!--                         open="(" separator="," close=")">-->
-<!--                    #{item}-->
-<!--                </foreach>-->
-<!--            </if>-->
-<!--            <if test="carNumber != null  and carNumber != ''"> and car_number = #{carNumber}</if>-->
-<!--            <if test="oilName != null  and oilName != ''"> and oil_name like concat('%', #{oilName}, '%')</if>-->
-<!--            <if test="memberGrade != null  and memberGrade != ''"> and member_grade = #{memberGrade}</if>-->
-<!--            <if test="phoneNumber != null  and phoneNumber != ''"> and phone_number = #{phoneNumber}</if>-->
-<!--            <if test="customerName != null  and customerName != ''"> and m.customer_name like concat('%', #{customerName}, '%')</if>-->
-<!--        </where>-->
-<!--        GROUP BY m.union_id,m.member_id,m.customer_name,m.phone_number, m.car_number,p.points,c.union_id,c.station_id-->
-<!--    </select>-->
+
     <select id="selectCustomerManage" parameterType="CustomerManage" resultMap="CustomerManageResult">
         SELECT sy.*,px.pay_date from (
         SELECT m.member_id,m.customer_name,m.phone_number,m.car_number,GROUP_CONCAT(DISTINCT(m.oil_name)) oil_name,
@@ -239,7 +171,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 </if>
                 <if test="carNumber != null  and carNumber != ''"> and car_number like concat('%', #{carNumber}, '%')</if>
                 <if test="oilName != null  and oilName != ''"> and oil_name like concat('%', #{oilName}, '%')</if>
-                <if test="memberGrade != null  and memberGrade != ''"> and member_grade like concat('%', #{memberGrade}, '%')</if>
+                <if test="grade != null  and grade != ''"> and grade like concat('%', #{grade}, '%')</if>
                 <if test="phoneNumber != null  and phoneNumber != ''"> and phone_number like concat('%', #{phoneNumber}, '%')</if>
                 <if test="customerName != null  and customerName != ''"> and m.customer_name  like concat('%', #{customerName}, '%')</if>
             </where>