Sfoglia il codice sorgente

设置全局组织机构管理

MS-QJVSRANLTYEO\Administrator 4 anni fa
parent
commit
989b691c1a
20 ha cambiato i file con 580 aggiunte e 42 eliminazioni
  1. 0 3
      Yijia-SaaS/yijia-admin/src/main/java/com/yijia/web/controller/system/SysDeptController.java
  2. 12 1
      Yijia-SaaS/yijia-integral/src/main/java/com/yijia/integral/controller/CustomerPointsRecordController.java
  3. 17 11
      Yijia-SaaS/yijia-integral/src/main/java/com/yijia/integral/controller/IntegralRuleController.java
  4. 122 0
      Yijia-SaaS/yijia-integral/src/main/java/com/yijia/integral/domain/CustomerPointsRecord.java
  5. 11 1
      Yijia-SaaS/yijia-integral/src/main/java/com/yijia/integral/domain/IntegralOrder.java
  6. 11 0
      Yijia-SaaS/yijia-integral/src/main/java/com/yijia/integral/domain/IntegralRule.java
  7. 61 0
      Yijia-SaaS/yijia-integral/src/main/java/com/yijia/integral/mapper/CustomerPointsRecordMapper.java
  8. 61 0
      Yijia-SaaS/yijia-integral/src/main/java/com/yijia/integral/service/ICustomerPointsRecordService.java
  9. 95 0
      Yijia-SaaS/yijia-integral/src/main/java/com/yijia/integral/service/impl/CustomerPointsRecordServiceImpl.java
  10. 18 0
      Yijia-SaaS/yijia-integral/src/main/java/com/yijia/integral/service/impl/IntegralRuleServiceImpl.java
  11. 8 1
      Yijia-SaaS/yijia-integral/src/main/resources/mapper/integral/CustomerPointsMapper.xml
  12. 94 0
      Yijia-SaaS/yijia-integral/src/main/resources/mapper/integral/CustomerPointsRecordMapper.xml
  13. 7 1
      Yijia-SaaS/yijia-integral/src/main/resources/mapper/integral/IntegralOrderMapper.xml
  14. 6 1
      Yijia-SaaS/yijia-integral/src/main/resources/mapper/integral/IntegralRuleMapper.xml
  15. 13 9
      Yijia-SaaS/yijia-market/src/main/java/com/yijia/market/controller/MarkertPlanController.java
  16. 6 4
      Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/controller/StationPayController.java
  17. 12 0
      Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/domain/StationPay.java
  18. 11 8
      Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/service/impl/StationPayServiceImpl.java
  19. 2 1
      Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/task/SaticScheduleTask.java
  20. 13 1
      Yijia-SaaS/yijia-station/src/main/resources/mapper/station/StationPayMapper.xml

+ 0 - 3
Yijia-SaaS/yijia-admin/src/main/java/com/yijia/web/controller/system/SysDeptController.java

@@ -107,7 +107,6 @@ public class SysDeptController extends BaseController
     public AjaxResult userdepttree(SysDept dept)
     {
         LoginUser currentUser = SecurityUtils.getLoginUser();
-        System.out.println("sssss1====================="+currentUser.getUser().getDeptId());
         //获取当前登陆人级别
         SysDept deptJb=deptService.selectDeptById(currentUser.getUser().getDeptId());
         List<SysDept> depts =new ArrayList<>();
@@ -124,9 +123,7 @@ public class SysDeptController extends BaseController
                 depts= deptService.selectDeptList(dept);
             }
         }
-        System.out.println("sssss2====================="+depts);
         List<TreeSelect> list = deptService.buildDeptTreeSelect(depts);
-        System.out.println("sssss3====================="+list);
         return AjaxResult.success(list);
     }
     /**

+ 12 - 1
Yijia-SaaS/yijia-integral/src/main/java/com/yijia/integral/controller/CustomerPointsRecordController.java

@@ -1,6 +1,9 @@
 package com.yijia.integral.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;
@@ -32,7 +35,8 @@ public class CustomerPointsRecordController extends BaseController
 {
     @Autowired
     private ICustomerPointsRecordService customerPointsRecordService;
-
+    @Autowired
+    private ISysDeptService deptService;
     /**
      * 查询客户积分记录列表
      */
@@ -40,6 +44,13 @@ public class CustomerPointsRecordController extends BaseController
     @GetMapping("/list")
     public TableDataInfo list(CustomerPointsRecord customerPointsRecord)
     {
+        if(customerPointsRecord!=null &&customerPointsRecord.getStationId()!=null){
+            SysDept dept =new SysDept();
+            dept.setDeptId(customerPointsRecord.getStationId());
+            List<String> list = deptService.selectDeptId(dept);
+            customerPointsRecord.setStationIdList(list);
+            customerPointsRecord.setStationId(null);
+        }
         startPage();
         List<CustomerPointsRecord> list = customerPointsRecordService.selectCustomerPointsRecordList(customerPointsRecord);
         return getDataTable(list);

+ 17 - 11
Yijia-SaaS/yijia-integral/src/main/java/com/yijia/integral/controller/IntegralRuleController.java

@@ -24,7 +24,7 @@ import com.yijia.common.utils.poi.ExcelUtil;
 import com.yijia.common.core.page.TableDataInfo;
 
 /**
- * 【请填写功能名称】Controller
+ * 积分规则Controller
  * 
  * @author yijia
  * @date 2021-02-24
@@ -38,7 +38,7 @@ public class IntegralRuleController extends BaseController
     @Autowired
     private ISysDeptService sysDeptService;
     /**
-     * 查询【请填写功能名称】列表
+     * 查询积分规则列表
      */
     @PreAuthorize("@ss.hasPermi('integral:rule:list')")
     @GetMapping("/list")
@@ -57,10 +57,10 @@ public class IntegralRuleController extends BaseController
     }
 
     /**
-     * 导出【请填写功能名称】列表
+     * 导出积分规则列表
      */
     @PreAuthorize("@ss.hasPermi('integral:rule:export')")
-    @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
+    @Log(title = "积分规则", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
     public AjaxResult export(IntegralRule integralRule)
     {
@@ -77,7 +77,7 @@ public class IntegralRuleController extends BaseController
     }
 
     /**
-     * 获取【请填写功能名称】详细信息
+     * 获取积分规则详细信息
      */
     @PreAuthorize("@ss.hasPermi('integral:rule:query')")
     @GetMapping(value = "/{id}")
@@ -87,32 +87,38 @@ public class IntegralRuleController extends BaseController
     }
 
     /**
-     * 新增【请填写功能名称】
+     * 新增积分规则
      */
     @PreAuthorize("@ss.hasPermi('integral:rule:add')")
-    @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
+    @Log(title = "积分规则", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody IntegralRule integralRule)
     {
+        if(integralRule!=null && integralRule.getIntegralActivity()==null){
+            integralRule.setIntegralActivity("0");
+        }
         return toAjax(integralRuleService.insertIntegralRule(integralRule));
     }
 
     /**
-     * 修改【请填写功能名称】
+     * 修改积分规则
      */
     @PreAuthorize("@ss.hasPermi('integral:rule:edit')")
-    @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
+    @Log(title = "积分规则", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody IntegralRule integralRule)
     {
+        if(integralRule!=null && integralRule.getIntegralActivity()==null){
+            integralRule.setIntegralActivity("0");
+        }
         return toAjax(integralRuleService.updateIntegralRule(integralRule));
     }
 
     /**
-     * 删除【请填写功能名称】
+     * 删除积分规则
      */
     @PreAuthorize("@ss.hasPermi('integral:rule:remove')")
-    @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
+    @Log(title = "积分规则", businessType = BusinessType.DELETE)
 	@DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids)
     {

+ 122 - 0
Yijia-SaaS/yijia-integral/src/main/java/com/yijia/integral/domain/CustomerPointsRecord.java

@@ -0,0 +1,122 @@
+package com.yijia.integral.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;
+
+/**
+ * 客户积分记录对象 customer_points_record
+ * 
+ * @author yijia
+ * @date 2021-03-17
+ */
+public class CustomerPointsRecord extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键自增 */
+    private Long id;
+
+    /** 微信用户唯一标识 */
+    @Excel(name = "微信用户唯一标识")
+    private String unionId;
+
+    /** 客户名称 */
+    @Excel(name = "客户名称")
+    private String customerName;
+
+    /** 积分记录类型:-,消耗; +,增加; */
+    @Excel(name = "积分记录类型:-,消耗; +,增加;")
+    private String recordType;
+
+    /** 消耗或增加积分 */
+    @Excel(name = "消耗或增加积分")
+    private Long integral;
+
+    /** 油站ID */
+    @Excel(name = "油站ID")
+    private Long stationId;
+
+    /** 油站名称 */
+    @Excel(name = "油站名称")
+    private String stationName;
+
+    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 setCustomerName(String customerName) 
+    {
+        this.customerName = customerName;
+    }
+
+    public String getCustomerName() 
+    {
+        return customerName;
+    }
+    public void setRecordType(String recordType) 
+    {
+        this.recordType = recordType;
+    }
+
+    public String getRecordType() 
+    {
+        return recordType;
+    }
+    public void setIntegral(Long integral) 
+    {
+        this.integral = integral;
+    }
+
+    public Long getIntegral() 
+    {
+        return integral;
+    }
+    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("unionId", getUnionId())
+            .append("customerName", getCustomerName())
+            .append("recordType", getRecordType())
+            .append("integral", getIntegral())
+            .append("createTime", getCreateTime())
+            .append("stationId", getStationId())
+            .append("stationName", getStationName())
+            .toString();
+    }
+}

+ 11 - 1
Yijia-SaaS/yijia-integral/src/main/java/com/yijia/integral/domain/IntegralOrder.java

@@ -68,8 +68,18 @@ public class IntegralOrder extends BaseEntity
     /** 油站名称 */
     @Excel(name = "油站名称")
     private String stationName;
+    /**手机号**/
+    private String mobilePhone;
 
-    public void setId(Long id) 
+    public String getMobilePhone() {
+        return mobilePhone;
+    }
+
+    public void setMobilePhone(String mobilePhone) {
+        this.mobilePhone = mobilePhone;
+    }
+
+    public void setId(Long id)
     {
         this.id = id;
     }

+ 11 - 0
Yijia-SaaS/yijia-integral/src/main/java/com/yijia/integral/domain/IntegralRule.java

@@ -60,6 +60,9 @@ public class IntegralRule extends BaseEntity
     @Excel(name = "日期选择")
     private String datePicker;
 
+    /** 日期选择 */
+    @Excel(name = "日期选择")
+    private String datePickerTime;
     /** 积分比例 */
     @Excel(name = "积分比例")
     private String integralProportion;
@@ -73,6 +76,14 @@ public class IntegralRule extends BaseEntity
     private List<IntegralRuleDetail> notOilList;
     private List<IntegralShopPic> imgFileList;
 
+    public String getDatePickerTime() {
+        return datePickerTime;
+    }
+
+    public void setDatePickerTime(String datePickerTime) {
+        this.datePickerTime = datePickerTime;
+    }
+
     public List<IntegralRuleDetail> getNotOilList() {
         return notOilList;
     }

+ 61 - 0
Yijia-SaaS/yijia-integral/src/main/java/com/yijia/integral/mapper/CustomerPointsRecordMapper.java

@@ -0,0 +1,61 @@
+package com.yijia.integral.mapper;
+
+import java.util.List;
+import com.yijia.integral.domain.CustomerPointsRecord;
+
+/**
+ * 客户积分记录Mapper接口
+ * 
+ * @author yijia
+ * @date 2021-03-17
+ */
+public interface CustomerPointsRecordMapper 
+{
+    /**
+     * 查询客户积分记录
+     * 
+     * @param id 客户积分记录ID
+     * @return 客户积分记录
+     */
+    public CustomerPointsRecord selectCustomerPointsRecordById(Long id);
+
+    /**
+     * 查询客户积分记录列表
+     * 
+     * @param customerPointsRecord 客户积分记录
+     * @return 客户积分记录集合
+     */
+    public List<CustomerPointsRecord> selectCustomerPointsRecordList(CustomerPointsRecord customerPointsRecord);
+
+    /**
+     * 新增客户积分记录
+     * 
+     * @param customerPointsRecord 客户积分记录
+     * @return 结果
+     */
+    public int insertCustomerPointsRecord(CustomerPointsRecord customerPointsRecord);
+
+    /**
+     * 修改客户积分记录
+     * 
+     * @param customerPointsRecord 客户积分记录
+     * @return 结果
+     */
+    public int updateCustomerPointsRecord(CustomerPointsRecord customerPointsRecord);
+
+    /**
+     * 删除客户积分记录
+     * 
+     * @param id 客户积分记录ID
+     * @return 结果
+     */
+    public int deleteCustomerPointsRecordById(Long id);
+
+    /**
+     * 批量删除客户积分记录
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteCustomerPointsRecordByIds(Long[] ids);
+}

+ 61 - 0
Yijia-SaaS/yijia-integral/src/main/java/com/yijia/integral/service/ICustomerPointsRecordService.java

@@ -0,0 +1,61 @@
+package com.yijia.integral.service;
+
+import java.util.List;
+import com.yijia.integral.domain.CustomerPointsRecord;
+
+/**
+ * 客户积分记录Service接口
+ * 
+ * @author yijia
+ * @date 2021-03-17
+ */
+public interface ICustomerPointsRecordService 
+{
+    /**
+     * 查询客户积分记录
+     * 
+     * @param id 客户积分记录ID
+     * @return 客户积分记录
+     */
+    public CustomerPointsRecord selectCustomerPointsRecordById(Long id);
+
+    /**
+     * 查询客户积分记录列表
+     * 
+     * @param customerPointsRecord 客户积分记录
+     * @return 客户积分记录集合
+     */
+    public List<CustomerPointsRecord> selectCustomerPointsRecordList(CustomerPointsRecord customerPointsRecord);
+
+    /**
+     * 新增客户积分记录
+     * 
+     * @param customerPointsRecord 客户积分记录
+     * @return 结果
+     */
+    public int insertCustomerPointsRecord(CustomerPointsRecord customerPointsRecord);
+
+    /**
+     * 修改客户积分记录
+     * 
+     * @param customerPointsRecord 客户积分记录
+     * @return 结果
+     */
+    public int updateCustomerPointsRecord(CustomerPointsRecord customerPointsRecord);
+
+    /**
+     * 批量删除客户积分记录
+     * 
+     * @param ids 需要删除的客户积分记录ID
+     * @return 结果
+     */
+    public int deleteCustomerPointsRecordByIds(Long[] ids);
+
+    /**
+     * 删除客户积分记录信息
+     * 
+     * @param id 客户积分记录ID
+     * @return 结果
+     */
+    public int deleteCustomerPointsRecordById(Long id);
+}

+ 95 - 0
Yijia-SaaS/yijia-integral/src/main/java/com/yijia/integral/service/impl/CustomerPointsRecordServiceImpl.java

@@ -0,0 +1,95 @@
+package com.yijia.integral.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.integral.mapper.CustomerPointsRecordMapper;
+import com.yijia.integral.domain.CustomerPointsRecord;
+import com.yijia.integral.service.ICustomerPointsRecordService;
+
+/**
+ * 客户积分记录Service业务层处理
+ * 
+ * @author yijia
+ * @date 2021-03-17
+ */
+@Service
+public class CustomerPointsRecordServiceImpl implements ICustomerPointsRecordService 
+{
+    @Autowired
+    private CustomerPointsRecordMapper customerPointsRecordMapper;
+
+    /**
+     * 查询客户积分记录
+     * 
+     * @param id 客户积分记录ID
+     * @return 客户积分记录
+     */
+    @Override
+    public CustomerPointsRecord selectCustomerPointsRecordById(Long id)
+    {
+        return customerPointsRecordMapper.selectCustomerPointsRecordById(id);
+    }
+
+    /**
+     * 查询客户积分记录列表
+     * 
+     * @param customerPointsRecord 客户积分记录
+     * @return 客户积分记录
+     */
+    @Override
+    public List<CustomerPointsRecord> selectCustomerPointsRecordList(CustomerPointsRecord customerPointsRecord)
+    {
+        return customerPointsRecordMapper.selectCustomerPointsRecordList(customerPointsRecord);
+    }
+
+    /**
+     * 新增客户积分记录
+     * 
+     * @param customerPointsRecord 客户积分记录
+     * @return 结果
+     */
+    @Override
+    public int insertCustomerPointsRecord(CustomerPointsRecord customerPointsRecord)
+    {
+        customerPointsRecord.setCreateTime(DateUtils.getNowDate());
+        return customerPointsRecordMapper.insertCustomerPointsRecord(customerPointsRecord);
+    }
+
+    /**
+     * 修改客户积分记录
+     * 
+     * @param customerPointsRecord 客户积分记录
+     * @return 结果
+     */
+    @Override
+    public int updateCustomerPointsRecord(CustomerPointsRecord customerPointsRecord)
+    {
+        return customerPointsRecordMapper.updateCustomerPointsRecord(customerPointsRecord);
+    }
+
+    /**
+     * 批量删除客户积分记录
+     * 
+     * @param ids 需要删除的客户积分记录ID
+     * @return 结果
+     */
+    @Override
+    public int deleteCustomerPointsRecordByIds(Long[] ids)
+    {
+        return customerPointsRecordMapper.deleteCustomerPointsRecordByIds(ids);
+    }
+
+    /**
+     * 删除客户积分记录信息
+     * 
+     * @param id 客户积分记录ID
+     * @return 结果
+     */
+    @Override
+    public int deleteCustomerPointsRecordById(Long id)
+    {
+        return customerPointsRecordMapper.deleteCustomerPointsRecordById(id);
+    }
+}

+ 18 - 0
Yijia-SaaS/yijia-integral/src/main/java/com/yijia/integral/service/impl/IntegralRuleServiceImpl.java

@@ -1,5 +1,7 @@
 package com.yijia.integral.service.impl;
 
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
 import java.util.List;
 
 import com.yijia.integral.domain.IntegralRuleDetail;
@@ -79,6 +81,14 @@ public class IntegralRuleServiceImpl implements IIntegralRuleService
     public int insertIntegralRule(IntegralRule integralRule)
     {
         int i = 0;
+        try {
+            if(integralRule !=null && integralRule.getTermDateManage()!=null && integralRule.getTermDateManage().equals("1")){
+                SimpleDateFormat sdf =   new SimpleDateFormat( "yyyy-MM-dd");
+                integralRule.setEmptyDate(sdf.parse("2099-12-31") );
+            }
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
         integralRuleMapper.insertIntegralRule(integralRule);
       //  IntegralRule rule=  integralRuleMapper.insertIntegralRule(integralRule);
         //判断规则明细
@@ -158,6 +168,14 @@ public class IntegralRuleServiceImpl implements IIntegralRuleService
                 integralShopPicMapper.insertIntegralShopPic(img);
             }
         }
+        try {
+            if(integralRule !=null && integralRule.getTermDateManage()!=null && integralRule.getTermDateManage().equals("1")){
+                SimpleDateFormat sdf =   new SimpleDateFormat( "yyyy-MM-dd");
+                integralRule.setEmptyDate(sdf.parse("2099-12-31") );
+            }
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
         return  integralRuleMapper.updateIntegralRule(integralRule);
     }
 

+ 8 - 1
Yijia-SaaS/yijia-integral/src/main/resources/mapper/integral/CustomerPointsMapper.xml

@@ -29,7 +29,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <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="mobilePhone != null  and mobilePhone != ''"> and mobile_phone = #{mobilePhone}</if>
+            <choose>
+                <when test="mobilePhone != null  and mobilePhone != ''">
+                    and mobile_phone = #{mobilePhone}
+                </when>
+                <otherwise>
+                    and  mobile_phone != ""
+                </otherwise>
+            </choose>
             <if test="points != null "> and points = #{points}</if>
             <if test="consumptionPoints != null "> and consumption_points = #{consumptionPoints}</if>
             <if test="accumulatePoints != null "> and accumulate_points = #{accumulatePoints}</if>

+ 94 - 0
Yijia-SaaS/yijia-integral/src/main/resources/mapper/integral/CustomerPointsRecordMapper.xml

@@ -0,0 +1,94 @@
+<?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.integral.mapper.CustomerPointsRecordMapper">
+    
+    <resultMap type="CustomerPointsRecord" id="CustomerPointsRecordResult">
+        <result property="id"    column="id"    />
+        <result property="unionId"    column="union_id"    />
+        <result property="customerName"    column="customer_name"    />
+        <result property="recordType"    column="record_type"    />
+        <result property="integral"    column="integral"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="stationId"    column="station_id"    />
+        <result property="stationName"    column="station_name"    />
+    </resultMap>
+
+    <sql id="selectCustomerPointsRecordVo">
+        select id, union_id, customer_name, record_type, integral, create_time, station_id, station_name from customer_points_record
+    </sql>
+
+    <select id="selectCustomerPointsRecordList" parameterType="CustomerPointsRecord" resultMap="CustomerPointsRecordResult">
+        <include refid="selectCustomerPointsRecordVo"/>
+        <where>  
+            <if test="unionId != null  and unionId != ''"> and union_id = #{unionId}</if>
+            <if test="customerName != null  and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
+            <if test="recordType != null  and recordType != ''"> and record_type = #{recordType}</if>
+            <if test="integral != null "> and integral = #{integral}</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>
+        order by  id desc
+    </select>
+    
+    <select id="selectCustomerPointsRecordById" parameterType="Long" resultMap="CustomerPointsRecordResult">
+        <include refid="selectCustomerPointsRecordVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertCustomerPointsRecord" parameterType="CustomerPointsRecord" useGeneratedKeys="true" keyProperty="id">
+        insert into customer_points_record
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="unionId != null">union_id,</if>
+            <if test="customerName != null">customer_name,</if>
+            <if test="recordType != null">record_type,</if>
+            <if test="integral != null">integral,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="stationId != null">station_id,</if>
+            <if test="stationName != null">station_name,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="unionId != null">#{unionId},</if>
+            <if test="customerName != null">#{customerName},</if>
+            <if test="recordType != null">#{recordType},</if>
+            <if test="integral != null">#{integral},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="stationId != null">#{stationId},</if>
+            <if test="stationName != null">#{stationName},</if>
+         </trim>
+    </insert>
+
+    <update id="updateCustomerPointsRecord" parameterType="CustomerPointsRecord">
+        update customer_points_record
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="unionId != null">union_id = #{unionId},</if>
+            <if test="customerName != null">customer_name = #{customerName},</if>
+            <if test="recordType != null">record_type = #{recordType},</if>
+            <if test="integral != null">integral = #{integral},</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>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteCustomerPointsRecordById" parameterType="Long">
+        delete from customer_points_record where id = #{id}
+    </delete>
+
+    <delete id="deleteCustomerPointsRecordByIds" parameterType="String">
+        delete from customer_points_record where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+    
+</mapper>

+ 7 - 1
Yijia-SaaS/yijia-integral/src/main/resources/mapper/integral/IntegralOrderMapper.xml

@@ -18,10 +18,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="integral"    column="integral"    />
         <result property="stationId"    column="station_id"    />
         <result property="stationName"    column="station_name"    />
+        <result property="mobilePhone"    column="mobile_phone"    />
+
     </resultMap>
 
     <sql id="selectIntegralOrderVo">
-        select id, integral_order_no, wares_type, wares_name, wares_id, union_id, customer_name, exchange_num, exchange_time, status, integral, station_id, station_name from integral_order
+        select id, integral_order_no, wares_type, wares_name, wares_id, union_id, customer_name, exchange_num, exchange_time, status, integral, station_id, station_name,mobile_phone from integral_order
     </sql>
 
     <select id="selectIntegralOrderList" parameterType="IntegralOrder" resultMap="IntegralOrderResult">
@@ -38,6 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="status != null  and status != ''"> and status = #{status}</if>
             <if test="integral != null "> and integral = #{integral}</if>
             <if test="stationId != null "> and station_id = #{stationId}</if>
+            <if test="mobilePhone != null "> and mobile_phone = #{mobilePhone}</if>
             <if test="stationName != null  and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
             <if test="stationIdList != null ">
                 and station_id in
@@ -70,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="integral != null">integral,</if>
             <if test="stationId != null">station_id,</if>
             <if test="stationName != null">station_name,</if>
+            <if test="mobilePhone != null "> mobile_phone,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="integralOrderNo != null">#{integralOrderNo},</if>
@@ -84,6 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="integral != null">#{integral},</if>
             <if test="stationId != null">#{stationId},</if>
             <if test="stationName != null">#{stationName},</if>
+            <if test="mobilePhone != null">#{mobilePhone},</if>
          </trim>
     </insert>
 
@@ -102,6 +107,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="integral != null">integral = #{integral},</if>
             <if test="stationId != null">station_id = #{stationId},</if>
             <if test="stationName != null">station_name = #{stationName},</if>
+            <if test="mobilePhone != null "> mobile_phone = #{mobilePhone},</if>
         </trim>
         where id = #{id}
     </update>

+ 6 - 1
Yijia-SaaS/yijia-integral/src/main/resources/mapper/integral/IntegralRuleMapper.xml

@@ -17,10 +17,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="datePicker"    column="date_picker"    />
         <result property="integralProportion"    column="integral_proportion"    />
         <result property="integralDeductionOil"    column="integral_deduction_oil"    />
+        <result property="datePickerTime"    column="date_picker_time"    />
     </resultMap>
 
     <sql id="selectIntegralRuleVo">
-        select id, station_id, station_name, rule_type, term_date_manage, empty_date, expiration_reminder, remind_date, integral_activity, date_picker, integral_proportion, integral_deduction_oil from integral_rule
+        select id, station_id, station_name, rule_type, term_date_manage, empty_date, expiration_reminder, remind_date, integral_activity, date_picker, integral_proportion, integral_deduction_oil,date_picker_time from integral_rule
     </sql>
 
     <select id="selectIntegralRuleList" parameterType="IntegralRule" resultMap="IntegralRuleResult">
@@ -37,6 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="datePicker != null  and datePicker != ''"> and date_picker = #{datePicker}</if>
             <if test="integralProportion != null  and integralProportion != ''"> and integral_proportion = #{integralProportion}</if>
             <if test="integralDeductionOil != null  and integralDeductionOil != ''"> and integral_deduction_oil = #{integralDeductionOil}</if>
+            <if test="datePickerTime != null  and datePickerTime != ''"> and date_picker_time = #{datePickerTime}</if>
             <if test="stationIdList != null ">
                 and station_id in
                 <foreach item="item" index="index" collection="stationIdList"
@@ -67,6 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="datePicker != null">date_picker,</if>
             <if test="integralProportion != null">integral_proportion,</if>
             <if test="integralDeductionOil != null">integral_deduction_oil,</if>
+            <if test="datePickerTime != null">date_picker_time,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="stationId != null">#{stationId},</if>
@@ -80,6 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="datePicker != null">#{datePicker},</if>
             <if test="integralProportion != null">#{integralProportion},</if>
             <if test="integralDeductionOil != null">#{integralDeductionOil},</if>
+            <if test="datePickerTime != null">#{datePickerTime},</if>
          </trim>
     </insert>
 
@@ -97,6 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="datePicker != null">date_picker = #{datePicker},</if>
             <if test="integralProportion != null">integral_proportion = #{integralProportion},</if>
             <if test="integralDeductionOil != null">integral_deduction_oil = #{integralDeductionOil},</if>
+            <if test="datePickerTime != null  and datePickerTime != ''">  date_picker_time = #{datePickerTime},</if>
         </trim>
         where id = #{id}
     </update>

+ 13 - 9
Yijia-SaaS/yijia-market/src/main/java/com/yijia/market/controller/MarkertPlanController.java

@@ -3,8 +3,10 @@ package com.yijia.market.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;
@@ -38,7 +40,7 @@ public class MarkertPlanController extends BaseController
     @Autowired
     private IMarkertPlanService markertPlanService;
     @Autowired
-    private ISysUserService sysUserService;
+    private ISysDeptService deptService;
     /**
      * 查询营销方案列表
      */
@@ -46,11 +48,12 @@ public class MarkertPlanController extends BaseController
     @GetMapping("/list")
     public TableDataInfo list(MarkertPlan markertPlan)
     {
-        LoginUser currentUser = SecurityUtils.getLoginUser();
-        String selectDeptid= sysUserService.getUserRoleDeptId(currentUser);
-        if(selectDeptid !=null && selectDeptid!=""){
-            List<String> list = Arrays.asList(selectDeptid.split(","));
+        if(markertPlan!=null &&markertPlan.getStationId()!=null){
+            SysDept dept =new SysDept();
+            dept.setDeptId(markertPlan.getStationId());
+            List<String> list = deptService.selectDeptId(dept);
             markertPlan.setStationIdList(list);
+            markertPlan.setStationId(null);
         }
         startPage();
         List<MarkertPlan> list = markertPlanService.selectMarkertPlanList(markertPlan);
@@ -65,11 +68,12 @@ public class MarkertPlanController extends BaseController
     @GetMapping("/export")
     public AjaxResult export(MarkertPlan markertPlan)
     {
-        LoginUser currentUser = SecurityUtils.getLoginUser();
-        String selectDeptid= sysUserService.getUserRoleDeptId(currentUser);
-        if(selectDeptid !=null && selectDeptid!=""){
-            List<String> list = Arrays.asList(selectDeptid.split(","));
+        if(markertPlan!=null &&markertPlan.getStationId()!=null){
+            SysDept dept =new SysDept();
+            dept.setDeptId(markertPlan.getStationId());
+            List<String> list = deptService.selectDeptId(dept);
             markertPlan.setStationIdList(list);
+            markertPlan.setStationId(null);
         }
         List<MarkertPlan> list = markertPlanService.selectMarkertPlanList(markertPlan);
         ExcelUtil<MarkertPlan> util = new ExcelUtil<MarkertPlan>(MarkertPlan.class);

+ 6 - 4
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/controller/StationPayController.java

@@ -103,10 +103,12 @@ public class StationPayController extends BaseController
     @GetMapping(value = "/queryOne")
     public AjaxResult queryOne(StationPay stationPay)
     {
-        LoginUser currentUser = SecurityUtils.getLoginUser();
-        boolean flag= sysUserService.getUserRole(currentUser);
-        if(!flag){
-            stationPay.setStationId(currentUser.getUser().getDeptId());
+        if(stationPay!=null &&stationPay.getStationId()!=null){
+            SysDept dept =new SysDept();
+            dept.setDeptId(stationPay.getStationId());
+            List<String> list = sysDeptService.selectDeptId(dept);
+            stationPay.setStationIdList(list);
+            stationPay.setStationId(null);
         }
         return AjaxResult.success(stationPayService.selectStationPayOne(stationPay));
     }

+ 12 - 0
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/domain/StationPay.java

@@ -71,9 +71,21 @@ public class StationPay extends BaseEntity
     /** 优惠方案设置(1直降,2,满减,3 立减) */
     @Excel(name = "优惠方案设置", readConverterExp = "1=直降,2,满减,3,立=减")
     private String discountSetting;
+
+    /** 班结是否打印(1,是 2 否) */
+    @Excel(name = "班结是否打印(1,是 2 否)")
+    private String integralPrintFlag;
     /**公告*/
     private String notice;
 
+    public String getIntegralPrintFlag() {
+        return integralPrintFlag;
+    }
+
+    public void setIntegralPrintFlag(String integralPrintFlag) {
+        this.integralPrintFlag = integralPrintFlag;
+    }
+
     public String getNotice() {
         return notice;
     }

+ 11 - 8
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/service/impl/StationPayServiceImpl.java

@@ -129,21 +129,24 @@ public class StationPayServiceImpl implements IStationPayService
     public StationPay selectStationPayOne(StationPay stationPay) {
         StationPay pay=new StationPay();
         List<StationPay>  list= stationPayMapper.selectStationPayList(stationPay);
-        if(list!=null && list.size()>0){
+         if(list!=null && list.size()>0){
             pay.setPayId(list.get(0).getPayId());
-            pay.setWsPrintFlag(list.get(0).getWsPrintFlag());
-            pay.setPayCallbackPage(list.get(0).getPayCallbackPage());
-            pay.setPreferentialWayShareFlag(list.get(0).getPreferentialWayShareFlag());
-            pay.setPayPrintNum(list.get(0).getPayPrintNum());
             pay.setPayMode(list.get(0).getPayMode());
-            pay.setOtherPreferentialWay(list.get(0).getOtherPreferentialWay());
+            pay.setStationId(list.get(0).getStationId());
+            pay.setStationName(list.get(0).getStationName());
             pay.setImagePhotosFlag(list.get(0).getImagePhotosFlag());
             pay.setCardEnabledFlag(list.get(0).getCardEnabledFlag());
             pay.setActivityPic(list.get(0).getActivityPic());
+            pay.setPreferentialWayShareFlag(list.get(0).getPreferentialWayShareFlag());
+            pay.setOtherPreferentialWay(list.get(0).getOtherPreferentialWay());
+            pay.setPayPrintNum(list.get(0).getPayPrintNum());
+            pay.setPayCallbackPage(list.get(0).getPayCallbackPage());
+            pay.setWsPrintFlag(list.get(0).getWsPrintFlag());
             pay.setPrintSetting(list.get(0).getPrintSetting());
-            pay.setStationId(list.get(0).getStationId());
-            pay.setStationName(list.get(0).getStationName());
             pay.setDiscountSetting(list.get(0).getDiscountSetting());
+            pay.setIsNoOil(list.get(0).getIsNoOil());
+            pay.setNotice(list.get(0).getNotice());
+            pay.setIntegralPrintFlag(list.get(0).getIntegralPrintFlag());
             StationPic stationPic =new StationPic();
             stationPic.setStationId(pay.getStationId());
             stationPic.setParentId(pay.getPayId());

+ 2 - 1
Yijia-SaaS/yijia-station/src/main/java/com/yijia/station/task/SaticScheduleTask.java

@@ -11,6 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.scheduling.annotation.EnableScheduling;
 import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
 
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
@@ -31,7 +32,7 @@ public class SaticScheduleTask {
     //或直接指定时间间隔,例如:5秒 5000
     @Scheduled(fixedRate=5000)
     private void configureTasks() throws ParseException {
-        //获取当前时间 yyyy-MM-dd HH:mm:ss
+       // 获取当前时间 yyyy-MM-dd HH:mm:ss
         String newdate = DateUtils.getTime();
         System.err.println("执行静态定时任务时间: " + newdate);
         //查询油品调价列表 查询出未调价的信息

+ 13 - 1
Yijia-SaaS/yijia-station/src/main/resources/mapper/station/StationPayMapper.xml

@@ -21,10 +21,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="discountSetting"    column="discount_setting"    />
         <result property="isNoOil"    column="is_no_oil"    />
         <result property="notice"    column="notice"    />
+        <result property="integralPrintFlag"    column="integral_print_flag"    />
     </resultMap>
 
     <sql id="selectStationPayVo">
-        select pay_id, pay_mode, station_id, station_name, image_photos_flag, card_enabled_flag, activity_pic, preferential_way_share_flag, other_preferential_way, pay_print_num, pay_callback_page, ws_print_flag, print_setting, discount_setting, is_no_oil,notice from station_pay
+        select pay_id, pay_mode, station_id, station_name, image_photos_flag, card_enabled_flag, activity_pic, preferential_way_share_flag, other_preferential_way, pay_print_num, pay_callback_page, ws_print_flag, print_setting, discount_setting, is_no_oil,notice,integral_print_flag from station_pay
     </sql>
 
     <select id="selectStationPayList" parameterType="StationPay" resultMap="StationPayResult">
@@ -45,6 +46,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="discountSetting != null  and discountSetting != ''"> and discount_setting = #{discountSetting}</if>
             <if test="isNoOil != null  and isNoOil != ''"> and is_no_oil = #{isNoOil}</if>
             <if test="notice != null  and notice != ''"> and notice = #{notice}</if>
+            <if test="integralPrintFlag != null  and integralPrintFlag != ''"> and integral_print_flag = #{integralPrintFlag}</if>
+            <if test="stationIdList != null ">
+                and station_id in
+                <foreach item="item" index="index" collection="stationIdList"
+                         open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
         </where>
         order by  pay_id desc
     </select>
@@ -72,6 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="discountSetting != null">discount_setting,</if>
             <if test="isNoOil != null">is_no_oil,</if>
             <if test="notice != null">notice,</if>
+            <if test="integralPrintFlag != null">integral_print_flag,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="payMode != null">#{payMode},</if>
@@ -89,6 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="discountSetting != null">#{discountSetting},</if>
             <if test="isNoOil != null">#{isNoOil},</if>
             <if test="notice != null">#{notice},</if>
+            <if test="integralPrintFlag != null">#{integralPrintFlag},</if>
          </trim>
     </insert>
 
@@ -110,6 +121,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="discountSetting != null">discount_setting = #{discountSetting},</if>
             <if test="isNoOil != null">is_no_oil = #{isNoOil},</if>
             <if test="notice != null">notice = #{notice},</if>
+            <if test="integralPrintFlag != null">  integral_print_flag = #{integralPrintFlag},</if>
         </trim>
         where pay_id = #{payId}
     </update>