Ver código fonte

添加电子会员卡功能模块

MS-QJVSRANLTYEO\Administrator 4 anos atrás
pai
commit
ce06a7b615
37 arquivos alterados com 4123 adições e 12 exclusões
  1. 174 0
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/controller/CustomerCardRecordConsumptionController.java
  2. 180 0
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/controller/CustomerCardRecordRechargeController.java
  3. 122 0
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/controller/CustomerCardSettingController.java
  4. 115 0
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/controller/CustomerCardSettingDetailController.java
  5. 163 0
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/controller/CustomerElectronicCardController.java
  6. 1 6
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/controller/CustomerGradeSettingController.java
  7. 1 5
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/controller/CustomerManageController.java
  8. 205 0
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/domain/CustomerCardRecordConsumption.java
  9. 259 0
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/domain/CustomerCardRecordRecharge.java
  10. 191 0
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/domain/CustomerCardSetting.java
  11. 174 0
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/domain/CustomerCardSettingDetail.java
  12. 284 0
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/domain/CustomerElectronicCard.java
  13. 76 0
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/mapper/CustomerCardRecordConsumptionMapper.java
  14. 78 0
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/mapper/CustomerCardRecordRechargeMapper.java
  15. 65 0
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/mapper/CustomerCardSettingDetailMapper.java
  16. 65 0
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/mapper/CustomerCardSettingMapper.java
  17. 73 0
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/mapper/CustomerElectronicCardMapper.java
  18. 7 0
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/mapper/CustomerManageMapper.java
  19. 75 0
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/service/ICustomerCardRecordConsumptionService.java
  20. 79 0
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/service/ICustomerCardRecordRechargeService.java
  21. 68 0
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/service/ICustomerCardSettingDetailService.java
  22. 63 0
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/service/ICustomerCardSettingService.java
  23. 72 0
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/service/ICustomerElectronicCardService.java
  24. 7 0
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/service/ICustomerManageService.java
  25. 113 0
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/service/impl/CustomerCardRecordConsumptionServiceImpl.java
  26. 125 0
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/service/impl/CustomerCardRecordRechargeServiceImpl.java
  27. 98 0
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/service/impl/CustomerCardSettingDetailServiceImpl.java
  28. 135 0
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/service/impl/CustomerCardSettingServiceImpl.java
  29. 117 0
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/service/impl/CustomerElectronicCardServiceImpl.java
  30. 10 0
      Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/service/impl/CustomerManageServiceImpl.java
  31. 13 0
      Yijia-SaaS/yijia-customer/src/main/main.iml
  32. 250 0
      Yijia-SaaS/yijia-customer/src/main/resources/mapper/customer/CustomerCardRecordConsumptionMapper.xml
  33. 206 0
      Yijia-SaaS/yijia-customer/src/main/resources/mapper/customer/CustomerCardRecordRechargeMapper.xml
  34. 135 0
      Yijia-SaaS/yijia-customer/src/main/resources/mapper/customer/CustomerCardSettingDetailMapper.xml
  35. 144 0
      Yijia-SaaS/yijia-customer/src/main/resources/mapper/customer/CustomerCardSettingMapper.xml
  36. 159 0
      Yijia-SaaS/yijia-customer/src/main/resources/mapper/customer/CustomerElectronicCardMapper.xml
  37. 21 1
      Yijia-SaaS/yijia-customer/src/main/resources/mapper/customer/CustomerManageMapper.xml

+ 174 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/controller/CustomerCardRecordConsumptionController.java

@@ -0,0 +1,174 @@
+package com.yijia.customer.controller;
+
+import java.util.List;
+
+import com.yijia.common.core.domain.entity.SysDept;
+import com.yijia.system.service.ISysDeptService;
+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.CustomerCardRecordConsumption;
+import com.yijia.customer.service.ICustomerCardRecordConsumptionService;
+import com.yijia.common.utils.poi.ExcelUtil;
+import com.yijia.common.core.page.TableDataInfo;
+
+/**
+ * 客户电子会员卡消费记录Controller
+ * 
+ * @author yijia
+ * @date 2021-04-13
+ */
+@RestController
+@RequestMapping("/customer/consumption")
+public class CustomerCardRecordConsumptionController extends BaseController
+{
+    @Autowired
+    private ICustomerCardRecordConsumptionService customerCardRecordConsumptionService;
+    @Autowired
+    private ISysDeptService deptService;
+    /**
+     * 查询客户电子会员卡消费记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('customer:consumption:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(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);
+        }
+        startPage();
+        List<CustomerCardRecordConsumption> list = customerCardRecordConsumptionService.selectCustomerCardRecordConsumptionList(customerCardRecordConsumption);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出客户电子会员卡消费记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('customer:consumption:export')")
+    @Log(title = "客户电子会员卡消费记录", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(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);
+        }
+        List<CustomerCardRecordConsumption> list = customerCardRecordConsumptionService.selectCustomerCardRecordConsumptionList(customerCardRecordConsumption);
+        ExcelUtil<CustomerCardRecordConsumption> util = new ExcelUtil<CustomerCardRecordConsumption>(CustomerCardRecordConsumption.class);
+        return util.exportExcel(list, "consumption");
+    }
+
+    /**
+     * 获取客户电子会员卡消费记录详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('customer:consumption:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(customerCardRecordConsumptionService.selectCustomerCardRecordConsumptionById(id));
+    }
+
+    /**
+     * 新增客户电子会员卡消费记录
+     */
+    @PreAuthorize("@ss.hasPermi('customer:consumption:add')")
+    @Log(title = "客户电子会员卡消费记录", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody CustomerCardRecordConsumption customerCardRecordConsumption)
+    {
+        return toAjax(customerCardRecordConsumptionService.insertCustomerCardRecordConsumption(customerCardRecordConsumption));
+    }
+
+    /**
+     * 修改客户电子会员卡消费记录
+     */
+    @PreAuthorize("@ss.hasPermi('customer:consumption:edit')")
+    @Log(title = "客户电子会员卡消费记录", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody CustomerCardRecordConsumption customerCardRecordConsumption)
+    {
+        return toAjax(customerCardRecordConsumptionService.updateCustomerCardRecordConsumption(customerCardRecordConsumption));
+    }
+
+    /**
+     * 删除客户电子会员卡消费记录
+     */
+    @PreAuthorize("@ss.hasPermi('customer:consumption:remove')")
+    @Log(title = "客户电子会员卡消费记录", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(customerCardRecordConsumptionService.deleteCustomerCardRecordConsumptionByIds(ids));
+    }
+
+    /**
+     * 获取客户电子会员卡消费汇总金额
+     */
+    @PreAuthorize("@ss.hasPermi('customer:consumption:xfAmtQuery')")
+    @GetMapping(value = "xfAmtQuery")
+    public AjaxResult xfAmtQuery(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);
+        }
+        return AjaxResult.success(customerCardRecordConsumptionService.xfAmtQuery(customerCardRecordConsumption));
+    }
+
+    /**
+     * 获取客户电子会员卡消费汇总折线图x 轴数据
+     */
+    @PreAuthorize("@ss.hasPermi('customer:consumption:listXdata')")
+    @GetMapping(value = "listXdata")
+    public TableDataInfo listXdata(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);
+        }
+        List<CustomerCardRecordConsumption> list =customerCardRecordConsumptionService.listXdata(customerCardRecordConsumption);
+        return getTable(list);
+    }
+
+    /**
+     * 获取客户电子会员卡消费汇总折线图充值数据
+     */
+    @PreAuthorize("@ss.hasPermi('customer:consumption:listQydataXF')")
+    @GetMapping(value = "listQydataXF")
+    public TableDataInfo listQydataXF(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);
+        }
+        List<CustomerCardRecordConsumption> list =customerCardRecordConsumptionService.listQydataXF(customerCardRecordConsumption);
+        return getTable(list);
+    }
+}

+ 180 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/controller/CustomerCardRecordRechargeController.java

@@ -0,0 +1,180 @@
+package com.yijia.customer.controller;
+
+import java.util.List;
+
+import com.yijia.common.constant.HttpStatus;
+import com.yijia.common.core.domain.entity.SysDept;
+import com.yijia.system.service.ISysDeptService;
+import org.apache.commons.lang3.StringUtils;
+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.CustomerCardRecordRecharge;
+import com.yijia.customer.service.ICustomerCardRecordRechargeService;
+import com.yijia.common.utils.poi.ExcelUtil;
+import com.yijia.common.core.page.TableDataInfo;
+
+/**
+ * 客户电子会员卡充值记录Controller
+ * 
+ * @author yijia
+ * @date 2021-04-13
+ */
+@RestController
+@RequestMapping("/customer/recharge")
+public class CustomerCardRecordRechargeController extends BaseController
+{
+    @Autowired
+    private ICustomerCardRecordRechargeService customerCardRecordRechargeService;
+    @Autowired
+    private ISysDeptService deptService;
+    /**
+     * 查询客户电子会员卡充值记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('customer:recharge:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(CustomerCardRecordRecharge customerCardRecordRecharge)
+    {
+        if(customerCardRecordRecharge!=null &&customerCardRecordRecharge.getStationId()!=null){
+            SysDept dept =new SysDept();
+            dept.setDeptId(Long.valueOf(customerCardRecordRecharge.getStationId()));
+            List<String> list = deptService.selectDeptId(dept);
+            customerCardRecordRecharge.setStationIdList(list);
+            customerCardRecordRecharge.setStationId(null);
+        }
+        startPage();
+        List<CustomerCardRecordRecharge> list = customerCardRecordRechargeService.selectCustomerCardRecordRechargeList(customerCardRecordRecharge);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出客户电子会员卡充值记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('customer:recharge:export')")
+    @Log(title = "客户电子会员卡充值记录", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(CustomerCardRecordRecharge customerCardRecordRecharge)
+    {
+        if(customerCardRecordRecharge!=null &&customerCardRecordRecharge.getStationId()!=null){
+            SysDept dept =new SysDept();
+            dept.setDeptId(Long.valueOf(customerCardRecordRecharge.getStationId()));
+            List<String> list = deptService.selectDeptId(dept);
+            customerCardRecordRecharge.setStationIdList(list);
+            customerCardRecordRecharge.setStationId(null);
+        }
+        List<CustomerCardRecordRecharge> list = customerCardRecordRechargeService.selectCustomerCardRecordRechargeList(customerCardRecordRecharge);
+        ExcelUtil<CustomerCardRecordRecharge> util = new ExcelUtil<CustomerCardRecordRecharge>(CustomerCardRecordRecharge.class);
+        return util.exportExcel(list, "recharge");
+    }
+
+    /**
+     * 获取客户电子会员卡充值记录详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('customer:recharge:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(customerCardRecordRechargeService.selectCustomerCardRecordRechargeById(id));
+    }
+
+    /**
+     * 新增客户电子会员卡充值记录
+     */
+    @PreAuthorize("@ss.hasPermi('customer:recharge:add')")
+    @Log(title = "客户电子会员卡充值记录", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody CustomerCardRecordRecharge customerCardRecordRecharge)
+    {
+        return toAjax(customerCardRecordRechargeService.insertCustomerCardRecordRecharge(customerCardRecordRecharge));
+    }
+
+    /**
+     * 修改客户电子会员卡充值记录
+     */
+    @PreAuthorize("@ss.hasPermi('customer:recharge:edit')")
+    @Log(title = "客户电子会员卡充值记录", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody CustomerCardRecordRecharge customerCardRecordRecharge)
+    {
+        return toAjax(customerCardRecordRechargeService.updateCustomerCardRecordRecharge(customerCardRecordRecharge));
+    }
+
+    /**
+     * 删除客户电子会员卡充值记录
+     */
+    @PreAuthorize("@ss.hasPermi('customer:recharge:remove')")
+    @Log(title = "客户电子会员卡充值记录", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(customerCardRecordRechargeService.deleteCustomerCardRecordRechargeByIds(ids));
+    }
+
+    /**
+     * 获取客户电子会员卡充值汇总金额
+     */
+    @PreAuthorize("@ss.hasPermi('customer:recharge:czAmtQuery')")
+    @GetMapping(value = "czAmtQuery")
+    public AjaxResult czAmtQuery(CustomerCardRecordRecharge customerCardRecordRecharge)
+    {
+        if(customerCardRecordRecharge!=null &&customerCardRecordRecharge.getStationId()!=null){
+            SysDept dept =new SysDept();
+            dept.setDeptId(Long.valueOf(customerCardRecordRecharge.getStationId()));
+            List<String> list = deptService.selectDeptId(dept);
+            customerCardRecordRecharge.setStationIdList(list);
+            customerCardRecordRecharge.setStationId(null);
+        }
+        return AjaxResult.success(customerCardRecordRechargeService.czAmtQuery(customerCardRecordRecharge));
+    }
+
+
+    /**
+     * 获取客户电子会员卡消费汇总折线图消费数据
+     */
+    @PreAuthorize("@ss.hasPermi('customer::listQydataCZ')")
+    @GetMapping(value = "listQydataCZ")
+    public TableDataInfo listQydataCZ(CustomerCardRecordRecharge customerCardRecordRecharge)
+    {
+        if(customerCardRecordRecharge!=null &&customerCardRecordRecharge.getStationId()!=null){
+            SysDept dept =new SysDept();
+            dept.setDeptId(Long.valueOf(customerCardRecordRecharge.getStationId()));
+            List<String> list = deptService.selectDeptId(dept);
+            customerCardRecordRecharge.setStationIdList(list);
+            customerCardRecordRecharge.setStationId(null);
+        }
+        List<CustomerCardRecordRecharge> list =customerCardRecordRechargeService.listQydataCZ(customerCardRecordRecharge);
+        return getTable(list);
+    }
+    @PreAuthorize("@ss.hasPermi('customer:recharge:selectCardDetail')")
+    @GetMapping("/selectCardDetail")
+    public TableDataInfo selectCardDetail(CustomerCardRecordRecharge customerCardRecordRecharge)
+    {
+        if(customerCardRecordRecharge!=null &&customerCardRecordRecharge.getStationId()!=null){
+            SysDept dept =new SysDept();
+            dept.setDeptId(Long.valueOf(customerCardRecordRecharge.getStationId()));
+            List<String> list = deptService.selectDeptId(dept);
+            customerCardRecordRecharge.setStrSql(StringUtils.join(list, ","));
+            customerCardRecordRecharge.setStationIdList(list);
+            customerCardRecordRecharge.setStationId(null);
+        }
+        List<CustomerCardRecordRecharge> querylist = customerCardRecordRechargeService.selectCardDetail(customerCardRecordRecharge) ;
+        List<CustomerCardRecordRecharge> pagelist = customerCardRecordRechargeService.selectCardDetailPage(customerCardRecordRecharge) ;
+        TableDataInfo rspData = new TableDataInfo();
+        rspData.setCode(HttpStatus.SUCCESS);
+        rspData.setMsg("查询成功");
+        rspData.setRows(querylist);
+        rspData.setTotal(pagelist.size());
+        return rspData;
+    }
+}

+ 122 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/controller/CustomerCardSettingController.java

@@ -0,0 +1,122 @@
+package com.yijia.customer.controller;
+
+import java.util.List;
+
+import com.yijia.common.core.domain.entity.SysDept;
+import com.yijia.system.service.ISysDeptService;
+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.CustomerCardSetting;
+import com.yijia.customer.service.ICustomerCardSettingService;
+import com.yijia.common.utils.poi.ExcelUtil;
+import com.yijia.common.core.page.TableDataInfo;
+
+/**
+ * 客户电子会员卡充值优惠设置Controller
+ * 
+ * @author yijia
+ * @date 2021-04-06
+ */
+@RestController
+@RequestMapping("/customer/cardsetting")
+public class CustomerCardSettingController extends BaseController
+{
+    @Autowired
+    private ICustomerCardSettingService customerCardSettingService;
+
+    @Autowired
+    private ISysDeptService deptService;
+    /**
+     * 查询客户电子会员卡充值优惠设置列表
+     */
+    @PreAuthorize("@ss.hasPermi('customer:cardsetting:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(CustomerCardSetting customerCardSetting)
+    {
+        startPage();
+        List<CustomerCardSetting> list = customerCardSettingService.selectCustomerCardSettingList(customerCardSetting);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出客户电子会员卡充值优惠设置列表
+     */
+    @PreAuthorize("@ss.hasPermi('customer:cardsetting:export')")
+    @Log(title = "客户电子会员卡充值优惠设置", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(CustomerCardSetting customerCardSetting)
+    {
+        List<CustomerCardSetting> list = customerCardSettingService.selectCustomerCardSettingList(customerCardSetting);
+        ExcelUtil<CustomerCardSetting> util = new ExcelUtil<CustomerCardSetting>(CustomerCardSetting.class);
+        return util.exportExcel(list, "setting");
+    }
+
+    /**
+     * 获取客户电子会员卡充值优惠设置详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('customer:cardsetting:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(customerCardSettingService.selectCustomerCardSettingById(id));
+    }
+
+    /**
+     * 新增客户电子会员卡充值优惠设置
+     */
+    @PreAuthorize("@ss.hasPermi('customer:cardsetting:add')")
+    @Log(title = "客户电子会员卡充值优惠设置", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody CustomerCardSetting customerCardSetting)
+    {
+        return toAjax(customerCardSettingService.insertCustomerCardSetting(customerCardSetting));
+    }
+
+    /**
+     * 修改客户电子会员卡充值优惠设置
+     */
+    @PreAuthorize("@ss.hasPermi('customer:cardsetting:edit')")
+    @Log(title = "客户电子会员卡充值优惠设置", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody CustomerCardSetting customerCardSetting)
+    {
+        return toAjax(customerCardSettingService.updateCustomerCardSetting(customerCardSetting));
+    }
+
+    /**
+     * 删除客户电子会员卡充值优惠设置
+     */
+    @PreAuthorize("@ss.hasPermi('customer:cardsetting:remove')")
+    @Log(title = "客户电子会员卡充值优惠设置", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(customerCardSettingService.deleteCustomerCardSettingByIds(ids));
+    }
+    @PreAuthorize("@ss.hasPermi('customer:cardsetting:selectCustomerCardSetting')")
+    @GetMapping(value = "/selectCustomerCardSetting")
+    public AjaxResult selectCustomerCardSetting(CustomerCardSetting customerCardSetting)
+    {
+        if(customerCardSetting!=null &&customerCardSetting.getStationId()!=null){
+            SysDept dept =new SysDept();
+            dept.setDeptId(Long.valueOf(customerCardSetting.getStationId()));
+            List<String> list = deptService.selectDeptId(dept);
+            customerCardSetting.setStationIdList(list);
+            customerCardSetting.setStationId(null);
+        }
+        return AjaxResult.success(customerCardSettingService.selectCustomerCardSetting(customerCardSetting));
+    }
+
+}

+ 115 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/controller/CustomerCardSettingDetailController.java

@@ -0,0 +1,115 @@
+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.CustomerCardSettingDetail;
+import com.yijia.customer.service.ICustomerCardSettingDetailService;
+import com.yijia.common.utils.poi.ExcelUtil;
+import com.yijia.common.core.page.TableDataInfo;
+
+/**
+ * 客户电子会员卡充值优惠设置明细Controller
+ * 
+ * @author yijia
+ * @date 2021-04-06
+ */
+@RestController
+@RequestMapping("/customer/detail")
+public class CustomerCardSettingDetailController extends BaseController
+{
+    @Autowired
+    private ICustomerCardSettingDetailService customerCardSettingDetailService;
+
+    /**
+     * 查询客户电子会员卡充值优惠设置明细列表
+     */
+    @PreAuthorize("@ss.hasPermi('customer:detail:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(CustomerCardSettingDetail customerCardSettingDetail)
+    {
+        startPage();
+        List<CustomerCardSettingDetail> list = customerCardSettingDetailService.selectCustomerCardSettingDetailList(customerCardSettingDetail);
+        return getDataTable(list);
+    }
+
+    /**
+     * 查询客户电子会员卡充值优惠设置明细列表
+     */
+    @PreAuthorize("@ss.hasPermi('customer:detail:listDetailInfo')")
+    @GetMapping("/listDetailInfo")
+    public TableDataInfo listDetailInfo(CustomerCardSettingDetail customerCardSettingDetail)
+    {
+        startPage();
+        List<CustomerCardSettingDetail> list = customerCardSettingDetailService.listDetailInfo(customerCardSettingDetail);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出客户电子会员卡充值优惠设置明细列表
+     */
+    @PreAuthorize("@ss.hasPermi('customer:detail:export')")
+    @Log(title = "客户电子会员卡充值优惠设置明细", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(CustomerCardSettingDetail customerCardSettingDetail)
+    {
+        List<CustomerCardSettingDetail> list = customerCardSettingDetailService.selectCustomerCardSettingDetailList(customerCardSettingDetail);
+        ExcelUtil<CustomerCardSettingDetail> util = new ExcelUtil<CustomerCardSettingDetail>(CustomerCardSettingDetail.class);
+        return util.exportExcel(list, "detail");
+    }
+
+    /**
+     * 获取客户电子会员卡充值优惠设置明细详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('customer:detail:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(customerCardSettingDetailService.selectCustomerCardSettingDetailById(id));
+    }
+
+    /**
+     * 新增客户电子会员卡充值优惠设置明细
+     */
+    @PreAuthorize("@ss.hasPermi('customer:detail:add')")
+    @Log(title = "客户电子会员卡充值优惠设置明细", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody CustomerCardSettingDetail customerCardSettingDetail)
+    {
+        return toAjax(customerCardSettingDetailService.insertCustomerCardSettingDetail(customerCardSettingDetail));
+    }
+
+    /**
+     * 修改客户电子会员卡充值优惠设置明细
+     */
+    @PreAuthorize("@ss.hasPermi('customer:detail:edit')")
+    @Log(title = "客户电子会员卡充值优惠设置明细", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody CustomerCardSettingDetail customerCardSettingDetail)
+    {
+        return toAjax(customerCardSettingDetailService.updateCustomerCardSettingDetail(customerCardSettingDetail));
+    }
+
+    /**
+     * 删除客户电子会员卡充值优惠设置明细
+     */
+    @PreAuthorize("@ss.hasPermi('customer:detail:remove')")
+    @Log(title = "客户电子会员卡充值优惠设置明细", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(customerCardSettingDetailService.deleteCustomerCardSettingDetailByIds(ids));
+    }
+}

+ 163 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/controller/CustomerElectronicCardController.java

@@ -0,0 +1,163 @@
+package com.yijia.customer.controller;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.yijia.common.constant.HttpStatus;
+import com.yijia.common.core.domain.entity.SysDept;
+import com.yijia.system.service.ISysDeptService;
+import org.apache.commons.lang3.StringUtils;
+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.CustomerElectronicCard;
+import com.yijia.customer.service.ICustomerElectronicCardService;
+import com.yijia.common.utils.poi.ExcelUtil;
+import com.yijia.common.core.page.TableDataInfo;
+
+/**
+ * 客户电子会员卡(储蓄卡)Controller
+ * 
+ * @author yijia
+ * @date 2021-04-12
+ */
+@RestController
+@RequestMapping("/customer/card")
+public class CustomerElectronicCardController extends BaseController
+{
+    @Autowired
+    private ICustomerElectronicCardService customerElectronicCardService;
+
+    @Autowired
+    private ISysDeptService deptService;
+    /**
+     * 查询客户电子会员卡(储蓄卡)列表
+     */
+    @PreAuthorize("@ss.hasPermi('customer:card:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(CustomerElectronicCard customerElectronicCard)
+    {
+        if(customerElectronicCard!=null &&customerElectronicCard.getStationId()!=null){
+            SysDept dept =new SysDept();
+            dept.setDeptId(Long.valueOf(customerElectronicCard.getStationId()));
+            List<String> list = deptService.selectDeptId(dept);
+            customerElectronicCard.setStationIdList(list);
+            customerElectronicCard.setStationId(null);
+        }
+        startPage();
+        List<CustomerElectronicCard> list = customerElectronicCardService.selectCustomerElectronicCardList(customerElectronicCard);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出客户电子会员卡(储蓄卡)列表
+     */
+    @PreAuthorize("@ss.hasPermi('customer:card:export')")
+    @Log(title = "客户电子会员卡(储蓄卡)", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(CustomerElectronicCard customerElectronicCard)
+    {
+        List<CustomerElectronicCard> list = customerElectronicCardService.selectCustomerElectronicCardList(customerElectronicCard);
+        ExcelUtil<CustomerElectronicCard> util = new ExcelUtil<CustomerElectronicCard>(CustomerElectronicCard.class);
+        return util.exportExcel(list, "card");
+    }
+
+    /**
+     * 获取客户电子会员卡(储蓄卡)详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('customer:card:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(customerElectronicCardService.selectCustomerElectronicCardById(id));
+    }
+
+    /**
+     * 新增客户电子会员卡(储蓄卡)
+     */
+    @PreAuthorize("@ss.hasPermi('customer:card:add')")
+    @Log(title = "客户电子会员卡(储蓄卡)", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody CustomerElectronicCard customerElectronicCard)
+    {
+        return toAjax(customerElectronicCardService.insertCustomerElectronicCard(customerElectronicCard));
+    }
+
+    /**
+     * 修改客户电子会员卡(储蓄卡)
+     */
+    @PreAuthorize("@ss.hasPermi('customer:card:edit')")
+    @Log(title = "客户电子会员卡(储蓄卡)", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody CustomerElectronicCard customerElectronicCard)
+    {
+        return toAjax(customerElectronicCardService.updateCustomerElectronicCard(customerElectronicCard));
+    }
+
+    /**
+     * 删除客户电子会员卡(储蓄卡)
+     */
+    @PreAuthorize("@ss.hasPermi('customer:card:remove')")
+    @Log(title = "客户电子会员卡(储蓄卡)", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(customerElectronicCardService.deleteCustomerElectronicCardByIds(ids));
+    }
+    /**
+     * 查询电子会员数据
+     */
+    @PreAuthorize("@ss.hasPermi('customer:card:listSum')")
+    @GetMapping("/listSum")
+    public AjaxResult listSum(CustomerElectronicCard customerElectronicCard)
+    {
+        if(customerElectronicCard!=null &&customerElectronicCard.getStationId()!=null){
+            SysDept dept =new SysDept();
+            dept.setDeptId(Long.valueOf(customerElectronicCard.getStationId()));
+            List<String> list = deptService.selectDeptId(dept);
+            customerElectronicCard.setStationIdList(list);
+            customerElectronicCard.setStationId(null);
+        }
+        return AjaxResult.success(customerElectronicCardService.listSum(customerElectronicCard));
+    }
+
+    @PreAuthorize("@ss.hasPermi('customer:card:selectCard')")
+    @GetMapping("/selectCard")
+    public TableDataInfo selectCard(CustomerElectronicCard customerElectronicCard)
+    {
+        if(customerElectronicCard!=null &&customerElectronicCard.getStationId()!=null){
+            SysDept dept =new SysDept();
+            dept.setDeptId(Long.valueOf(customerElectronicCard.getStationId()));
+            List<String> list = deptService.selectDeptId(dept);
+            customerElectronicCard.setStationIdList(list);
+            customerElectronicCard.setStrSql(StringUtils.join(list, ","));
+            customerElectronicCard.setStationId(null);
+        }
+       // startPage();
+        List<CustomerElectronicCard>  querylist= customerElectronicCardService.selectCard(customerElectronicCard) ;
+        List<CustomerElectronicCard> pagelist = customerElectronicCardService.selectCardPage(customerElectronicCard) ;
+       //TableDataInfo  ss =getDataPageTable(querylist,pagelist);
+//        PageInfo<CustomerElectronicCard> pageInfo= new PageInfo<CustomerElectronicCard>(querylist,customerElectronicCard.getPageSetting());
+        TableDataInfo rspData = new TableDataInfo();
+        rspData.setCode(HttpStatus.SUCCESS);
+        rspData.setMsg("查询成功");
+//        List<CustomerElectronicCard>  querylist= new ArrayList<>();
+        rspData.setRows(querylist);
+        rspData.setTotal(pagelist.size());
+        return rspData;
+    }
+
+}

+ 1 - 6
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/controller/CustomerGradeSettingController.java

@@ -1,13 +1,8 @@
 package com.yijia.customer.controller;
-
-import java.util.Arrays;
 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.system.service.ISysDeptService;
-import com.yijia.system.service.ISysUserService;
+
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;

+ 1 - 5
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/controller/CustomerManageController.java

@@ -1,12 +1,9 @@
 package com.yijia.customer.controller;
 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.common.utils.poi.ExcelUtil;
 import com.yijia.customer.domain.CustomerManage;
 import com.yijia.customer.service.ICustomerManageService;
 import com.yijia.system.service.ISysDeptService;
-import com.yijia.system.service.ISysUserService;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -24,7 +21,6 @@ import com.yijia.common.enums.BusinessType;
 
 import com.yijia.common.core.page.TableDataInfo;
 
-import java.util.Arrays;
 import java.util.List;
 
 /**
@@ -56,7 +52,7 @@ public class CustomerManageController extends BaseController
             customerManage.setStationId(null);
         }
         startPage();
-        List<CustomerManage> list = customerManageService.selectCustomerManageList(customerManage);
+        List<CustomerManage> list = customerManageService.selectCustomerManage(customerManage);
         return getDataTable(list);
     }
 

+ 205 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/domain/CustomerCardRecordConsumption.java

@@ -0,0 +1,205 @@
+package com.yijia.customer.domain;
+
+import java.math.BigDecimal;
+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_card_record_consumption
+ * 
+ * @author yijia
+ * @date 2021-04-13
+ */
+public class CustomerCardRecordConsumption extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 消费单号 */
+    @Excel(name = "消费单号")
+    private String orderNo;
+
+    /** 微信用户唯一标识 */
+    @Excel(name = "微信用户唯一标识")
+    private String unionId;
+
+    /** 会员号ID */
+    @Excel(name = "会员号ID")
+    private String customerNo;
+
+    /** 客户名 */
+    @Excel(name = "客户名")
+    private String customerName;
+
+    /** 电子会员卡消费充值类型:+,充值;-,消费; */
+    @Excel(name = "电子会员卡消费充值类型:+,充值;-,消费;")
+    private String usageType;
+
+    /** 电子会员卡充值消费类型:1.微信;2.POS机 */
+    @Excel(name = "电子会员卡充值消费类型:1.微信;2.POS机")
+    private String payType;
+
+    /** 油类:2.柴油;1.汽油; */
+    @Excel(name = "油类:2.柴油;1.汽油;")
+    private String cardOilsType;
+
+    /** 消费金额 */
+    @Excel(name = "消费金额")
+    private BigDecimal amt;
+
+    /** 余额 */
+    @Excel(name = "余额")
+    private BigDecimal balance;
+
+    /** 油站ID */
+    @Excel(name = "油站ID")
+    private Integer stationId;
+
+    /** 油站名称 */
+    @Excel(name = "油站名称")
+    private String stationName;
+
+    /** 是否消费成功:0,未成功;1,成功 */
+    @Excel(name = "是否消费成功:0,未成功;1,成功")
+    private String status;
+
+    public BigDecimal getBalance() {
+        return balance;
+    }
+
+    public void setBalance(BigDecimal balance) {
+        this.balance = balance;
+    }
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setOrderNo(String orderNo) 
+    {
+        this.orderNo = orderNo;
+    }
+
+    public String getOrderNo() 
+    {
+        return orderNo;
+    }
+    public void setUnionId(String unionId) 
+    {
+        this.unionId = unionId;
+    }
+
+    public String getUnionId() 
+    {
+        return unionId;
+    }
+    public void setCustomerNo(String customerNo) 
+    {
+        this.customerNo = customerNo;
+    }
+
+    public String getCustomerNo() 
+    {
+        return customerNo;
+    }
+    public void setCustomerName(String customerName) 
+    {
+        this.customerName = customerName;
+    }
+
+    public String getCustomerName() 
+    {
+        return customerName;
+    }
+    public void setUsageType(String usageType) 
+    {
+        this.usageType = usageType;
+    }
+
+    public String getUsageType() 
+    {
+        return usageType;
+    }
+    public void setPayType(String payType) 
+    {
+        this.payType = payType;
+    }
+
+    public String getPayType() 
+    {
+        return payType;
+    }
+    public void setCardOilsType(String cardOilsType) 
+    {
+        this.cardOilsType = cardOilsType;
+    }
+
+    public String getCardOilsType() 
+    {
+        return cardOilsType;
+    }
+    public void setAmt(BigDecimal amt) 
+    {
+        this.amt = amt;
+    }
+
+    public BigDecimal getAmt() 
+    {
+        return amt;
+    }
+    public void setStationId(Integer stationId) 
+    {
+        this.stationId = stationId;
+    }
+
+    public Integer getStationId() 
+    {
+        return stationId;
+    }
+    public void setStationName(String stationName) 
+    {
+        this.stationName = stationName;
+    }
+
+    public String getStationName() 
+    {
+        return stationName;
+    }
+    public void setStatus(String status) 
+    {
+        this.status = status;
+    }
+
+    public String getStatus() 
+    {
+        return status;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("orderNo", getOrderNo())
+            .append("unionId", getUnionId())
+            .append("customerNo", getCustomerNo())
+            .append("customerName", getCustomerName())
+            .append("usageType", getUsageType())
+            .append("payType", getPayType())
+            .append("cardOilsType", getCardOilsType())
+            .append("amt", getAmt())
+            .append("createTime", getCreateTime())
+            .append("stationId", getStationId())
+            .append("stationName", getStationName())
+            .append("status", getStatus())
+            .toString();
+    }
+}

+ 259 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/domain/CustomerCardRecordRecharge.java

@@ -0,0 +1,259 @@
+package com.yijia.customer.domain;
+
+import java.math.BigDecimal;
+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_card_record_recharge
+ * 
+ * @author yijia
+ * @date 2021-04-13
+ */
+public class CustomerCardRecordRecharge extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 充值单号 */
+    @Excel(name = "充值单号")
+    private String orderNo;
+
+    /** 微信用户唯一标识 */
+    @Excel(name = "微信用户唯一标识")
+    private String unionId;
+
+    /** 会员号ID */
+    @Excel(name = "会员号ID")
+    private String customerNo;
+
+    /** 客户名 */
+    @Excel(name = "客户名")
+    private String customerName;
+
+    /** 电子会员卡消费充值类型:+,充值;-,消费; */
+    @Excel(name = "电子会员卡消费充值类型:+,充值;-,消费;")
+    private String usageType;
+
+    /** 电子会员卡充值消费类型:1.微信;2.POS机 */
+    @Excel(name = "电子会员卡充值消费类型:1.微信;2.POS机")
+    private String payType;
+
+    /** 油类:2.柴油;1.汽油; */
+    @Excel(name = "油类:2.柴油;1.汽油;")
+    private String cardOilsType;
+
+    /** 充值金额 */
+    @Excel(name = "充值金额")
+    private BigDecimal amt;
+
+    /** 赠送金额 */
+    @Excel(name = "赠送金额")
+    private BigDecimal presentAmt;
+
+    /** 余额 */
+    @Excel(name = "余额")
+    private BigDecimal balance;
+
+    /** 油站ID */
+    @Excel(name = "油站ID")
+    private Integer stationId;
+
+    /** 油站名称 */
+    @Excel(name = "油站名称")
+    private String stationName;
+
+    /** 是否充值成功:0,未成功;1,成功 */
+    @Excel(name = "是否充值成功:0,未成功;1,成功")
+    private String status;
+
+    private String  createDate;
+
+    private String strSql;
+    private Integer pageSetting;
+    private Integer pageNo;
+
+    public String getStrSql() {
+        return strSql;
+    }
+
+    public void setStrSql(String strSql) {
+        this.strSql = strSql;
+    }
+
+    public Integer getPageSetting() {
+        return pageSetting;
+    }
+
+    public Integer getPageNo() {
+        return pageNo;
+    }
+
+    public void setPageSetting(Integer pageSetting) {
+        this.pageSetting = pageSetting;
+    }
+
+    public void setPageNo(Integer pageNo) {
+        this.pageNo = pageNo;
+    }
+
+    public String getCreateDate() {
+        return createDate;
+    }
+
+    public void setCreateDate(String createDate) {
+        this.createDate = createDate;
+    }
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setOrderNo(String orderNo) 
+    {
+        this.orderNo = orderNo;
+    }
+
+    public String getOrderNo() 
+    {
+        return orderNo;
+    }
+    public void setUnionId(String unionId) 
+    {
+        this.unionId = unionId;
+    }
+
+    public String getUnionId() 
+    {
+        return unionId;
+    }
+    public void setCustomerNo(String customerNo) 
+    {
+        this.customerNo = customerNo;
+    }
+
+    public String getCustomerNo() 
+    {
+        return customerNo;
+    }
+    public void setCustomerName(String customerName) 
+    {
+        this.customerName = customerName;
+    }
+
+    public String getCustomerName() 
+    {
+        return customerName;
+    }
+    public void setUsageType(String usageType) 
+    {
+        this.usageType = usageType;
+    }
+
+    public String getUsageType() 
+    {
+        return usageType;
+    }
+    public void setPayType(String payType) 
+    {
+        this.payType = payType;
+    }
+
+    public String getPayType() 
+    {
+        return payType;
+    }
+    public void setCardOilsType(String cardOilsType) 
+    {
+        this.cardOilsType = cardOilsType;
+    }
+
+    public String getCardOilsType() 
+    {
+        return cardOilsType;
+    }
+    public void setAmt(BigDecimal amt) 
+    {
+        this.amt = amt;
+    }
+
+    public BigDecimal getAmt() 
+    {
+        return amt;
+    }
+    public void setPresentAmt(BigDecimal presentAmt) 
+    {
+        this.presentAmt = presentAmt;
+    }
+
+    public BigDecimal getPresentAmt() 
+    {
+        return presentAmt;
+    }
+    public void setBalance(BigDecimal balance) 
+    {
+        this.balance = balance;
+    }
+
+    public BigDecimal getBalance() 
+    {
+        return balance;
+    }
+    public void setStationId(Integer stationId) 
+    {
+        this.stationId = stationId;
+    }
+
+    public Integer getStationId() 
+    {
+        return stationId;
+    }
+    public void setStationName(String stationName) 
+    {
+        this.stationName = stationName;
+    }
+
+    public String getStationName() 
+    {
+        return stationName;
+    }
+    public void setStatus(String status) 
+    {
+        this.status = status;
+    }
+
+    public String getStatus() 
+    {
+        return status;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("orderNo", getOrderNo())
+            .append("unionId", getUnionId())
+            .append("customerNo", getCustomerNo())
+            .append("customerName", getCustomerName())
+            .append("usageType", getUsageType())
+            .append("payType", getPayType())
+            .append("cardOilsType", getCardOilsType())
+            .append("amt", getAmt())
+            .append("presentAmt", getPresentAmt())
+            .append("balance", getBalance())
+            .append("createTime", getCreateTime())
+            .append("stationId", getStationId())
+            .append("stationName", getStationName())
+            .append("status", getStatus())
+            .toString();
+    }
+}

+ 191 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/domain/CustomerCardSetting.java

@@ -0,0 +1,191 @@
+package com.yijia.customer.domain;
+
+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;
+
+import java.util.List;
+
+/**
+ * 客户电子会员卡充值优惠设置对象 customer_card_setting
+ * 
+ * @author yijia
+ * @date 2021-04-06
+ */
+public class CustomerCardSetting extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 电子充值卡油类类型:1.柴油;2.汽油; */
+    @Excel(name = "电子充值卡油类类型:1.柴油;2.汽油;")
+    private String cardOilsType;
+
+    /** 会员活动设置(0.禁用,1.启用) */
+    @Excel(name = "会员活动设置", readConverterExp = "0=.禁用,1.启用")
+    private String discountTimeSetting;
+
+    /** 会员日活动时间 */
+    @Excel(name = "会员日活动时间")
+    private String discountTime;
+    private String discountTimeType;
+    /** 赠送比例 */
+    @Excel(name = "赠送比例")
+    private String presentScale;
+
+    /** 是否可以使用优惠券:0,否;1,是 */
+    @Excel(name = "是否可以使用优惠券:0,否;1,是")
+    private String isDiscountCoupon;
+
+    /** 积分可享受倍数 */
+    @Excel(name = "积分可享受倍数")
+    private String enjoyIntegralMultiple;
+
+    /** 油站ID */
+    @Excel(name = "油站ID")
+    private Long stationId;
+
+    /** 油站名称 */
+    @Excel(name = "油站名称")
+    private String stationName;
+
+    private String isGradeSetting;
+
+    private String isMarket;
+
+    public String getIsGradeSetting() {
+        return isGradeSetting;
+    }
+
+    public void setIsGradeSetting(String isGradeSetting) {
+        this.isGradeSetting = isGradeSetting;
+    }
+
+    public String getIsMarket() {
+        return isMarket;
+    }
+
+    public void setIsMarket(String isMarket) {
+        this.isMarket = isMarket;
+    }
+
+    public String getDiscountTimeType() {
+        return discountTimeType;
+    }
+
+    public void setDiscountTimeType(String discountTimeType) {
+        this.discountTimeType = discountTimeType;
+    }
+
+    private List<CustomerCardSettingDetail> detailList;
+
+    public List<CustomerCardSettingDetail> getDetailList() {
+        return detailList;
+    }
+
+    public void setDetailList(List<CustomerCardSettingDetail> detailList) {
+        this.detailList = detailList;
+    }
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setCardOilsType(String cardOilsType) 
+    {
+        this.cardOilsType = cardOilsType;
+    }
+
+    public String getCardOilsType() 
+    {
+        return cardOilsType;
+    }
+    public void setDiscountTimeSetting(String discountTimeSetting) 
+    {
+        this.discountTimeSetting = discountTimeSetting;
+    }
+
+    public String getDiscountTimeSetting() 
+    {
+        return discountTimeSetting;
+    }
+    public void setDiscountTime(String discountTime) 
+    {
+        this.discountTime = discountTime;
+    }
+
+    public String getDiscountTime() 
+    {
+        return discountTime;
+    }
+    public void setPresentScale(String presentScale) 
+    {
+        this.presentScale = presentScale;
+    }
+
+    public String getPresentScale() 
+    {
+        return presentScale;
+    }
+    public void setIsDiscountCoupon(String isDiscountCoupon) 
+    {
+        this.isDiscountCoupon = isDiscountCoupon;
+    }
+
+    public String getIsDiscountCoupon() 
+    {
+        return isDiscountCoupon;
+    }
+    public void setEnjoyIntegralMultiple(String enjoyIntegralMultiple) 
+    {
+        this.enjoyIntegralMultiple = enjoyIntegralMultiple;
+    }
+
+    public String getEnjoyIntegralMultiple() 
+    {
+        return enjoyIntegralMultiple;
+    }
+    public void setStationId(Long stationId) 
+    {
+        this.stationId = stationId;
+    }
+
+    public Long getStationId() 
+    {
+        return stationId;
+    }
+    public void setStationName(String stationName) 
+    {
+        this.stationName = stationName;
+    }
+
+    public String getStationName() 
+    {
+        return stationName;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("cardOilsType", getCardOilsType())
+            .append("discountTimeSetting", getDiscountTimeSetting())
+            .append("discountTime", getDiscountTime())
+            .append("discountTimeType", getDiscountTimeType())
+            .append("presentScale", getPresentScale())
+            .append("isDiscountCoupon", getIsDiscountCoupon())
+            .append("enjoyIntegralMultiple", getEnjoyIntegralMultiple())
+            .append("stationId", getStationId())
+            .append("stationName", getStationName())
+            .append("createTime", getCreateTime())
+            .toString();
+    }
+}

+ 174 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/domain/CustomerCardSettingDetail.java

@@ -0,0 +1,174 @@
+package com.yijia.customer.domain;
+
+import java.math.BigDecimal;
+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_card_setting_detail
+ * 
+ * @author yijia
+ * @date 2021-04-06
+ */
+public class CustomerCardSettingDetail extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 所对应电子会员卡ID */
+    @Excel(name = "所对应电子会员卡ID")
+    private Long parentId;
+
+    /** 设置充值优惠类型:1,按赠送金额;2,按赠送比例 */
+    @Excel(name = "设置充值优惠类型:1,按赠送金额;2,按赠送比例")
+    private String settingRuleType;
+    private BigDecimal discountAmtStart;
+    private BigDecimal discountAmtEnd;
+    private String oilName;
+    private String status;
+    private String cardOilsType;
+    private String discountTimeSetting;
+    private String discountTimeType;
+    private String isDiscountCoupon;
+    private String isGradeSetting;
+    private String isMarket;
+
+    public String getCardOilsType() {
+        return cardOilsType;
+    }
+
+    public void setCardOilsType(String cardOilsType) {
+        this.cardOilsType = cardOilsType;
+    }
+
+    public String getDiscountTimeSetting() {
+        return discountTimeSetting;
+    }
+
+    public void setDiscountTimeSetting(String discountTimeSetting) {
+        this.discountTimeSetting = discountTimeSetting;
+    }
+
+    public String getDiscountTimeType() {
+        return discountTimeType;
+    }
+
+    public void setDiscountTimeType(String discountTimeType) {
+        this.discountTimeType = discountTimeType;
+    }
+
+    public String getIsDiscountCoupon() {
+        return isDiscountCoupon;
+    }
+
+    public void setIsDiscountCoupon(String isDiscountCoupon) {
+        this.isDiscountCoupon = isDiscountCoupon;
+    }
+
+    public String getIsGradeSetting() {
+        return isGradeSetting;
+    }
+
+    public void setIsGradeSetting(String isGradeSetting) {
+        this.isGradeSetting = isGradeSetting;
+    }
+
+    public String getIsMarket() {
+        return isMarket;
+    }
+
+    public void setIsMarket(String isMarket) {
+        this.isMarket = isMarket;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public String getOilName() {
+        return oilName;
+    }
+
+    public void setOilName(String oilName) {
+        this.oilName = oilName;
+    }
+
+    public BigDecimal getDiscountAmtStart() {
+        return discountAmtStart;
+    }
+
+    public void setDiscountAmtStart(BigDecimal discountAmtStart) {
+        this.discountAmtStart = discountAmtStart;
+    }
+
+    public BigDecimal getDiscountAmtEnd() {
+        return discountAmtEnd;
+    }
+
+    public void setDiscountAmtEnd(BigDecimal discountAmtEnd) {
+        this.discountAmtEnd = discountAmtEnd;
+    }
+
+    /** 赠送金额值或者赠送c充值金额的比例 */
+    @Excel(name = "赠送金额值或者赠送c充值金额的比例")
+    private BigDecimal presentAmt;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setParentId(Long parentId) 
+    {
+        this.parentId = parentId;
+    }
+
+    public Long getParentId() 
+    {
+        return parentId;
+    }
+    public void setSettingRuleType(String settingRuleType) 
+    {
+        this.settingRuleType = settingRuleType;
+    }
+
+    public String getSettingRuleType() 
+    {
+        return settingRuleType;
+    }
+    public void setPresentAmt(BigDecimal presentAmt) 
+    {
+        this.presentAmt = presentAmt;
+    }
+
+    public BigDecimal getPresentAmt() 
+    {
+        return presentAmt;
+    }
+
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("parentId", getParentId())
+            .append("settingRuleType", getSettingRuleType())
+            .append("discountAmtStart", getDiscountAmtStart())
+            .append("discountAmtEnd", getDiscountAmtEnd())
+            .append("presentAmt", getPresentAmt())
+            .append("status", getStatus())
+            .toString();
+    }
+}

+ 284 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/domain/CustomerElectronicCard.java

@@ -0,0 +1,284 @@
+package com.yijia.customer.domain;
+
+import java.math.BigDecimal;
+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_electronic_card
+ * 
+ * @author yijia
+ * @date 2021-04-12
+ */
+public class CustomerElectronicCard extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long id;
+
+    /** 微信用户唯一标识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;
+
+    /** 客户名 */
+    @Excel(name = "客户名")
+    private String customerName;
+
+    /** 用户手机号 */
+    @Excel(name = "用户手机号")
+    private String mobilePhone;
+
+    /** 电子储蓄卡余额 */
+    @Excel(name = "电子储蓄卡余额")
+    private BigDecimal amt;
+
+    /** 电子会员卡类型:1,汽油;2.柴油; */
+    @Excel(name = "电子会员卡类型:1,汽油;2.柴油;")
+    private String cardOilsType;
+
+    /** 油站ID */
+    @Excel(name = "油站ID")
+    private Integer stationId;
+    private Integer num;
+
+    /** 油站名称 */
+    @Excel(name = "油站名称")
+    private String stationName;
+
+    /** 最近使用时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "最近使用时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date recentlyTime;
+
+    @Excel(name = "充值金额")
+    private BigDecimal czamt;
+    @Excel(name = "消费金额")
+    private BigDecimal xfamt;
+    @Excel(name = "电子会员数量")
+    private BigDecimal cardnum;
+    @Excel(name = "累计余额")
+    private BigDecimal cumamt;
+    @Excel(name = "累计电子会员数量")
+    private BigDecimal cumnum;
+
+    private Integer pageSetting;
+    private Integer pageNo;
+    private String strSql;
+
+    public String getStrSql() {
+        return strSql;
+    }
+
+    public void setStrSql(String strSql) {
+        this.strSql = strSql;
+    }
+
+    public Integer getPageSetting() {
+        return pageSetting;
+    }
+
+    public void setPageSetting(Integer pageSetting) {
+        this.pageSetting = pageSetting;
+    }
+
+    public Integer getPageNo() {
+        return pageNo;
+    }
+
+    public void setPageNo(Integer pageNo) {
+        this.pageNo = pageNo;
+    }
+
+    public BigDecimal getCzamt() {
+        return czamt;
+    }
+
+    public void setCzamt(BigDecimal czamt) {
+        this.czamt = czamt;
+    }
+
+    public BigDecimal getXfamt() {
+        return xfamt;
+    }
+
+    public void setXfamt(BigDecimal xfamt) {
+        this.xfamt = xfamt;
+    }
+
+    public BigDecimal getCardnum() {
+        return cardnum;
+    }
+
+    public void setCardnum(BigDecimal cardnum) {
+        this.cardnum = cardnum;
+    }
+
+    public BigDecimal getCumamt() {
+        return cumamt;
+    }
+
+    public void setCumamt(BigDecimal cumamt) {
+        this.cumamt = cumamt;
+    }
+
+    public BigDecimal getCumnum() {
+        return cumnum;
+    }
+
+    public void setCumnum(BigDecimal cumnum) {
+        this.cumnum = cumnum;
+    }
+
+    public Integer getNum() {
+        return num;
+    }
+
+    public void setNum(Integer num) {
+        this.num = num;
+    }
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setUnionId(String unionId) 
+    {
+        this.unionId = unionId;
+    }
+
+    public String getUnionId() 
+    {
+        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;
+    }
+
+    public String getCustomerNo() 
+    {
+        return customerNo;
+    }
+    public void setCustomerName(String customerName) 
+    {
+        this.customerName = customerName;
+    }
+
+    public String getCustomerName() 
+    {
+        return customerName;
+    }
+    public void setMobilePhone(String mobilePhone) 
+    {
+        this.mobilePhone = mobilePhone;
+    }
+
+    public String getMobilePhone() 
+    {
+        return mobilePhone;
+    }
+    public void setAmt(BigDecimal amt) 
+    {
+        this.amt = amt;
+    }
+
+    public BigDecimal getAmt() 
+    {
+        return amt;
+    }
+    public void setCardOilsType(String cardOilsType) 
+    {
+        this.cardOilsType = cardOilsType;
+    }
+
+    public String getCardOilsType() 
+    {
+        return cardOilsType;
+    }
+    public void setStationId(Integer stationId) 
+    {
+        this.stationId = stationId;
+    }
+
+    public Integer getStationId() 
+    {
+        return stationId;
+    }
+    public void setStationName(String stationName) 
+    {
+        this.stationName = stationName;
+    }
+
+    public String getStationName() 
+    {
+        return stationName;
+    }
+    public void setRecentlyTime(Date recentlyTime) 
+    {
+        this.recentlyTime = recentlyTime;
+    }
+
+    public Date getRecentlyTime() 
+    {
+        return recentlyTime;
+    }
+
+    @Override
+    public String toString() {
+        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())
+            .append("amt", getAmt())
+            .append("cardOilsType", getCardOilsType())
+            .append("stationId", getStationId())
+            .append("stationName", getStationName())
+            .append("createTime", getCreateTime())
+            .append("recentlyTime", getRecentlyTime())
+            .toString();
+    }
+}

+ 76 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/mapper/CustomerCardRecordConsumptionMapper.java

@@ -0,0 +1,76 @@
+package com.yijia.customer.mapper;
+
+import java.util.List;
+import com.yijia.customer.domain.CustomerCardRecordConsumption;
+
+/**
+ * 客户电子会员卡消费记录Mapper接口
+ * 
+ * @author yijia
+ * @date 2021-04-13
+ */
+public interface CustomerCardRecordConsumptionMapper 
+{
+    /**
+     * 查询客户电子会员卡消费记录
+     * 
+     * @param id 客户电子会员卡消费记录ID
+     * @return 客户电子会员卡消费记录
+     */
+    public CustomerCardRecordConsumption selectCustomerCardRecordConsumptionById(Long id);
+
+    /**
+     * 查询客户电子会员卡消费记录列表
+     * 
+     * @param customerCardRecordConsumption 客户电子会员卡消费记录
+     * @return 客户电子会员卡消费记录集合
+     */
+    public List<CustomerCardRecordConsumption> selectCustomerCardRecordConsumptionList(CustomerCardRecordConsumption customerCardRecordConsumption);
+
+    /**
+     * 新增客户电子会员卡消费记录
+     * 
+     * @param customerCardRecordConsumption 客户电子会员卡消费记录
+     * @return 结果
+     */
+    public int insertCustomerCardRecordConsumption(CustomerCardRecordConsumption customerCardRecordConsumption);
+
+    /**
+     * 修改客户电子会员卡消费记录
+     * 
+     * @param customerCardRecordConsumption 客户电子会员卡消费记录
+     * @return 结果
+     */
+    public int updateCustomerCardRecordConsumption(CustomerCardRecordConsumption customerCardRecordConsumption);
+
+    /**
+     * 删除客户电子会员卡消费记录
+     * 
+     * @param id 客户电子会员卡消费记录ID
+     * @return 结果
+     */
+    public int deleteCustomerCardRecordConsumptionById(Long id);
+
+    /**
+     * 批量删除客户电子会员卡消费记录
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteCustomerCardRecordConsumptionByIds(Long[] ids);
+
+    /**
+     * 获取客户电子会员卡消费汇总金额
+     */
+    public  CustomerCardRecordConsumption xfAmtQuery(CustomerCardRecordConsumption customerCardRecordConsumption);
+    /**
+     * 获取客户电子会员卡消费汇总折线图X轴数据
+     */
+    public List<CustomerCardRecordConsumption> listXdata(CustomerCardRecordConsumption customerCardRecordConsumption);
+
+
+    /**
+     * 获取客户电子会员卡消费汇总折线图充值数据
+     */
+    public List<CustomerCardRecordConsumption> listQydataXF(CustomerCardRecordConsumption customerCardRecordConsumption);
+}

+ 78 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/mapper/CustomerCardRecordRechargeMapper.java

@@ -0,0 +1,78 @@
+package com.yijia.customer.mapper;
+
+import java.util.List;
+import com.yijia.customer.domain.CustomerCardRecordRecharge;
+
+/**
+ * 客户电子会员卡充值记录Mapper接口
+ * 
+ * @author yijia
+ * @date 2021-04-13
+ */
+public interface CustomerCardRecordRechargeMapper 
+{
+    /**
+     * 查询客户电子会员卡充值记录
+     * 
+     * @param id 客户电子会员卡充值记录ID
+     * @return 客户电子会员卡充值记录
+     */
+    public CustomerCardRecordRecharge selectCustomerCardRecordRechargeById(Long id);
+
+    /**
+     * 查询客户电子会员卡充值记录列表
+     * 
+     * @param customerCardRecordRecharge 客户电子会员卡充值记录
+     * @return 客户电子会员卡充值记录集合
+     */
+    public List<CustomerCardRecordRecharge> selectCustomerCardRecordRechargeList(CustomerCardRecordRecharge customerCardRecordRecharge);
+
+    /**
+     * 新增客户电子会员卡充值记录
+     * 
+     * @param customerCardRecordRecharge 客户电子会员卡充值记录
+     * @return 结果
+     */
+    public int insertCustomerCardRecordRecharge(CustomerCardRecordRecharge customerCardRecordRecharge);
+
+    /**
+     * 修改客户电子会员卡充值记录
+     * 
+     * @param customerCardRecordRecharge 客户电子会员卡充值记录
+     * @return 结果
+     */
+    public int updateCustomerCardRecordRecharge(CustomerCardRecordRecharge customerCardRecordRecharge);
+
+    /**
+     * 删除客户电子会员卡充值记录
+     * 
+     * @param id 客户电子会员卡充值记录ID
+     * @return 结果
+     */
+    public int deleteCustomerCardRecordRechargeById(Long id);
+
+    /**
+     * 批量删除客户电子会员卡充值记录
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteCustomerCardRecordRechargeByIds(Long[] ids);
+    /**
+     * 获取客户电子会员卡充值汇总金额
+     */
+    public CustomerCardRecordRecharge czAmtQuery(CustomerCardRecordRecharge customerCardRecordRecharge);
+    /**
+     * 获取客户电子会员卡消费汇总折线图消费数据
+     */
+    public List<CustomerCardRecordRecharge> listQydataCZ(CustomerCardRecordRecharge customerCardRecordRecharge);
+
+    /**
+     * 获取客户电子会员卡消费充值明细
+     */
+    public List<CustomerCardRecordRecharge> selectCardDetail(CustomerCardRecordRecharge customerCardRecordRecharge);
+    /**
+     * 获取客户电子会员卡消费充值明细分页
+     */
+    public List<CustomerCardRecordRecharge> selectCardDetailPage(CustomerCardRecordRecharge customerCardRecordRecharge);
+}

+ 65 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/mapper/CustomerCardSettingDetailMapper.java

@@ -0,0 +1,65 @@
+package com.yijia.customer.mapper;
+
+import java.util.List;
+import com.yijia.customer.domain.CustomerCardSettingDetail;
+
+/**
+ * 客户电子会员卡充值优惠设置明细Mapper接口
+ * 
+ * @author yijia
+ * @date 2021-04-06
+ */
+public interface CustomerCardSettingDetailMapper 
+{
+    /**
+     * 查询客户电子会员卡充值优惠设置明细
+     * 
+     * @param id 客户电子会员卡充值优惠设置明细ID
+     * @return 客户电子会员卡充值优惠设置明细
+     */
+    public CustomerCardSettingDetail selectCustomerCardSettingDetailById(Long id);
+
+    /**
+     * 查询客户电子会员卡充值优惠设置明细列表
+     * 
+     * @param customerCardSettingDetail 客户电子会员卡充值优惠设置明细
+     * @return 客户电子会员卡充值优惠设置明细集合
+     */
+    public List<CustomerCardSettingDetail> selectCustomerCardSettingDetailList(CustomerCardSettingDetail customerCardSettingDetail);
+
+    /**
+     * 新增客户电子会员卡充值优惠设置明细
+     * 
+     * @param customerCardSettingDetail 客户电子会员卡充值优惠设置明细
+     * @return 结果
+     */
+    public int insertCustomerCardSettingDetail(CustomerCardSettingDetail customerCardSettingDetail);
+
+    /**
+     * 修改客户电子会员卡充值优惠设置明细
+     * 
+     * @param customerCardSettingDetail 客户电子会员卡充值优惠设置明细
+     * @return 结果
+     */
+    public int updateCustomerCardSettingDetail(CustomerCardSettingDetail customerCardSettingDetail);
+
+    /**
+     * 删除客户电子会员卡充值优惠设置明细
+     * 
+     * @param id 客户电子会员卡充值优惠设置明细ID
+     * @return 结果
+     */
+    public int deleteCustomerCardSettingDetailById(Long id);
+
+    /**
+     * 批量删除客户电子会员卡充值优惠设置明细
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteCustomerCardSettingDetailByIds(Long[] ids);
+
+    public void deleteCustomerCardSettingDetail(CustomerCardSettingDetail detil);
+
+    public List<CustomerCardSettingDetail> listDetailInfo(CustomerCardSettingDetail customerCardSettingDetail);
+}

+ 65 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/mapper/CustomerCardSettingMapper.java

@@ -0,0 +1,65 @@
+package com.yijia.customer.mapper;
+
+import java.util.List;
+import com.yijia.customer.domain.CustomerCardSetting;
+
+/**
+ * 客户电子会员卡充值优惠设置Mapper接口
+ * 
+ * @author yijia
+ * @date 2021-04-06
+ */
+public interface CustomerCardSettingMapper 
+{
+    /**
+     * 查询客户电子会员卡充值优惠设置
+     * 
+     * @param id 客户电子会员卡充值优惠设置ID
+     * @return 客户电子会员卡充值优惠设置
+     */
+    public CustomerCardSetting selectCustomerCardSettingById(Long id);
+
+    /**
+     * 查询客户电子会员卡充值优惠设置列表
+     * 
+     * @param customerCardSetting 客户电子会员卡充值优惠设置
+     * @return 客户电子会员卡充值优惠设置集合
+     */
+    public List<CustomerCardSetting> selectCustomerCardSettingList(CustomerCardSetting customerCardSetting);
+
+    /**
+     * 新增客户电子会员卡充值优惠设置
+     * 
+     * @param customerCardSetting 客户电子会员卡充值优惠设置
+     * @return 结果
+     */
+    public int insertCustomerCardSetting(CustomerCardSetting customerCardSetting);
+
+    /**
+     * 修改客户电子会员卡充值优惠设置
+     * 
+     * @param customerCardSetting 客户电子会员卡充值优惠设置
+     * @return 结果
+     */
+    public int updateCustomerCardSetting(CustomerCardSetting customerCardSetting);
+
+    /**
+     * 删除客户电子会员卡充值优惠设置
+     * 
+     * @param id 客户电子会员卡充值优惠设置ID
+     * @return 结果
+     */
+    public int deleteCustomerCardSettingById(Long id);
+
+    /**
+     * 批量删除客户电子会员卡充值优惠设置
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteCustomerCardSettingByIds(Long[] ids);
+
+    public CustomerCardSetting selectCustomerCardSetting(CustomerCardSetting customerCardSetting);
+
+    public  CustomerCardSetting selectCardSetting(CustomerCardSetting customerCardSetting);
+}

+ 73 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/mapper/CustomerElectronicCardMapper.java

@@ -0,0 +1,73 @@
+package com.yijia.customer.mapper;
+
+import java.util.List;
+import com.yijia.customer.domain.CustomerElectronicCard;
+
+/**
+ * 客户电子会员卡(储蓄卡)Mapper接口
+ * 
+ * @author yijia
+ * @date 2021-04-12
+ */
+public interface CustomerElectronicCardMapper 
+{
+    /**
+     * 查询客户电子会员卡(储蓄卡)
+     * 
+     * @param id 客户电子会员卡(储蓄卡)ID
+     * @return 客户电子会员卡(储蓄卡)
+     */
+    public CustomerElectronicCard selectCustomerElectronicCardById(Long id);
+
+    /**
+     * 查询客户电子会员卡(储蓄卡)列表
+     * 
+     * @param customerElectronicCard 客户电子会员卡(储蓄卡)
+     * @return 客户电子会员卡(储蓄卡)集合
+     */
+    public List<CustomerElectronicCard> selectCustomerElectronicCardList(CustomerElectronicCard customerElectronicCard);
+
+    /**
+     * 新增客户电子会员卡(储蓄卡)
+     * 
+     * @param customerElectronicCard 客户电子会员卡(储蓄卡)
+     * @return 结果
+     */
+    public int insertCustomerElectronicCard(CustomerElectronicCard customerElectronicCard);
+
+    /**
+     * 修改客户电子会员卡(储蓄卡)
+     * 
+     * @param customerElectronicCard 客户电子会员卡(储蓄卡)
+     * @return 结果
+     */
+    public int updateCustomerElectronicCard(CustomerElectronicCard customerElectronicCard);
+
+    /**
+     * 删除客户电子会员卡(储蓄卡)
+     * 
+     * @param id 客户电子会员卡(储蓄卡)ID
+     * @return 结果
+     */
+    public int deleteCustomerElectronicCardById(Long id);
+
+    /**
+     * 批量删除客户电子会员卡(储蓄卡)
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteCustomerElectronicCardByIds(Long[] ids);
+
+    /**
+     * 查询电子会员数据
+     */
+    public CustomerElectronicCard listSum(CustomerElectronicCard customerElectronicCard);
+
+    /**
+     * 查询电子会员报表数据
+     */
+    public List<CustomerElectronicCard> selectCard(CustomerElectronicCard customerElectronicCard);
+
+    public List<CustomerElectronicCard> selectCardPage(CustomerElectronicCard customerElectronicCard);
+}

+ 7 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/mapper/CustomerManageMapper.java

@@ -60,4 +60,11 @@ public interface CustomerManageMapper
      * @return 结果
      */
     public int deleteCustomerManageByIds(Long[] ids);
+
+    /**
+     * 客户信息查询
+     * @param customerManage
+     * @return
+     */
+    public List<CustomerManage> selectCustomerManage(CustomerManage customerManage);
 }

+ 75 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/service/ICustomerCardRecordConsumptionService.java

@@ -0,0 +1,75 @@
+package com.yijia.customer.service;
+
+import java.util.List;
+import com.yijia.customer.domain.CustomerCardRecordConsumption;
+
+/**
+ * 客户电子会员卡消费记录Service接口
+ * 
+ * @author yijia
+ * @date 2021-04-13
+ */
+public interface ICustomerCardRecordConsumptionService 
+{
+    /**
+     * 查询客户电子会员卡消费记录
+     * 
+     * @param id 客户电子会员卡消费记录ID
+     * @return 客户电子会员卡消费记录
+     */
+    public CustomerCardRecordConsumption selectCustomerCardRecordConsumptionById(Long id);
+
+    /**
+     * 查询客户电子会员卡消费记录列表
+     * 
+     * @param customerCardRecordConsumption 客户电子会员卡消费记录
+     * @return 客户电子会员卡消费记录集合
+     */
+    public List<CustomerCardRecordConsumption> selectCustomerCardRecordConsumptionList(CustomerCardRecordConsumption customerCardRecordConsumption);
+
+    /**
+     * 新增客户电子会员卡消费记录
+     * 
+     * @param customerCardRecordConsumption 客户电子会员卡消费记录
+     * @return 结果
+     */
+    public int insertCustomerCardRecordConsumption(CustomerCardRecordConsumption customerCardRecordConsumption);
+
+    /**
+     * 修改客户电子会员卡消费记录
+     * 
+     * @param customerCardRecordConsumption 客户电子会员卡消费记录
+     * @return 结果
+     */
+    public int updateCustomerCardRecordConsumption(CustomerCardRecordConsumption customerCardRecordConsumption);
+
+    /**
+     * 批量删除客户电子会员卡消费记录
+     * 
+     * @param ids 需要删除的客户电子会员卡消费记录ID
+     * @return 结果
+     */
+    public int deleteCustomerCardRecordConsumptionByIds(Long[] ids);
+
+    /**
+     * 删除客户电子会员卡消费记录信息
+     * 
+     * @param id 客户电子会员卡消费记录ID
+     * @return 结果
+     */
+    public int deleteCustomerCardRecordConsumptionById(Long id);
+
+    /**
+     * 获取客户电子会员卡消费汇总金额
+     */
+    public CustomerCardRecordConsumption xfAmtQuery(CustomerCardRecordConsumption customerCardRecordConsumption);
+
+    /**
+     * 获取客户电子会员卡消费汇总折线图x 轴数据
+     */
+    public  List<CustomerCardRecordConsumption> listXdata(CustomerCardRecordConsumption customerCardRecordConsumption);
+    /**
+     * 获取客户电子会员卡消费汇总折线图充值数据
+     */
+    public  List<CustomerCardRecordConsumption> listQydataXF(CustomerCardRecordConsumption customerCardRecordConsumption);
+}

+ 79 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/service/ICustomerCardRecordRechargeService.java

@@ -0,0 +1,79 @@
+package com.yijia.customer.service;
+
+import java.util.List;
+import com.yijia.customer.domain.CustomerCardRecordRecharge;
+
+/**
+ * 客户电子会员卡充值记录Service接口
+ * 
+ * @author yijia
+ * @date 2021-04-13
+ */
+public interface ICustomerCardRecordRechargeService 
+{
+    /**
+     * 查询客户电子会员卡充值记录
+     * 
+     * @param id 客户电子会员卡充值记录ID
+     * @return 客户电子会员卡充值记录
+     */
+    public CustomerCardRecordRecharge selectCustomerCardRecordRechargeById(Long id);
+
+    /**
+     * 查询客户电子会员卡充值记录列表
+     * 
+     * @param customerCardRecordRecharge 客户电子会员卡充值记录
+     * @return 客户电子会员卡充值记录集合
+     */
+    public List<CustomerCardRecordRecharge> selectCustomerCardRecordRechargeList(CustomerCardRecordRecharge customerCardRecordRecharge);
+
+    /**
+     * 新增客户电子会员卡充值记录
+     * 
+     * @param customerCardRecordRecharge 客户电子会员卡充值记录
+     * @return 结果
+     */
+    public int insertCustomerCardRecordRecharge(CustomerCardRecordRecharge customerCardRecordRecharge);
+
+    /**
+     * 修改客户电子会员卡充值记录
+     * 
+     * @param customerCardRecordRecharge 客户电子会员卡充值记录
+     * @return 结果
+     */
+    public int updateCustomerCardRecordRecharge(CustomerCardRecordRecharge customerCardRecordRecharge);
+
+    /**
+     * 批量删除客户电子会员卡充值记录
+     * 
+     * @param ids 需要删除的客户电子会员卡充值记录ID
+     * @return 结果
+     */
+    public int deleteCustomerCardRecordRechargeByIds(Long[] ids);
+
+    /**
+     * 删除客户电子会员卡充值记录信息
+     * 
+     * @param id 客户电子会员卡充值记录ID
+     * @return 结果
+     */
+    public int deleteCustomerCardRecordRechargeById(Long id);
+    /**
+     * 获取客户电子会员卡充值汇总金额
+     */
+    public CustomerCardRecordRecharge czAmtQuery(CustomerCardRecordRecharge customerCardRecordRecharge);
+
+    /**
+     * 获取客户电子会员卡消费汇总折线图消费数据
+     */
+    public List<CustomerCardRecordRecharge> listQydataCZ(CustomerCardRecordRecharge customerCardRecordRecharge);
+
+    /**
+     * 获取客户电子会员卡消费充值明细
+     */
+    public List<CustomerCardRecordRecharge> selectCardDetail(CustomerCardRecordRecharge customerCardRecordRecharge);
+    /**
+     * 获取客户电子会员卡消费充值明细分页
+     */
+    public List<CustomerCardRecordRecharge> selectCardDetailPage(CustomerCardRecordRecharge customerCardRecordRecharge);
+}

+ 68 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/service/ICustomerCardSettingDetailService.java

@@ -0,0 +1,68 @@
+package com.yijia.customer.service;
+
+import java.util.List;
+import com.yijia.customer.domain.CustomerCardSettingDetail;
+
+/**
+ * 客户电子会员卡充值优惠设置明细Service接口
+ * 
+ * @author yijia
+ * @date 2021-04-06
+ */
+public interface ICustomerCardSettingDetailService 
+{
+    /**
+     * 查询客户电子会员卡充值优惠设置明细
+     * 
+     * @param id 客户电子会员卡充值优惠设置明细ID
+     * @return 客户电子会员卡充值优惠设置明细
+     */
+    public CustomerCardSettingDetail selectCustomerCardSettingDetailById(Long id);
+
+    /**
+     * 查询客户电子会员卡充值优惠设置明细列表
+     * 
+     * @param customerCardSettingDetail 客户电子会员卡充值优惠设置明细
+     * @return 客户电子会员卡充值优惠设置明细集合
+     */
+    public List<CustomerCardSettingDetail> selectCustomerCardSettingDetailList(CustomerCardSettingDetail customerCardSettingDetail);
+
+    /**
+     * 新增客户电子会员卡充值优惠设置明细
+     * 
+     * @param customerCardSettingDetail 客户电子会员卡充值优惠设置明细
+     * @return 结果
+     */
+    public int insertCustomerCardSettingDetail(CustomerCardSettingDetail customerCardSettingDetail);
+
+    /**
+     * 修改客户电子会员卡充值优惠设置明细
+     * 
+     * @param customerCardSettingDetail 客户电子会员卡充值优惠设置明细
+     * @return 结果
+     */
+    public int updateCustomerCardSettingDetail(CustomerCardSettingDetail customerCardSettingDetail);
+
+    /**
+     * 批量删除客户电子会员卡充值优惠设置明细
+     * 
+     * @param ids 需要删除的客户电子会员卡充值优惠设置明细ID
+     * @return 结果
+     */
+    public int deleteCustomerCardSettingDetailByIds(Long[] ids);
+
+    /**
+     * 删除客户电子会员卡充值优惠设置明细信息
+     * 
+     * @param id 客户电子会员卡充值优惠设置明细ID
+     * @return 结果
+     */
+    public int deleteCustomerCardSettingDetailById(Long id);
+
+    /**
+     * 电子会员卡积分规则明细
+     * @param customerCardSettingDetail
+     * @return
+     */
+    public List<CustomerCardSettingDetail> listDetailInfo(CustomerCardSettingDetail customerCardSettingDetail);
+}

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

@@ -0,0 +1,63 @@
+package com.yijia.customer.service;
+
+import java.util.List;
+import com.yijia.customer.domain.CustomerCardSetting;
+
+/**
+ * 客户电子会员卡充值优惠设置Service接口
+ * 
+ * @author yijia
+ * @date 2021-04-06
+ */
+public interface ICustomerCardSettingService 
+{
+    /**
+     * 查询客户电子会员卡充值优惠设置
+     * 
+     * @param id 客户电子会员卡充值优惠设置ID
+     * @return 客户电子会员卡充值优惠设置
+     */
+    public CustomerCardSetting selectCustomerCardSettingById(Long id);
+
+    /**
+     * 查询客户电子会员卡充值优惠设置列表
+     * 
+     * @param customerCardSetting 客户电子会员卡充值优惠设置
+     * @return 客户电子会员卡充值优惠设置集合
+     */
+    public List<CustomerCardSetting> selectCustomerCardSettingList(CustomerCardSetting customerCardSetting);
+    public CustomerCardSetting selectCustomerCardSetting(CustomerCardSetting customerCardSetting);
+
+    /**
+     * 新增客户电子会员卡充值优惠设置
+     * 
+     * @param customerCardSetting 客户电子会员卡充值优惠设置
+     * @return 结果
+     */
+    public int insertCustomerCardSetting(CustomerCardSetting customerCardSetting);
+
+    /**
+     * 修改客户电子会员卡充值优惠设置
+     * 
+     * @param customerCardSetting 客户电子会员卡充值优惠设置
+     * @return 结果
+     */
+    public int updateCustomerCardSetting(CustomerCardSetting customerCardSetting);
+
+    /**
+     * 批量删除客户电子会员卡充值优惠设置
+     * 
+     * @param ids 需要删除的客户电子会员卡充值优惠设置ID
+     * @return 结果
+     */
+    public int deleteCustomerCardSettingByIds(Long[] ids);
+
+    /**
+     * 删除客户电子会员卡充值优惠设置信息
+     * 
+     * @param id 客户电子会员卡充值优惠设置ID
+     * @return 结果
+     */
+    public int deleteCustomerCardSettingById(Long id);
+
+}

+ 72 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/service/ICustomerElectronicCardService.java

@@ -0,0 +1,72 @@
+package com.yijia.customer.service;
+
+import java.util.List;
+import com.yijia.customer.domain.CustomerElectronicCard;
+
+/**
+ * 客户电子会员卡(储蓄卡)Service接口
+ * 
+ * @author yijia
+ * @date 2021-04-12
+ */
+public interface ICustomerElectronicCardService 
+{
+    /**
+     * 查询客户电子会员卡(储蓄卡)
+     * 
+     * @param id 客户电子会员卡(储蓄卡)ID
+     * @return 客户电子会员卡(储蓄卡)
+     */
+    public CustomerElectronicCard selectCustomerElectronicCardById(Long id);
+
+    /**
+     * 查询客户电子会员卡(储蓄卡)列表
+     * 
+     * @param customerElectronicCard 客户电子会员卡(储蓄卡)
+     * @return 客户电子会员卡(储蓄卡)集合
+     */
+    public List<CustomerElectronicCard> selectCustomerElectronicCardList(CustomerElectronicCard customerElectronicCard);
+
+    /**
+     * 新增客户电子会员卡(储蓄卡)
+     * 
+     * @param customerElectronicCard 客户电子会员卡(储蓄卡)
+     * @return 结果
+     */
+    public int insertCustomerElectronicCard(CustomerElectronicCard customerElectronicCard);
+
+    /**
+     * 修改客户电子会员卡(储蓄卡)
+     * 
+     * @param customerElectronicCard 客户电子会员卡(储蓄卡)
+     * @return 结果
+     */
+    public int updateCustomerElectronicCard(CustomerElectronicCard customerElectronicCard);
+
+    /**
+     * 批量删除客户电子会员卡(储蓄卡)
+     * 
+     * @param ids 需要删除的客户电子会员卡(储蓄卡)ID
+     * @return 结果
+     */
+    public int deleteCustomerElectronicCardByIds(Long[] ids);
+
+    /**
+     * 删除客户电子会员卡(储蓄卡)信息
+     * 
+     * @param id 客户电子会员卡(储蓄卡)ID
+     * @return 结果
+     */
+    public int deleteCustomerElectronicCardById(Long id);
+
+    /**
+     * 查询电子会员数据
+     */
+    public CustomerElectronicCard listSum(CustomerElectronicCard customerElectronicCard);
+    /**
+     * 查询电子会员报表数据
+     */
+    public List<CustomerElectronicCard> selectCard(CustomerElectronicCard customerElectronicCard);
+
+    public List<CustomerElectronicCard> selectCardPage(CustomerElectronicCard customerElectronicCard);
+}

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

@@ -60,4 +60,11 @@ public interface ICustomerManageService
      * @return 结果
      */
     public int deleteCustomerManageById(Long id);
+    /**
+     * 查询客户管理 信息
+     *
+     * @param
+     * @return 客户管理
+     */
+    public List<CustomerManage> selectCustomerManage(CustomerManage customerManage);
 }

+ 113 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/service/impl/CustomerCardRecordConsumptionServiceImpl.java

@@ -0,0 +1,113 @@
+package com.yijia.customer.service.impl;
+
+import java.util.List;
+import com.yijia.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.yijia.customer.mapper.CustomerCardRecordConsumptionMapper;
+import com.yijia.customer.domain.CustomerCardRecordConsumption;
+import com.yijia.customer.service.ICustomerCardRecordConsumptionService;
+
+/**
+ * 客户电子会员卡消费记录Service业务层处理
+ * 
+ * @author yijia
+ * @date 2021-04-13
+ */
+@Service
+public class CustomerCardRecordConsumptionServiceImpl implements ICustomerCardRecordConsumptionService {
+    @Autowired
+    private CustomerCardRecordConsumptionMapper customerCardRecordConsumptionMapper;
+
+    /**
+     * 查询客户电子会员卡消费记录
+     *
+     * @param id 客户电子会员卡消费记录ID
+     * @return 客户电子会员卡消费记录
+     */
+    @Override
+    public CustomerCardRecordConsumption selectCustomerCardRecordConsumptionById(Long id) {
+        return customerCardRecordConsumptionMapper.selectCustomerCardRecordConsumptionById(id);
+    }
+
+    /**
+     * 查询客户电子会员卡消费记录列表
+     *
+     * @param customerCardRecordConsumption 客户电子会员卡消费记录
+     * @return 客户电子会员卡消费记录
+     */
+    @Override
+    public List<CustomerCardRecordConsumption> selectCustomerCardRecordConsumptionList(CustomerCardRecordConsumption customerCardRecordConsumption) {
+        return customerCardRecordConsumptionMapper.selectCustomerCardRecordConsumptionList(customerCardRecordConsumption);
+    }
+
+    /**
+     * 新增客户电子会员卡消费记录
+     *
+     * @param customerCardRecordConsumption 客户电子会员卡消费记录
+     * @return 结果
+     */
+    @Override
+    public int insertCustomerCardRecordConsumption(CustomerCardRecordConsumption customerCardRecordConsumption) {
+        customerCardRecordConsumption.setCreateTime(DateUtils.getNowDate());
+        return customerCardRecordConsumptionMapper.insertCustomerCardRecordConsumption(customerCardRecordConsumption);
+    }
+
+    /**
+     * 修改客户电子会员卡消费记录
+     *
+     * @param customerCardRecordConsumption 客户电子会员卡消费记录
+     * @return 结果
+     */
+    @Override
+    public int updateCustomerCardRecordConsumption(CustomerCardRecordConsumption customerCardRecordConsumption) {
+        return customerCardRecordConsumptionMapper.updateCustomerCardRecordConsumption(customerCardRecordConsumption);
+    }
+
+    /**
+     * 批量删除客户电子会员卡消费记录
+     *
+     * @param ids 需要删除的客户电子会员卡消费记录ID
+     * @return 结果
+     */
+    @Override
+    public int deleteCustomerCardRecordConsumptionByIds(Long[] ids) {
+        return customerCardRecordConsumptionMapper.deleteCustomerCardRecordConsumptionByIds(ids);
+    }
+
+    /**
+     * 删除客户电子会员卡消费记录信息
+     *
+     * @param id 客户电子会员卡消费记录ID
+     * @return 结果
+     */
+    @Override
+    public int deleteCustomerCardRecordConsumptionById(Long id) {
+        return customerCardRecordConsumptionMapper.deleteCustomerCardRecordConsumptionById(id);
+    }
+
+    /**
+     * 获取客户电子会员卡消费汇总金额
+     */
+    @Override
+    public CustomerCardRecordConsumption xfAmtQuery(CustomerCardRecordConsumption customerCardRecordConsumption) {
+        return customerCardRecordConsumptionMapper.xfAmtQuery(customerCardRecordConsumption);
+    }
+
+    /**
+     * 获取客户电子会员卡消费汇总折线图x轴数据
+     */
+    @Override
+    public List<CustomerCardRecordConsumption> listXdata(CustomerCardRecordConsumption customerCardRecordConsumption) {
+        return customerCardRecordConsumptionMapper.listXdata(customerCardRecordConsumption);
+    }
+
+    /**
+     * 获取客户电子会员卡消费汇总折线图x轴数据
+     */
+    @Override
+    public List<CustomerCardRecordConsumption> listQydataXF(CustomerCardRecordConsumption customerCardRecordConsumption) {
+        return customerCardRecordConsumptionMapper.listQydataXF(customerCardRecordConsumption);
+    }
+
+}

+ 125 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/service/impl/CustomerCardRecordRechargeServiceImpl.java

@@ -0,0 +1,125 @@
+package com.yijia.customer.service.impl;
+
+import java.util.List;
+import com.yijia.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.yijia.customer.mapper.CustomerCardRecordRechargeMapper;
+import com.yijia.customer.domain.CustomerCardRecordRecharge;
+import com.yijia.customer.service.ICustomerCardRecordRechargeService;
+
+/**
+ * 客户电子会员卡充值记录Service业务层处理
+ * 
+ * @author yijia
+ * @date 2021-04-13
+ */
+@Service
+public class CustomerCardRecordRechargeServiceImpl implements ICustomerCardRecordRechargeService 
+{
+    @Autowired
+    private CustomerCardRecordRechargeMapper customerCardRecordRechargeMapper;
+
+    /**
+     * 查询客户电子会员卡充值记录
+     * 
+     * @param id 客户电子会员卡充值记录ID
+     * @return 客户电子会员卡充值记录
+     */
+    @Override
+    public CustomerCardRecordRecharge selectCustomerCardRecordRechargeById(Long id)
+    {
+        return customerCardRecordRechargeMapper.selectCustomerCardRecordRechargeById(id);
+    }
+
+    /**
+     * 查询客户电子会员卡充值记录列表
+     * 
+     * @param customerCardRecordRecharge 客户电子会员卡充值记录
+     * @return 客户电子会员卡充值记录
+     */
+    @Override
+    public List<CustomerCardRecordRecharge> selectCustomerCardRecordRechargeList(CustomerCardRecordRecharge customerCardRecordRecharge)
+    {
+        return customerCardRecordRechargeMapper.selectCustomerCardRecordRechargeList(customerCardRecordRecharge);
+    }
+
+    /**
+     * 新增客户电子会员卡充值记录
+     * 
+     * @param customerCardRecordRecharge 客户电子会员卡充值记录
+     * @return 结果
+     */
+    @Override
+    public int insertCustomerCardRecordRecharge(CustomerCardRecordRecharge customerCardRecordRecharge)
+    {
+        customerCardRecordRecharge.setCreateTime(DateUtils.getNowDate());
+        return customerCardRecordRechargeMapper.insertCustomerCardRecordRecharge(customerCardRecordRecharge);
+    }
+
+    /**
+     * 修改客户电子会员卡充值记录
+     * 
+     * @param customerCardRecordRecharge 客户电子会员卡充值记录
+     * @return 结果
+     */
+    @Override
+    public int updateCustomerCardRecordRecharge(CustomerCardRecordRecharge customerCardRecordRecharge)
+    {
+        return customerCardRecordRechargeMapper.updateCustomerCardRecordRecharge(customerCardRecordRecharge);
+    }
+
+    /**
+     * 批量删除客户电子会员卡充值记录
+     * 
+     * @param ids 需要删除的客户电子会员卡充值记录ID
+     * @return 结果
+     */
+    @Override
+    public int deleteCustomerCardRecordRechargeByIds(Long[] ids)
+    {
+        return customerCardRecordRechargeMapper.deleteCustomerCardRecordRechargeByIds(ids);
+    }
+
+    /**
+     * 删除客户电子会员卡充值记录信息
+     * 
+     * @param id 客户电子会员卡充值记录ID
+     * @return 结果
+     */
+    @Override
+    public int deleteCustomerCardRecordRechargeById(Long id)
+    {
+        return customerCardRecordRechargeMapper.deleteCustomerCardRecordRechargeById(id);
+    }
+
+    /**
+     * 获取客户电子会员卡充值汇总金额
+     */
+    @Override
+    public CustomerCardRecordRecharge czAmtQuery(CustomerCardRecordRecharge customerCardRecordRecharge) {
+        return customerCardRecordRechargeMapper.czAmtQuery(customerCardRecordRecharge);
+    }
+
+    /**
+     * 获取客户电子会员卡消费汇总折线图消费数据
+     */
+    @Override
+    public List<CustomerCardRecordRecharge> listQydataCZ(CustomerCardRecordRecharge customerCardRecordRecharge) {
+        return customerCardRecordRechargeMapper.listQydataCZ(customerCardRecordRecharge);
+    }
+
+    /**
+     * 获取客户电子会员卡消费充值明细
+     */
+    @Override
+    public List<CustomerCardRecordRecharge> selectCardDetail(CustomerCardRecordRecharge customerCardRecordRecharge) {
+        return customerCardRecordRechargeMapper.selectCardDetail(customerCardRecordRecharge);
+    }
+
+    @Override
+    public List<CustomerCardRecordRecharge> selectCardDetailPage(CustomerCardRecordRecharge customerCardRecordRecharge) {
+        return customerCardRecordRechargeMapper.selectCardDetailPage(customerCardRecordRecharge);
+    }
+
+}

+ 98 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/service/impl/CustomerCardSettingDetailServiceImpl.java

@@ -0,0 +1,98 @@
+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.CustomerCardSettingDetailMapper;
+import com.yijia.customer.domain.CustomerCardSettingDetail;
+import com.yijia.customer.service.ICustomerCardSettingDetailService;
+
+/**
+ * 客户电子会员卡充值优惠设置明细Service业务层处理
+ * 
+ * @author yijia
+ * @date 2021-04-06
+ */
+@Service
+public class CustomerCardSettingDetailServiceImpl implements ICustomerCardSettingDetailService 
+{
+    @Autowired
+    private CustomerCardSettingDetailMapper customerCardSettingDetailMapper;
+
+    /**
+     * 查询客户电子会员卡充值优惠设置明细
+     * 
+     * @param id 客户电子会员卡充值优惠设置明细ID
+     * @return 客户电子会员卡充值优惠设置明细
+     */
+    @Override
+    public CustomerCardSettingDetail selectCustomerCardSettingDetailById(Long id)
+    {
+        return customerCardSettingDetailMapper.selectCustomerCardSettingDetailById(id);
+    }
+
+    /**
+     * 查询客户电子会员卡充值优惠设置明细列表
+     * 
+     * @param customerCardSettingDetail 客户电子会员卡充值优惠设置明细
+     * @return 客户电子会员卡充值优惠设置明细
+     */
+    @Override
+    public List<CustomerCardSettingDetail> selectCustomerCardSettingDetailList(CustomerCardSettingDetail customerCardSettingDetail)
+    {
+        return customerCardSettingDetailMapper.selectCustomerCardSettingDetailList(customerCardSettingDetail);
+    }
+
+    /**
+     * 新增客户电子会员卡充值优惠设置明细
+     * 
+     * @param customerCardSettingDetail 客户电子会员卡充值优惠设置明细
+     * @return 结果
+     */
+    @Override
+    public int insertCustomerCardSettingDetail(CustomerCardSettingDetail customerCardSettingDetail)
+    {
+        return customerCardSettingDetailMapper.insertCustomerCardSettingDetail(customerCardSettingDetail);
+    }
+
+    /**
+     * 修改客户电子会员卡充值优惠设置明细
+     * 
+     * @param customerCardSettingDetail 客户电子会员卡充值优惠设置明细
+     * @return 结果
+     */
+    @Override
+    public int updateCustomerCardSettingDetail(CustomerCardSettingDetail customerCardSettingDetail)
+    {
+        return customerCardSettingDetailMapper.updateCustomerCardSettingDetail(customerCardSettingDetail);
+    }
+
+    /**
+     * 批量删除客户电子会员卡充值优惠设置明细
+     * 
+     * @param ids 需要删除的客户电子会员卡充值优惠设置明细ID
+     * @return 结果
+     */
+    @Override
+    public int deleteCustomerCardSettingDetailByIds(Long[] ids)
+    {
+        return customerCardSettingDetailMapper.deleteCustomerCardSettingDetailByIds(ids);
+    }
+
+    /**
+     * 删除客户电子会员卡充值优惠设置明细信息
+     * 
+     * @param id 客户电子会员卡充值优惠设置明细ID
+     * @return 结果
+     */
+    @Override
+    public int deleteCustomerCardSettingDetailById(Long id)
+    {
+        return customerCardSettingDetailMapper.deleteCustomerCardSettingDetailById(id);
+    }
+
+    @Override
+    public List<CustomerCardSettingDetail> listDetailInfo(CustomerCardSettingDetail customerCardSettingDetail) {
+        return customerCardSettingDetailMapper.listDetailInfo(customerCardSettingDetail);
+    }
+}

+ 135 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/service/impl/CustomerCardSettingServiceImpl.java

@@ -0,0 +1,135 @@
+package com.yijia.customer.service.impl;
+
+import java.util.List;
+import com.yijia.common.utils.DateUtils;
+import com.yijia.customer.domain.CustomerCardSettingDetail;
+import com.yijia.customer.mapper.CustomerCardSettingDetailMapper;
+import com.yijia.customer.service.ICustomerCardSettingDetailService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.yijia.customer.mapper.CustomerCardSettingMapper;
+import com.yijia.customer.domain.CustomerCardSetting;
+import com.yijia.customer.service.ICustomerCardSettingService;
+
+/**
+ * 客户电子会员卡充值优惠设置Service业务层处理
+ * 
+ * @author yijia
+ * @date 2021-04-06
+ */
+@Service
+public class CustomerCardSettingServiceImpl implements ICustomerCardSettingService 
+{
+    @Autowired
+    private CustomerCardSettingMapper customerCardSettingMapper;
+    @Autowired
+    private CustomerCardSettingDetailMapper customerCardSettingDetailMapper;
+
+    /**
+     * 查询客户电子会员卡充值优惠设置
+     * 
+     * @param id 客户电子会员卡充值优惠设置ID
+     * @return 客户电子会员卡充值优惠设置
+     */
+    @Override
+    public CustomerCardSetting selectCustomerCardSettingById(Long id)
+    {
+        return customerCardSettingMapper.selectCustomerCardSettingById(id);
+    }
+
+    /**
+     * 查询客户电子会员卡充值优惠设置列表
+     * 
+     * @param customerCardSetting 客户电子会员卡充值优惠设置
+     * @return 客户电子会员卡充值优惠设置
+     */
+    @Override
+    public List<CustomerCardSetting> selectCustomerCardSettingList(CustomerCardSetting customerCardSetting)
+    {
+
+        return customerCardSettingMapper.selectCustomerCardSettingList(customerCardSetting);
+    }
+
+    @Override
+    public CustomerCardSetting selectCustomerCardSetting(CustomerCardSetting customerCardSetting)
+    {
+
+        CustomerCardSetting setting =customerCardSettingMapper.selectCustomerCardSetting(customerCardSetting);
+        if(setting!=null){
+            CustomerCardSettingDetail detail = new CustomerCardSettingDetail();
+            detail.setParentId(setting.getId());
+            List<CustomerCardSettingDetail> detailList =customerCardSettingDetailMapper.selectCustomerCardSettingDetailList(detail);
+            setting.setDetailList(detailList);
+        }
+        return setting;
+    }
+
+    /**
+     * 新增客户电子会员卡充值优惠设置
+     * 
+     * @param customerCardSetting 客户电子会员卡充值优惠设置
+     * @return 结果
+     */
+    @Override
+    public int insertCustomerCardSetting(CustomerCardSetting customerCardSetting)
+    {
+        customerCardSetting.setCreateTime(DateUtils.getNowDate());
+        int i =customerCardSettingMapper.insertCustomerCardSetting(customerCardSetting);
+        if(customerCardSetting.getDetailList()!=null && customerCardSetting.getDetailList().size()>0){
+            List<CustomerCardSettingDetail> list = customerCardSetting.getDetailList();
+            for(CustomerCardSettingDetail detil:list){
+                detil.setParentId(customerCardSetting.getId());
+                customerCardSettingDetailMapper.insertCustomerCardSettingDetail(detil);
+            }
+        }
+        return i;
+    }
+
+    /**
+     * 修改客户电子会员卡充值优惠设置
+     * 
+     * @param customerCardSetting 客户电子会员卡充值优惠设置
+     * @return 结果
+     */
+    @Override
+    public int updateCustomerCardSetting(CustomerCardSetting customerCardSetting)
+    {
+        int i  =customerCardSettingMapper.updateCustomerCardSetting(customerCardSetting);
+        CustomerCardSettingDetail detil = new CustomerCardSettingDetail();
+        detil.setParentId(customerCardSetting.getId());
+        customerCardSettingDetailMapper.deleteCustomerCardSettingDetail(detil);
+        if(customerCardSetting.getDetailList()!=null && customerCardSetting.getDetailList().size()>0){
+            List<CustomerCardSettingDetail> list = customerCardSetting.getDetailList();
+            for(CustomerCardSettingDetail settingDetil:list){
+                settingDetil.setParentId(customerCardSetting.getId());
+                customerCardSettingDetailMapper.insertCustomerCardSettingDetail(settingDetil);
+            }
+        }
+        return i;
+    }
+
+    /**
+     * 批量删除客户电子会员卡充值优惠设置
+     * 
+     * @param ids 需要删除的客户电子会员卡充值优惠设置ID
+     * @return 结果
+     */
+    @Override
+    public int deleteCustomerCardSettingByIds(Long[] ids)
+    {
+        return customerCardSettingMapper.deleteCustomerCardSettingByIds(ids);
+    }
+
+    /**
+     * 删除客户电子会员卡充值优惠设置信息
+     * 
+     * @param id 客户电子会员卡充值优惠设置ID
+     * @return 结果
+     */
+    @Override
+    public int deleteCustomerCardSettingById(Long id)
+    {
+        return customerCardSettingMapper.deleteCustomerCardSettingById(id);
+    }
+
+}

+ 117 - 0
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/service/impl/CustomerElectronicCardServiceImpl.java

@@ -0,0 +1,117 @@
+package com.yijia.customer.service.impl;
+
+import java.util.List;
+import com.yijia.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.yijia.customer.mapper.CustomerElectronicCardMapper;
+import com.yijia.customer.domain.CustomerElectronicCard;
+import com.yijia.customer.service.ICustomerElectronicCardService;
+
+/**
+ * 客户电子会员卡(储蓄卡)Service业务层处理
+ * 
+ * @author yijia
+ * @date 2021-04-12
+ */
+@Service
+public class CustomerElectronicCardServiceImpl implements ICustomerElectronicCardService 
+{
+    @Autowired
+    private CustomerElectronicCardMapper customerElectronicCardMapper;
+
+    /**
+     * 查询客户电子会员卡(储蓄卡)
+     * 
+     * @param id 客户电子会员卡(储蓄卡)ID
+     * @return 客户电子会员卡(储蓄卡)
+     */
+    @Override
+    public CustomerElectronicCard selectCustomerElectronicCardById(Long id)
+    {
+        return customerElectronicCardMapper.selectCustomerElectronicCardById(id);
+    }
+
+    /**
+     * 查询客户电子会员卡(储蓄卡)列表
+     * 
+     * @param customerElectronicCard 客户电子会员卡(储蓄卡)
+     * @return 客户电子会员卡(储蓄卡)
+     */
+    @Override
+    public List<CustomerElectronicCard> selectCustomerElectronicCardList(CustomerElectronicCard customerElectronicCard)
+    {
+        return customerElectronicCardMapper.selectCustomerElectronicCardList(customerElectronicCard);
+    }
+
+    /**
+     * 新增客户电子会员卡(储蓄卡)
+     * 
+     * @param customerElectronicCard 客户电子会员卡(储蓄卡)
+     * @return 结果
+     */
+    @Override
+    public int insertCustomerElectronicCard(CustomerElectronicCard customerElectronicCard)
+    {
+        customerElectronicCard.setCreateTime(DateUtils.getNowDate());
+        return customerElectronicCardMapper.insertCustomerElectronicCard(customerElectronicCard);
+    }
+
+    /**
+     * 修改客户电子会员卡(储蓄卡)
+     * 
+     * @param customerElectronicCard 客户电子会员卡(储蓄卡)
+     * @return 结果
+     */
+    @Override
+    public int updateCustomerElectronicCard(CustomerElectronicCard customerElectronicCard)
+    {
+        return customerElectronicCardMapper.updateCustomerElectronicCard(customerElectronicCard);
+    }
+
+    /**
+     * 批量删除客户电子会员卡(储蓄卡)
+     * 
+     * @param ids 需要删除的客户电子会员卡(储蓄卡)ID
+     * @return 结果
+     */
+    @Override
+    public int deleteCustomerElectronicCardByIds(Long[] ids)
+    {
+        return customerElectronicCardMapper.deleteCustomerElectronicCardByIds(ids);
+    }
+
+    /**
+     * 删除客户电子会员卡(储蓄卡)信息
+     * 
+     * @param id 客户电子会员卡(储蓄卡)ID
+     * @return 结果
+     */
+    @Override
+    public int deleteCustomerElectronicCardById(Long id)
+    {
+        return customerElectronicCardMapper.deleteCustomerElectronicCardById(id);
+    }
+
+    /**
+     * 查询电子会员数据
+     */
+    @Override
+    public CustomerElectronicCard listSum(CustomerElectronicCard customerElectronicCard) {
+        return customerElectronicCardMapper.listSum(customerElectronicCard);
+    }
+
+    /**
+     * 查询电子会员报表数据
+     */
+    @Override
+    public List<CustomerElectronicCard> selectCard(CustomerElectronicCard customerElectronicCard) {
+        return customerElectronicCardMapper.selectCard(customerElectronicCard);
+    }
+
+    @Override
+    public List<CustomerElectronicCard> selectCardPage(CustomerElectronicCard customerElectronicCard) {
+        return customerElectronicCardMapper.selectCardPage(customerElectronicCard);
+    }
+
+}

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

@@ -92,4 +92,14 @@ public class CustomerManageServiceImpl implements ICustomerManageService
     {
         return customerManageMapper.deleteCustomerManageById(id);
     }
+
+    /**
+     * 客户信息查询
+     * @param customerManage
+     * @return
+     */
+    @Override
+    public List<CustomerManage> selectCustomerManage(CustomerManage customerManage) {
+        return customerManageMapper.selectCustomerManage(customerManage);
+    }
 }

+ 13 - 0
Yijia-SaaS/yijia-customer/src/main/main.iml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/java" isTestSource="false" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module" module-name="main6" />
+    <orderEntry type="module" module-name="main5" />
+  </component>
+</module>

+ 250 - 0
Yijia-SaaS/yijia-customer/src/main/resources/mapper/customer/CustomerCardRecordConsumptionMapper.xml

@@ -0,0 +1,250 @@
+<?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.CustomerCardRecordConsumptionMapper">
+    
+    <resultMap type="CustomerCardRecordConsumption" id="CustomerCardRecordConsumptionResult">
+        <result property="id"    column="id"    />
+        <result property="orderNo"    column="order_no"    />
+        <result property="unionId"    column="union_id"    />
+        <result property="customerNo"    column="customer_no"    />
+        <result property="customerName"    column="customer_name"    />
+        <result property="usageType"    column="usage_type"    />
+        <result property="payType"    column="pay_type"    />
+        <result property="cardOilsType"    column="card_oils_type"    />
+        <result property="amt"    column="amt"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="balance"    column="balance"    />
+        <result property="stationId"    column="station_id"    />
+        <result property="stationName"    column="station_name"    />
+        <result property="status"    column="status"    />
+    </resultMap>
+
+    <sql id="selectCustomerCardRecordConsumptionVo">
+        select id, order_no, union_id, customer_no, customer_name, usage_type, pay_type, card_oils_type, amt, create_time, balance,station_id, station_name, status from customer_card_record_consumption
+    </sql>
+
+    <select id="selectCustomerCardRecordConsumptionList" parameterType="CustomerCardRecordConsumption" resultMap="CustomerCardRecordConsumptionResult">
+        <include refid="selectCustomerCardRecordConsumptionVo"/>
+        <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="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>
+            <if test="stationIdList != null ">
+                and station_id in
+                <foreach item="item" index="index" collection="stationIdList"
+                         open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
+                AND date_format(create_time,'%Y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
+            </if>
+            <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
+                AND date_format(create_time,'%Y-%m-%d %H:%i:%s') &lt;= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
+            </if>
+        </where>
+    </select>
+    
+    <select id="selectCustomerCardRecordConsumptionById" parameterType="Long" resultMap="CustomerCardRecordConsumptionResult">
+        <include refid="selectCustomerCardRecordConsumptionVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertCustomerCardRecordConsumption" parameterType="CustomerCardRecordConsumption" useGeneratedKeys="true" keyProperty="id">
+        insert into customer_card_record_consumption
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="orderNo != null">order_no,</if>
+            <if test="unionId != null">union_id,</if>
+            <if test="customerNo != null">customer_no,</if>
+            <if test="customerName != null">customer_name,</if>
+            <if test="usageType != null">usage_type,</if>
+            <if test="payType != null">pay_type,</if>
+            <if test="cardOilsType != null">card_oils_type,</if>
+            <if test="amt != null">amt,</if>
+            <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=",">
+            <if test="orderNo != null">#{orderNo},</if>
+            <if test="unionId != null">#{unionId},</if>
+            <if test="customerNo != null">#{customerNo},</if>
+            <if test="customerName != null">#{customerName},</if>
+            <if test="usageType != null">#{usageType},</if>
+            <if test="payType != null">#{payType},</if>
+            <if test="cardOilsType != null">#{cardOilsType},</if>
+            <if test="amt != null">#{amt},</if>
+            <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>
+
+    <update id="updateCustomerCardRecordConsumption" parameterType="CustomerCardRecordConsumption">
+        update customer_card_record_consumption
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="orderNo != null">order_no = #{orderNo},</if>
+            <if test="unionId != null">union_id = #{unionId},</if>
+            <if test="customerNo != null">customer_no = #{customerNo},</if>
+            <if test="customerName != null">customer_name = #{customerName},</if>
+            <if test="usageType != null">usage_type = #{usageType},</if>
+            <if test="payType != null">pay_type = #{payType},</if>
+            <if test="cardOilsType != null">card_oils_type = #{cardOilsType},</if>
+            <if test="amt != null">amt = #{amt},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="balance != null">balance = #{balance},</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}
+    </update>
+
+    <delete id="deleteCustomerCardRecordConsumptionById" parameterType="Long">
+        delete from customer_card_record_consumption where id = #{id}
+    </delete>
+
+    <delete id="deleteCustomerCardRecordConsumptionByIds" parameterType="String">
+        delete from customer_card_record_consumption where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+    <select id="xfAmtQuery" parameterType="CustomerCardRecordConsumption" resultMap="CustomerCardRecordConsumptionResult">
+        SELECT sum(amt) as amt from customer_card_record_consumption
+        <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="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>
+            <if test="stationIdList != null ">
+                and station_id in
+                <foreach item="item" index="index" collection="stationIdList"
+                         open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
+                AND date_format(create_time,'%Y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
+            </if>
+            <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
+                AND date_format(create_time,'%Y-%m-%d %H:%i:%s') &lt;= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
+            </if>
+        </where>
+    </select>
+    <select id="listXdata" parameterType="CustomerCardRecordConsumption" resultMap="CustomerCardRecordConsumptionResult">
+         SELECT date_format(create_time,'%Y-%m-%d') as create_time from customer_card_record_consumption
+        <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="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>
+            <if test="stationIdList != null ">
+                and station_id in
+                <foreach item="item" index="index" collection="stationIdList"
+                         open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
+                AND date_format(create_time,'%Y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
+            </if>
+            <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
+                AND date_format(create_time,'%Y-%m-%d %H:%i:%s') &lt;= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
+            </if>
+        </where>
+        union
+        SELECT date_format(create_time,'%Y-%m-%d') as create_time from customer_card_record_recharge
+        <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="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>
+            <if test="stationIdList != null ">
+                and station_id in
+                <foreach item="item" index="index" collection="stationIdList"
+                         open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
+                AND date_format(create_time,'%Y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
+            </if>
+            <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
+                AND date_format(create_time,'%Y-%m-%d %H:%i:%s') &lt;= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
+            </if>
+        </where>
+        order by  date_format(create_time,'%Y-%m-%d')
+    </select>
+    <select id="listQydataXF" parameterType="CustomerCardRecordConsumption" resultMap="CustomerCardRecordConsumptionResult">
+        SELECT date_format(create_time,'%Y-%m-%d') as create_time,sum(amt) as amt
+        from customer_card_record_consumption
+        <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="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>
+            <if test="stationIdList != null ">
+                and station_id in
+                <foreach item="item" index="index" collection="stationIdList"
+                         open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
+                AND date_format(create_time,'%Y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
+            </if>
+            <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
+                AND date_format(create_time,'%Y-%m-%d %H:%i:%s') &lt;= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
+            </if>
+        </where>
+        GROUP BY  date_format(create_time,'%Y-%m-%d')
+    </select>
+</mapper>

+ 206 - 0
Yijia-SaaS/yijia-customer/src/main/resources/mapper/customer/CustomerCardRecordRechargeMapper.xml

@@ -0,0 +1,206 @@
+<?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.CustomerCardRecordRechargeMapper">
+    
+    <resultMap type="CustomerCardRecordRecharge" id="CustomerCardRecordRechargeResult">
+        <result property="id"    column="id"    />
+        <result property="orderNo"    column="order_no"    />
+        <result property="unionId"    column="union_id"    />
+        <result property="customerNo"    column="customer_no"    />
+        <result property="customerName"    column="customer_name"    />
+        <result property="usageType"    column="usage_type"    />
+        <result property="payType"    column="pay_type"    />
+        <result property="cardOilsType"    column="card_oils_type"    />
+        <result property="amt"    column="amt"    />
+        <result property="presentAmt"    column="present_amt"    />
+        <result property="balance"    column="balance"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="stationId"    column="station_id"    />
+        <result property="stationName"    column="station_name"    />
+        <result property="status"    column="status"    />
+    </resultMap>
+
+    <sql id="selectCustomerCardRecordRechargeVo">
+        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_record_recharge
+    </sql>
+
+    <select id="selectCustomerCardRecordRechargeList" parameterType="CustomerCardRecordRecharge" resultMap="CustomerCardRecordRechargeResult">
+        <include refid="selectCustomerCardRecordRechargeVo"/>
+        <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>
+            <if test="stationIdList != null ">
+                and station_id in
+                <foreach item="item" index="index" collection="stationIdList"
+                         open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
+                AND date_format(create_time,'%Y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
+            </if>
+            <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
+                AND date_format(create_time,'%Y-%m-%d %H:%i:%s') &lt;= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
+            </if>
+        </where>
+    </select>
+    
+    <select id="selectCustomerCardRecordRechargeById" parameterType="Long" resultMap="CustomerCardRecordRechargeResult">
+        <include refid="selectCustomerCardRecordRechargeVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertCustomerCardRecordRecharge" parameterType="CustomerCardRecordRecharge" useGeneratedKeys="true" keyProperty="id">
+        insert into customer_card_record_recharge
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="orderNo != null">order_no,</if>
+            <if test="unionId != null">union_id,</if>
+            <if test="customerNo != null">customer_no,</if>
+            <if test="customerName != null">customer_name,</if>
+            <if test="usageType != null">usage_type,</if>
+            <if test="payType != null">pay_type,</if>
+            <if test="cardOilsType != null">card_oils_type,</if>
+            <if test="amt != null">amt,</if>
+            <if test="presentAmt != null">present_amt,</if>
+            <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=",">
+            <if test="orderNo != null">#{orderNo},</if>
+            <if test="unionId != null">#{unionId},</if>
+            <if test="customerNo != null">#{customerNo},</if>
+            <if test="customerName != null">#{customerName},</if>
+            <if test="usageType != null">#{usageType},</if>
+            <if test="payType != null">#{payType},</if>
+            <if test="cardOilsType != null">#{cardOilsType},</if>
+            <if test="amt != null">#{amt},</if>
+            <if test="presentAmt != null">#{presentAmt},</if>
+            <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>
+
+    <update id="updateCustomerCardRecordRecharge" parameterType="CustomerCardRecordRecharge">
+        update customer_card_record_recharge
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="orderNo != null">order_no = #{orderNo},</if>
+            <if test="unionId != null">union_id = #{unionId},</if>
+            <if test="customerNo != null">customer_no = #{customerNo},</if>
+            <if test="customerName != null">customer_name = #{customerName},</if>
+            <if test="usageType != null">usage_type = #{usageType},</if>
+            <if test="payType != null">pay_type = #{payType},</if>
+            <if test="cardOilsType != null">card_oils_type = #{cardOilsType},</if>
+            <if test="amt != null">amt = #{amt},</if>
+            <if test="presentAmt != null">present_amt = #{presentAmt},</if>
+            <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}
+    </update>
+
+    <delete id="deleteCustomerCardRecordRechargeById" parameterType="Long">
+        delete from customer_card_record_recharge where id = #{id}
+    </delete>
+
+    <delete id="deleteCustomerCardRecordRechargeByIds" parameterType="String">
+        delete from customer_card_record_recharge where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+    <select id="czAmtQuery" parameterType="CustomerCardRecordRecharge" resultMap="CustomerCardRecordRechargeResult">
+        SELECT sum(amt) as amt from customer_card_record_recharge
+        <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>
+            <if test="stationIdList != null ">
+                and station_id in
+                <foreach item="item" index="index" collection="stationIdList"
+                         open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
+                AND date_format(create_time,'%Y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
+            </if>
+            <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
+                AND date_format(create_time,'%Y-%m-%d %H:%i:%s') &lt;= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
+            </if>
+        </where>
+    </select>
+    <select id="listQydataCZ" parameterType="CustomerCardRecordRecharge" resultMap="CustomerCardRecordRechargeResult">
+        SELECT date_format(create_time,'%Y-%m-%d') as create_time,sum(amt) as amt
+        from customer_card_record_recharge
+        <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>
+            <if test="stationIdList != null ">
+                and station_id in
+                <foreach item="item" index="index" collection="stationIdList"
+                         open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
+                AND date_format(create_time,'%Y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
+            </if>
+            <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
+                AND date_format(create_time,'%Y-%m-%d %H:%i:%s') &lt;= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
+            </if>
+        </where>
+        GROUP BY  date_format(create_time,'%Y-%m-%d')
+    </select>
+
+    <!--存储过程-->
+    <select id="selectCardDetail" parameterType="CustomerCardRecordRecharge" statementType="CALLABLE" resultMap="CustomerCardRecordRechargeResult">
+         CALL selectCardDetail(#{strSql,mode=IN},#{createDate,mode=IN},#{pageSetting,mode=IN},#{pageNo,mode=IN})
+    </select>
+    <select id="selectCardDetailPage" parameterType="CustomerCardRecordRecharge" statementType="CALLABLE" resultMap="CustomerCardRecordRechargeResult">
+         CALL selectCardDetailPage(#{strSql,mode=IN},#{createDate,mode=IN})
+    </select>
+
+</mapper>

+ 135 - 0
Yijia-SaaS/yijia-customer/src/main/resources/mapper/customer/CustomerCardSettingDetailMapper.xml

@@ -0,0 +1,135 @@
+<?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.CustomerCardSettingDetailMapper">
+    
+    <resultMap type="CustomerCardSettingDetail" id="CustomerCardSettingDetailResult">
+        <result property="id"    column="id"    />
+        <result property="parentId"    column="parent_id"    />
+        <result property="settingRuleType"    column="setting_rule_type"    />
+        <result property="discountAmtStart"    column="discount_amt_start"    />
+        <result property="discountAmtEnd"    column="discount_amt_end"    />
+        <result property="presentAmt"    column="present_amt"    />
+        <result property="oilName"    column="oil_name"    />
+        <result property="status"    column="status"    />
+        <result property="cardOilsType"    column="card_oils_type"    />
+        <result property="discountTimeSetting"    column="discount_time_setting"    />
+        <result property="discountTimeType"    column="discount_time_type"    />
+        <result property="isDiscountCoupon"    column="is_discount_coupon"    />
+        <result property="isGradeSetting"    column="is_grade_setting"    />
+        <result property="isMarket"    column="is_market"/>
+    </resultMap>
+
+    <sql id="selectCustomerCardSettingDetailVo">
+        select id, parent_id, setting_rule_type, discount_amt_start,discount_amt_end, present_amt,oil_name,status from customer_card_setting_detail
+    </sql>
+
+    <select id="selectCustomerCardSettingDetailList" parameterType="CustomerCardSettingDetail" resultMap="CustomerCardSettingDetailResult">
+        <include refid="selectCustomerCardSettingDetailVo"/>
+        <where>  
+            <if test="parentId != null "> and parent_id = #{parentId}</if>
+            <if test="settingRuleType != null  and settingRuleType != ''"> and setting_rule_type = #{settingRuleType}</if>
+            <if test="discountAmtStart != null "> and discount_amt_start = #{discountAmtStart}</if>
+            <if test="discountAmtEnd != null "> and discount_amt_end = #{discountAmtEnd}</if>
+            <if test="presentAmt != null "> and present_amt = #{presentAmt}</if>
+            <if test="oilName != null "> and oil_name = #{oilName}</if>
+            <if test="status != null "> and status = #{status}</if>
+            <if test="stationIdList != null ">
+                and station_id in
+                <foreach item="item" index="index" collection="stationIdList"
+                         open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+        </where>
+    </select>
+
+    <select id="listDetailInfo" parameterType="CustomerCardSettingDetail" resultMap="CustomerCardSettingDetailResult">
+        SELECT a.setting_rule_type,a.discount_amt_start,a.discount_amt_end,a.present_amt,oil_name,b.card_oils_type,
+        b.discount_time_setting,b.discount_time_type,b.is_discount_coupon,b.is_market,b.is_grade_setting
+        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>
+            <if test="settingRuleType != null  and settingRuleType != ''"> and setting_rule_type = #{settingRuleType}</if>
+            <if test="discountAmtStart != null "> and discount_amt_start = #{discountAmtStart}</if>
+            <if test="discountAmtEnd != null "> and discount_amt_end = #{discountAmtEnd}</if>
+            <if test="presentAmt != null "> and present_amt = #{presentAmt}</if>
+            <if test="oilName != null "> and oil_name = #{oilName}</if>
+            <if test="status != null "> and status = #{status}</if>
+            <if test="stationIdList != null ">
+                and station_id in
+                <foreach item="item" index="index" collection="stationIdList"
+                         open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+        </where>
+    </select>
+    
+    <select id="selectCustomerCardSettingDetailById" parameterType="Long" resultMap="CustomerCardSettingDetailResult">
+        <include refid="selectCustomerCardSettingDetailVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertCustomerCardSettingDetail" parameterType="CustomerCardSettingDetail">
+        insert into customer_card_setting_detail
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="parentId != null">parent_id,</if>
+            <if test="settingRuleType != null">setting_rule_type,</if>
+            <if test="discountAmtStart != null">discount_amt_start,</if>
+            <if test="discountAmtEnd != null">discount_amt_end,</if>
+            <if test="presentAmt != null">present_amt,</if>
+            <if test="oilName != null">oil_name,</if>
+            <if test="status != null">status,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="parentId != null">#{parentId},</if>
+            <if test="settingRuleType != null">#{settingRuleType},</if>
+            <if test="discountAmtStart != null">#{discountAmtStart},</if>
+            <if test="discountAmtEnd != null">#{discountAmtEnd},</if>
+            <if test="presentAmt != null">#{presentAmt},</if>
+            <if test="oilName != null">#{oilName},</if>
+            <if test="status != null">#{status},</if>
+         </trim>
+    </insert>
+
+    <update id="updateCustomerCardSettingDetail" parameterType="CustomerCardSettingDetail">
+        update customer_card_setting_detail
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="parentId != null">parent_id = #{parentId},</if>
+            <if test="settingRuleType != null">setting_rule_type = #{settingRuleType},</if>
+            <if test="discountAmtStart != null">discount_amt_start = #{discountAmtStart},</if>
+            <if test="discountAmtEnd != null">discount_amt_end = #{discountAmtEnd},</if>
+            <if test="presentAmt != null">present_amt = #{presentAmt},</if>
+            <if test="oilName != null">#{oilName},</if>
+            <if test="status != null">#{status},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteCustomerCardSettingDetailById" parameterType="Long">
+        delete from customer_card_setting_detail where id = #{id}
+    </delete>
+
+    <delete id="deleteCustomerCardSettingDetailByIds" parameterType="String">
+        delete from customer_card_setting_detail where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+    <delete id="deleteCustomerCardSettingDetail" parameterType="CustomerCardSettingDetail">
+        delete from customer_card_setting_detail
+        <where>
+            <if test="parentId != null "> and parent_id = #{parentId}</if>
+            <if test="settingRuleType != null  and settingRuleType != ''"> and setting_rule_type = #{settingRuleType}</if>
+            <if test="discountAmtStart != null "> and discount_amt_start = #{discountAmtStart}</if>
+            <if test="discountAmtEnd != null "> and discount_amt_end = #{discountAmtEnd}</if>
+            <if test="presentAmt != null "> and present_amt = #{presentAmt}</if>
+            <if test="oilName != null"> and oil_name = #{oilName}</if>
+            <if test="status != null"> and status = #{status}</if>
+        </where>
+    </delete>
+</mapper>

+ 144 - 0
Yijia-SaaS/yijia-customer/src/main/resources/mapper/customer/CustomerCardSettingMapper.xml

@@ -0,0 +1,144 @@
+<?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.CustomerCardSettingMapper">
+    
+    <resultMap type="CustomerCardSetting" id="CustomerCardSettingResult">
+        <result property="id"    column="id"    />
+        <result property="cardOilsType"    column="card_oils_type"    />
+        <result property="discountTimeSetting"    column="discount_time_setting"    />
+        <result property="discountTime"    column="discount_time"    />
+        <result property="discountTimeType"    column="discount_time_type"    />
+        <result property="presentScale"    column="present_scale"    />
+        <result property="isDiscountCoupon"    column="is_discount_coupon"    />
+        <result property="enjoyIntegralMultiple"    column="enjoy_integral_multiple"    />
+        <result property="stationId"    column="station_id"    />
+        <result property="stationName"    column="station_name"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="isGradeSetting"    column="is_grade_setting"    />
+        <result property="isMarket"    column="is_market"    />
+    </resultMap>
+
+    <sql id="selectCustomerCardSettingVo">
+        select id, card_oils_type, discount_time_setting, discount_time, present_scale, is_discount_coupon, enjoy_integral_multiple, station_id, station_name, create_time,discount_time_type,is_market,is_grade_setting from customer_card_setting
+    </sql>
+
+    <select id="selectCustomerCardSettingList" parameterType="CustomerCardSetting" resultMap="CustomerCardSettingResult">
+        <include refid="selectCustomerCardSettingVo"/>
+        <where>  
+            <if test="cardOilsType != null  and cardOilsType != ''"> and card_oils_type = #{cardOilsType}</if>
+            <if test="discountTimeSetting != null  and discountTimeSetting != ''"> and discount_time_setting = #{discountTimeSetting}</if>
+            <if test="discountTime != null  and discountTime != ''"> and discount_time = #{discountTime}</if>
+            <if test="discountTimeType != null  and discountTimeType != ''"> and discount_time_type = #{discountTimeType}</if>
+            <if test="presentScale != null  and presentScale != ''"> and present_scale = #{presentScale}</if>
+            <if test="isDiscountCoupon != null  and isDiscountCoupon != ''"> and is_discount_coupon = #{isDiscountCoupon}</if>
+            <if test="enjoyIntegralMultiple != null  and enjoyIntegralMultiple != ''"> and enjoy_integral_multiple = #{enjoyIntegralMultiple}</if>
+            <if test="isGradeSetting != null   and isGradeSetting != ''"> and is_grade_setting = #{isGradeSetting}</if>
+            <if test="isMarket != null   and isMarket != ''"> and is_market = #{isMarket}</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="stationIdList != null ">
+                and station_id in
+                <foreach item="item" index="index" collection="stationIdList"
+                         open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+        </where>
+    </select>
+
+    <select id="selectCustomerCardSetting" parameterType="CustomerCardSetting" resultMap="CustomerCardSettingResult">
+        <include refid="selectCustomerCardSettingVo"/>
+        <where>
+            <if test="cardOilsType != null  and cardOilsType != ''"> and card_oils_type = #{cardOilsType}</if>
+            <if test="discountTimeSetting != null  and discountTimeSetting != ''"> and discount_time_setting = #{discountTimeSetting}</if>
+            <if test="discountTime != null  and discountTime != ''"> and discount_time = #{discountTime}</if>
+            <if test="discountTimeType != null  and discountTimeType != ''"> and discount_time_type = #{discountTimeType}</if>
+            <if test="presentScale != null  and presentScale != ''"> and present_scale = #{presentScale}</if>
+            <if test="isDiscountCoupon != null  and isDiscountCoupon != ''"> and is_discount_coupon = #{isDiscountCoupon}</if>
+            <if test="enjoyIntegralMultiple != null  and enjoyIntegralMultiple != ''"> and enjoy_integral_multiple = #{enjoyIntegralMultiple}</if>
+            <if test="stationId != null "> and station_id = #{stationId}</if>
+            <if test="isGradeSetting != null   and isGradeSetting != ''"> and is_grade_setting = #{isGradeSetting}</if>
+            <if test="isMarket != null   and isMarket != ''"> and is_market = #{isMarket}</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"
+                         open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+        </where>
+         limit 0,1;
+    </select>
+    <select id="selectCustomerCardSettingById" parameterType="Long" resultMap="CustomerCardSettingResult">
+        <include refid="selectCustomerCardSettingVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertCustomerCardSetting" parameterType="CustomerCardSetting">
+        insert into customer_card_setting
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="cardOilsType != null">card_oils_type,</if>
+            <if test="discountTimeSetting != null">discount_time_setting,</if>
+            <if test="discountTime != null">discount_time,</if>
+            <if test="discountTimeType != null ">discount_time_type,</if>
+            <if test="presentScale != null">present_scale,</if>
+            <if test="isDiscountCoupon != null">is_discount_coupon,</if>
+            <if test="enjoyIntegralMultiple != null">enjoy_integral_multiple,</if>
+            <if test="stationId != null">station_id,</if>
+            <if test="stationName != null">station_name,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="isGradeSetting != null">is_grade_setting,</if>
+            <if test="isMarket != null">is_market,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="cardOilsType != null">#{cardOilsType},</if>
+            <if test="discountTimeSetting != null">#{discountTimeSetting},</if>
+            <if test="discountTime != null">#{discountTime},</if>
+            <if test="discountTimeType != null">#{discountTimeType},</if>
+            <if test="presentScale != null">#{presentScale},</if>
+            <if test="isDiscountCoupon != null">#{isDiscountCoupon},</if>
+            <if test="enjoyIntegralMultiple != null">#{enjoyIntegralMultiple},</if>
+            <if test="stationId != null">#{stationId},</if>
+            <if test="stationName != null">#{stationName},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="isGradeSetting != null">#{isGradeSetting},</if>
+            <if test="isMarket != null">#{isMarket},</if>
+         </trim>
+    </insert>
+
+    <update id="updateCustomerCardSetting" parameterType="CustomerCardSetting">
+        update customer_card_setting
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="cardOilsType != null">card_oils_type = #{cardOilsType},</if>
+            <if test="discountTimeSetting != null">discount_time_setting = #{discountTimeSetting},</if>
+            <if test="discountTime != null">discount_time = #{discountTime},</if>
+            <if test="discountTimeType != null"> discount_time_type = #{discountTimeType},</if>
+            <if test="presentScale != null">present_scale = #{presentScale},</if>
+            <if test="isDiscountCoupon != null">is_discount_coupon = #{isDiscountCoupon},</if>
+            <if test="enjoyIntegralMultiple != null">enjoy_integral_multiple = #{enjoyIntegralMultiple},</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="isMarket != null">is_market = #{isMarket},</if>
+            <if test="isGradeSetting != null">is_grade_setting = #{isGradeSetting},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteCustomerCardSettingById" parameterType="Long">
+        delete from customer_card_setting where id = #{id}
+    </delete>
+
+    <delete id="deleteCustomerCardSettingByIds" parameterType="String">
+        delete from customer_card_setting where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+    
+</mapper>

+ 159 - 0
Yijia-SaaS/yijia-customer/src/main/resources/mapper/customer/CustomerElectronicCardMapper.xml

@@ -0,0 +1,159 @@
+<?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.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"    />
+        <result property="amt"    column="amt"    />
+        <result property="cardOilsType"    column="card_oils_type"    />
+        <result property="stationId"    column="station_id"    />
+        <result property="stationName"    column="station_name"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="recentlyTime"    column="recently_time"    />
+        <result property="num"    column="num" />
+        <result property="czamt"    column="czamt"    />
+        <result property="xfamt"    column="xfamt"    />
+        <result property="cardnum"    column="cardnum"    />
+        <result property="cumamt"    column="cumamt"    />
+        <result property="cumnum"    column="cumnum"    />
+    </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
+    </sql>
+
+    <select id="selectCustomerElectronicCardList" parameterType="CustomerElectronicCard" resultMap="CustomerElectronicCardResult">
+        <include refid="selectCustomerElectronicCardVo"/>
+        <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
+                <foreach item="item" index="index" collection="stationIdList"
+                         open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+        </where>
+    </select>
+
+    <select id="selectCustomerElectronicCardById" parameterType="Long" resultMap="CustomerElectronicCardResult">
+        <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>
+    </insert>
+
+    <update id="updateCustomerElectronicCard" parameterType="CustomerElectronicCard">
+        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>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteCustomerElectronicCardById" parameterType="Long">
+        delete from customer_electronic_card where id = #{id}
+    </delete>
+
+    <delete id="deleteCustomerElectronicCardByIds" parameterType="String">
+        delete from customer_electronic_card where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+    <select id="listSum" parameterType="CustomerElectronicCard" resultMap="CustomerElectronicCardResult">
+        SELECT count(DISTINCT union_id) as num,sum(amt) as amt
+        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
+                <foreach item="item" index="index" collection="stationIdList"
+                         open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+        </where>
+    </select>
+
+     <!--存储过程
+       CALL selectCard();
+             CALL selectCard(#{pageNo,mode=IN},#{pageSetting,mode=IN});-->
+    <select id="selectCard" parameterType="CustomerElectronicCard" statementType="CALLABLE" resultMap="CustomerElectronicCardResult">
+            CALL selectCard(#{strSql,mode=IN},#{pageNo,mode=IN},#{pageSetting,mode=IN});
+    </select>
+    <!--存储过程-->
+    <select id="selectCardPage" parameterType="CustomerElectronicCard" statementType="CALLABLE" resultMap="CustomerElectronicCardResult">
+          CALL selectCardPage(#{strSql,mode=IN});
+    </select>
+</mapper>

+ 21 - 1
Yijia-SaaS/yijia-customer/src/main/resources/mapper/customer/CustomerManageMapper.xml

@@ -191,5 +191,25 @@ 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.member_grade)) as member_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>
 </mapper>