From 2c481ac06298b5c464fd927893ce4c62b03c39c0 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Wed, 09 Mar 2022 17:46:27 +0800
Subject: [PATCH] Merge branch 'developer' into alpha

---
 zq-erp/src/main/java/com/matrix/system/common/actions/AdminAction.java                  |   10 
 zq-erp/src/main/java/com/matrix/system/enums/SmsTypeEnum.java                           |   53 +
 zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml                         |    5 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/YuyueAction.java              |   13 
 zq-erp/src/main/java/com/matrix/system/enums/SmsPlatformEnum.java                       |   50 +
 zq-erp/src/main/java/com/matrix/core/enums/EnumApiShowAble.java                         |   26 
 zq-erp/src/main/java/com/matrix/core/enums/EnumsManager.java                            |  155 ++++
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxErpOrderAction.java         |    6 
 zq-erp/src/main/java/com/matrix/system/hive/action/VipInfoController.java               |   19 
 zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipInfo.java                        |   15 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxUserAction.java             |   14 
 zq-erp/src/main/resources/config/application.properties                                 |    2 
 zq-erp/src/main/resources/config/prd/system.properties                                  |    2 
 zq-erp/src/main/java/com/matrix/system/common/bean/respVO/OperationLogRespVo.java       |   66 ++
 zq-erp/src/main/resources/config/application-meidusw.properties                         |   68 ++
 zq-erp/src/main/java/com/matrix/system/enums/OperationButtonEnum.java                   |   77 ++
 zq-erp/src/main/java/com/matrix/system/common/service/impl/OperationLogServiceImpl.java |   85 ++
 zq-erp/src/main/java/com/matrix/system/enums/PayMethodEnum.java                         |   55 +
 zq-erp/src/main/java/com/matrix/system/enums/OperationFunctionEnum.java                 |   64 ++
 zq-erp/src/main/java/com/matrix/system/common/bean/OperationLog.java                    |   81 ++
 zq-erp/src/main/java/com/matrix/core/enums/EnumsShowVo.java                             |   24 
 zq-erp/src/main/java/com/matrix/system/common/service/OperationLogService.java          |   27 
 zq-erp/src/main/java/com/matrix/system/hive/service/SysOrderService.java                |    2 
 zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java                 |   36 
 zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java |   81 ++
 zq-erp/src/main/java/com/matrix/system/common/dao/OperationLogDao.java                  |   19 
 zq-erp/src/main/resources/mybatis/mapper/common/OperstionLogDao.xml                     |   68 ++
 zq-erp/src/main/java/com/matrix/system/app/action/ApiOrderAction.java                   |   12 
 zq-erp/src/main/java/com/matrix/system/common/bean/reqVO/OperationLogReqVo.java         |   77 ++
 zq-erp/src/main/java/com/matrix/system/common/actions/CommonDataAction.java             |   48 +
 zq-erp/src/main/resources/templates/views/admin/hive/vip/vipInfo-list.html              |   33 +
 zq-erp/src/main/java/com/matrix/system/common/bean/reqVO/EnumCodeReqVo.java             |   15 
 zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java        |   79 ++
 zq-erp/src/main/resources/config/application-alpha.properties                           |   19 
 zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/operation-list.html |  333 ++++++++++
 zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java           |   50 
 zq-erp/src/main/java/com/matrix/system/hiveErp/action/OperationLogController.java       |  106 +++
 37 files changed, 1,829 insertions(+), 66 deletions(-)

diff --git a/zq-erp/src/main/java/com/matrix/core/enums/EnumApiShowAble.java b/zq-erp/src/main/java/com/matrix/core/enums/EnumApiShowAble.java
new file mode 100644
index 0000000..6dd12c5
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/core/enums/EnumApiShowAble.java
@@ -0,0 +1,26 @@
+package com.matrix.core.enums;
+
+import java.util.List;
+
+/**
+ * 通过统一获取key,value的能力
+ */
+public interface EnumApiShowAble {
+
+
+    /**
+     * 获取枚举的唯一编码
+     * @return
+     */
+    String getEnumCode();
+
+    /**
+     * 获取枚举对外展示对象列表
+     * @return
+     */
+    List<EnumsShowVo> getEnumsShowVos();
+
+
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/core/enums/EnumsManager.java b/zq-erp/src/main/java/com/matrix/core/enums/EnumsManager.java
new file mode 100644
index 0000000..96fb9cc
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/core/enums/EnumsManager.java
@@ -0,0 +1,155 @@
+package com.matrix.core.enums;
+
+
+import com.matrix.core.tools.LogUtil;
+import org.springframework.boot.ApplicationArguments;
+import org.springframework.boot.ApplicationRunner;
+import org.springframework.core.Ordered;
+import org.springframework.core.annotation.Order;
+import org.springframework.stereotype.Component;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.JarURLConnection;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.*;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+
+
+@Component
+@Order(Ordered.HIGHEST_PRECEDENCE)
+public class EnumsManager implements ApplicationRunner {
+    private final List<String> CLASS_NAME = new ArrayList<>();
+    private ClassLoader classLoader;
+    private static final String SUFFIX = ".class";
+
+    private Map<String, List<EnumsShowVo>> showAbleMap = new HashMap<>();
+
+    @Override
+    public void run(ApplicationArguments args) throws Exception {
+        LogUtil.info("扫描自定义枚举------------------");
+        initEnum("com.matrix");
+        LogUtil.info("扫描自定义枚举结束===============");
+    }
+
+    public List<EnumsShowVo> getShowEnum(String emumCode) {
+        return showAbleMap.get(emumCode);
+    }
+
+
+    private void initEnum(String... packages) {
+        classLoader = Thread.currentThread().getContextClassLoader();
+
+        for (String basePackage : packages) {
+            Enumeration<URL> resources = null;
+            try {
+                resources = classLoader.getResources(basePackage.replaceAll("\\.", "/"));
+            } catch (IOException e) {
+                return;
+            }
+
+            // 扫描当前工程和jar包
+            while (resources.hasMoreElements()) {
+                URL url = resources.nextElement();
+                if ("file".equals(url.getProtocol())) {
+                    doFileScan(url.getPath());
+                } else if ("jar".equals(url.getProtocol())) {
+                    doJarScan(basePackage, url);
+                }
+            }
+        }
+
+        // 初始化枚举数据
+        enumValue();
+    }
+
+    /**
+     * 扫描当前工程对应包下的所有类
+     *
+     * @param path
+     */
+    private void doFileScan(String path) {
+        String rootPath = classLoader.getResource("").getPath();
+        File pathFile = new File(path);
+
+        File[] files = pathFile.listFiles();
+        if (files == null || files.length == 0) {
+            return;
+        }
+
+        for (File file : files) {
+            if (file.isDirectory()) {
+                String nextPath = path + "/" + file.getName();
+                doFileScan(nextPath);
+            } else if (file.getName().endsWith(SUFFIX)) {
+                if (!path.contains(rootPath)) {
+                    return;
+                }
+                String subStr = path.substring(rootPath.length());
+                String className = (subStr + "/" + file.getName().replaceAll(SUFFIX, "")).replaceAll("/", "\\.");
+                CLASS_NAME.add(className);
+            }
+        }
+    }
+
+    /**
+     * 扫描jar包下对应包下所有类
+     *
+     * @param basePackage
+     * @param baseURL
+     */
+    public void doJarScan(String basePackage, URL baseURL) {
+        basePackage = basePackage.replaceAll("\\.", "/");
+        JarFile jarFile;
+        try {
+            URLConnection urlConnection = baseURL.openConnection();
+            JarURLConnection jarUrl = (JarURLConnection) urlConnection;
+            jarFile = jarUrl.getJarFile();
+        } catch (IOException e) {
+            throw new RuntimeException("未找到资源");
+        }
+
+        Enumeration<JarEntry> entries = jarFile.entries();
+        while (entries.hasMoreElements()) {
+            JarEntry entry = entries.nextElement();
+
+            String name = entry.getName();
+            if (name.startsWith(basePackage)) {
+                if (name.endsWith(SUFFIX)) {
+                    String className = name.replaceAll(SUFFIX, "").replaceAll("/", "\\.");
+                    CLASS_NAME.add(className);
+                }
+            }
+        }
+    }
+
+    public void enumValue() {
+        for (String className : CLASS_NAME) {
+            Class<?> clazz = null;
+            try {
+                clazz = classLoader.loadClass(className);
+            } catch (ClassNotFoundException e) {
+                continue;
+            }
+
+            // 判断类是否为枚举类型
+            if (!clazz.isEnum()) {
+                continue;
+            }
+
+            // 判断ApiShowAble是否为类的父类
+            if (!EnumApiShowAble.class.isAssignableFrom(clazz)) {
+                continue;
+            }
+
+            Object[] constants = clazz.getEnumConstants();
+            EnumApiShowAble enumApiShowAble = (EnumApiShowAble) constants[0];
+
+            showAbleMap.put(enumApiShowAble.getEnumCode(), enumApiShowAble.getEnumsShowVos());
+        }
+    }
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/core/enums/EnumsShowVo.java b/zq-erp/src/main/java/com/matrix/core/enums/EnumsShowVo.java
new file mode 100644
index 0000000..0a9fca5
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/core/enums/EnumsShowVo.java
@@ -0,0 +1,24 @@
+package com.matrix.core.enums;
+
+import lombok.Builder;
+import lombok.Data;
+
+/**
+ * 枚举值展示对象
+ */
+@Builder
+@Data
+public class EnumsShowVo {
+
+    /**
+     * 展示名称
+     */
+    private String displayName;
+
+    /**
+     * 提交值
+     */
+    private Integer value;
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/app/action/ApiOrderAction.java b/zq-erp/src/main/java/com/matrix/system/app/action/ApiOrderAction.java
index 67a8262..10237fb 100644
--- a/zq-erp/src/main/java/com/matrix/system/app/action/ApiOrderAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/app/action/ApiOrderAction.java
@@ -15,7 +15,9 @@
 import com.matrix.system.common.bean.SysUsers;
 import com.matrix.system.common.tools.DataAuthUtil;
 import com.matrix.system.hive.action.util.QueryUtil;
-import com.matrix.system.hive.bean.*;
+import com.matrix.system.hive.bean.ShoppingGoodsCategory;
+import com.matrix.system.hive.bean.SysOrder;
+import com.matrix.system.hive.bean.SysShopInfo;
 import com.matrix.system.hive.dao.SysShopInfoDao;
 import com.matrix.system.hive.plugin.util.CollectionUtils;
 import com.matrix.system.hive.pojo.ShoppingCarItem;
@@ -32,7 +34,6 @@
 import org.springframework.web.bind.annotation.*;
 
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.List;
 
 /**
@@ -174,13 +175,10 @@
         if (order == null) {
             throw new GlobleException("订单不存在");
         }
+        sysOrderService.cancelOrder(orderId);
 
+        return AjaxResult.buildSuccessInstance("取消成功");
 
-        int i = sysOrderService.cancelOrder(orderId);
-        if (i > 0) {
-            return AjaxResult.buildSuccessInstance("取消成功");
-        }
-        return AjaxResult.buildFailInstance("取消失败");
     }
 
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/common/actions/AdminAction.java b/zq-erp/src/main/java/com/matrix/system/common/actions/AdminAction.java
index c745258..064d634 100644
--- a/zq-erp/src/main/java/com/matrix/system/common/actions/AdminAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/common/actions/AdminAction.java
@@ -477,6 +477,16 @@
 
 
     /**
+     * 查询所有员工
+     */
+    @RequestMapping(value = "/allUser")
+    public @ResponseBody
+    AjaxResult allUser() {
+        return new AjaxResult(AjaxResult.STATUS_SUCCESS, sysUsersService.findByRoleName(false, null));
+    }
+
+
+    /**
      * 根据角色名称查询店铺的员工
      */
     @RequestMapping(value = "/getShopStaffByRoleName")
diff --git a/zq-erp/src/main/java/com/matrix/system/common/actions/CommonDataAction.java b/zq-erp/src/main/java/com/matrix/system/common/actions/CommonDataAction.java
new file mode 100644
index 0000000..d71dc7b
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/common/actions/CommonDataAction.java
@@ -0,0 +1,48 @@
+package com.matrix.system.common.actions;
+
+import com.matrix.core.enums.EnumsManager;
+import com.matrix.core.enums.EnumsShowVo;
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.system.common.bean.reqVO.EnumCodeReqVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+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 java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author 姜友瑶
+ * @description 管理员总action
+ * @email 935090232@qq.com
+ * @date 2016-06-26
+ */
+@RestController
+@RequestMapping(value = "common/data")
+public class CommonDataAction {
+
+    @Autowired
+    private EnumsManager enumsManager;
+
+    @RequestMapping("/getEnum/{enumCode}")
+    public AjaxResult getEnums(@PathVariable String enumCode) throws ClassNotFoundException {
+        return AjaxResult.buildSuccessInstance(enumsManager.getShowEnum(enumCode));
+    }
+
+    @RequestMapping("/getEnums")
+    public AjaxResult getEnums(@RequestBody @Validated EnumCodeReqVo reqVo) throws ClassNotFoundException {
+
+        Map<String,List<EnumsShowVo>> enumsMap=new HashMap<>();
+        for (String enumCode : reqVo.getEnumCodes()) {
+            List<EnumsShowVo> showEnum = enumsManager.getShowEnum(enumCode);
+            enumsMap.put(enumCode,showEnum);
+        }
+        return AjaxResult.buildSuccessInstance(enumsMap);
+    }
+
+
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/common/bean/OperationLog.java b/zq-erp/src/main/java/com/matrix/system/common/bean/OperationLog.java
new file mode 100644
index 0000000..cf29c4d
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/common/bean/OperationLog.java
@@ -0,0 +1,81 @@
+package com.matrix.system.common.bean;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Builder;
+import lombok.Data;
+
+/**
+ * 单据操作日志
+ */
+@Data
+@TableName("sys_operation_log")
+@Builder
+public class OperationLog {
+
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id",type = IdType.AUTO)
+    private Long  id;
+
+    /**
+     *公司id
+     */
+    private Long  companyId;
+
+    /**
+     *门店id
+     */
+    private Long  shopId;
+
+    /**
+     *操作用户id
+     */
+    private Long  opeUserId;
+
+    /**
+     * 会员id
+     */
+    private Long  vipId;
+
+    /**
+     * 操作功能
+     */
+    private Integer  opeFunction;
+
+    /**
+     * 单据按钮
+     */
+    private Integer  opeBut;
+
+    /**
+     * 单据id
+     */
+    private Long  billId;
+
+    /**
+     * 单据号
+     */
+    private String  billNo;
+
+    /**
+     * 操作人ip
+     */
+    private String  ip;
+
+    /**
+     * 操作备注
+     */
+    private String  note;
+
+    /**
+     * 操作时间
+     */
+    private String  createTime;
+
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/common/bean/reqVO/EnumCodeReqVo.java b/zq-erp/src/main/java/com/matrix/system/common/bean/reqVO/EnumCodeReqVo.java
new file mode 100644
index 0000000..4442013
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/common/bean/reqVO/EnumCodeReqVo.java
@@ -0,0 +1,15 @@
+package com.matrix.system.common.bean.reqVO;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotEmpty;
+import java.util.List;
+
+@Data
+public class EnumCodeReqVo {
+    /**
+     * 枚举编码
+     */
+    @NotEmpty
+    List<String> enumCodes;
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/common/bean/reqVO/OperationLogReqVo.java b/zq-erp/src/main/java/com/matrix/system/common/bean/reqVO/OperationLogReqVo.java
new file mode 100644
index 0000000..b67df9f
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/common/bean/reqVO/OperationLogReqVo.java
@@ -0,0 +1,77 @@
+package com.matrix.system.common.bean.reqVO;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class OperationLogReqVo {
+
+    /**
+     *公司id
+     */
+    private Long  companyId;
+
+    /**
+     *门店id
+     */
+    private Long  shopId;
+
+    /**
+     *操作用户id
+     */
+    private Long  opeUserId;
+
+    /**
+     * 会员id
+     */
+    private String  vipQueryKey;
+
+    /**
+     * 操作功能
+     */
+    private Integer  opeFunction;
+
+    /**
+     * 单据按钮
+     */
+    private Integer  opeBut;
+
+    /**
+     * 单据号
+     */
+    private String  billNo;
+
+    /**
+     * 操作人ip
+     */
+    private String  ip;
+
+    /**
+     * 操作备注
+     */
+    private String  note;
+
+    /**
+     * 操作时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd hh:mm", timezone="GMT+8")
+    private Date startTime;
+
+    @JsonFormat(pattern = "yyyy-MM-dd hh:mm", timezone="GMT+8")
+    private Date endTime;
+
+    private Integer pageNum = 0;
+
+    private Integer pageSize = 20;
+
+    private String order = "desc";
+
+    /**
+     * 排序-根据哪些字段排序 默认'create_time
+     */
+    private String sort = "create_time";
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/common/bean/respVO/OperationLogRespVo.java b/zq-erp/src/main/java/com/matrix/system/common/bean/respVO/OperationLogRespVo.java
new file mode 100644
index 0000000..0a0001f
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/common/bean/respVO/OperationLogRespVo.java
@@ -0,0 +1,66 @@
+package com.matrix.system.common.bean.respVO;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class OperationLogRespVo {
+
+
+    /**
+     * 主键
+     */
+    private Long  id;
+
+    /**
+     *门店名称
+     */
+    private String  shopName;
+
+    /**
+     *操作用户
+     */
+    private String  opeUser;
+
+
+    /**
+     * 会员
+     */
+    private String  vipName;
+
+    /**
+     * 操作功能
+     */
+    private Integer  opeFunction;
+    private String  opeFunctionLabel;
+
+    /**
+     * 单据按钮
+     */
+    private Integer  opeBut;
+    private String  opeButLabel;
+
+    /**
+     * 单据号
+     */
+    private String  billNo;
+
+    /**
+     * 操作人ip
+     */
+    private String  ip;
+
+    /**
+     * 操作备注
+     */
+    private String  note;
+
+    /**
+     * 操作时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8")
+    private Date createTime;
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/common/dao/OperationLogDao.java b/zq-erp/src/main/java/com/matrix/system/common/dao/OperationLogDao.java
new file mode 100644
index 0000000..1250633
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/common/dao/OperationLogDao.java
@@ -0,0 +1,19 @@
+package com.matrix.system.common.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.matrix.system.common.bean.OperationLog;
+import com.matrix.system.common.bean.reqVO.OperationLogReqVo;
+import com.matrix.system.common.bean.respVO.OperationLogRespVo;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @description 单据操作记录
+ * @author jyy
+ * @date 2021-03-10 15:22
+ */
+public interface OperationLogDao extends BaseMapper<OperationLog> {
+
+
+    Page<OperationLogRespVo> selectPageList(Page<OperationLogReqVo> page,@Param("param")  OperationLogReqVo operationLogReqVo);
+}
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/common/service/OperationLogService.java b/zq-erp/src/main/java/com/matrix/system/common/service/OperationLogService.java
new file mode 100644
index 0000000..c2b62a1
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/common/service/OperationLogService.java
@@ -0,0 +1,27 @@
+package com.matrix.system.common.service;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.matrix.system.common.bean.OperationLog;
+import com.matrix.system.common.bean.reqVO.OperationLogReqVo;
+import com.matrix.system.common.bean.respVO.OperationLogRespVo;
+import com.matrix.system.enums.OperationButtonEnum;
+import com.matrix.system.enums.OperationFunctionEnum;
+
+/**
+ * 单据操作日志
+ */
+public interface OperationLogService extends IService<OperationLog> {
+
+
+
+    void saveOperation(Long companyId, Long shopId, Long userId, OperationFunctionEnum operationFunctionEnum, OperationButtonEnum operationButtonEnum,
+                       Long billId, String billNo, Long vipId,String note);
+
+    void saveOperation(Long companyId, Long shopId, Long userId, OperationFunctionEnum operationFunctionEnum, OperationButtonEnum operationButtonEnum,
+                       Long billId, String billNo, Long vipId);
+
+    void saveOperation(Long companyId, Long shopId, Long suId, OperationFunctionEnum operationFunctionEnum, OperationButtonEnum operationButtonEnum,String note);
+
+    Page<OperationLogRespVo> selectPage(Page<OperationLogReqVo> page, OperationLogReqVo operationLogReqVo);
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/common/service/impl/OperationLogServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/common/service/impl/OperationLogServiceImpl.java
new file mode 100644
index 0000000..f50ef56
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/common/service/impl/OperationLogServiceImpl.java
@@ -0,0 +1,85 @@
+package com.matrix.system.common.service.impl;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.matrix.core.tools.WebUtil;
+import com.matrix.system.common.bean.OperationLog;
+import com.matrix.system.common.bean.reqVO.OperationLogReqVo;
+import com.matrix.system.common.bean.respVO.OperationLogRespVo;
+import com.matrix.system.common.dao.OperationLogDao;
+import com.matrix.system.common.service.OperationLogService;
+import com.matrix.system.enums.OperationButtonEnum;
+import com.matrix.system.enums.OperationFunctionEnum;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * 单据操作日志
+ */
+@Service
+public class OperationLogServiceImpl extends ServiceImpl<OperationLogDao, OperationLog> implements OperationLogService {
+
+    @Autowired
+    OperationLogDao operationLogDao;
+
+    @Override
+    public void saveOperation(Long companyId, Long shopId, Long userId, OperationFunctionEnum operationFunctionEnum, OperationButtonEnum operationButtonEnum,
+                              Long billId, String billNo, Long vipId, String note) {
+        save(OperationLog.builder()
+                .companyId(companyId)
+                .shopId(shopId)
+                .opeUserId(userId)
+                .opeFunction(operationFunctionEnum.getValue())
+                .opeBut(operationButtonEnum.getValue())
+                .billId(billId)
+                .billNo(billNo)
+                .vipId(vipId)
+                .note(note)
+                .ip(WebUtil.getCustomerIp()).build());
+
+    }
+
+
+    @Override
+    public void saveOperation(Long companyId, Long shopId, Long userId, OperationFunctionEnum operationFunctionEnum, OperationButtonEnum operationButtonEnum,
+                              Long billId, String billNo, Long vipId) {
+        save(OperationLog.builder()
+                .companyId(companyId)
+                .shopId(shopId)
+                .opeUserId(userId)
+                .opeFunction(operationFunctionEnum.getValue())
+                .opeBut(operationButtonEnum.getValue())
+                .billId(billId)
+                .billNo(billNo)
+                .vipId(vipId)
+                .ip(WebUtil.getCustomerIp()).build());
+
+    }
+
+    @Override
+    public void saveOperation(Long companyId, Long shopId, Long userId, OperationFunctionEnum operationFunctionEnum, OperationButtonEnum operationButtonEnum
+            , String note) {
+        save(OperationLog.builder()
+                .companyId(companyId)
+                .shopId(shopId)
+                .opeUserId(userId)
+                .opeFunction(operationFunctionEnum.getValue())
+                .opeBut(operationButtonEnum.getValue())
+                .note(note)
+                .ip(WebUtil.getCustomerIp()).build());
+
+    }
+
+    @Override
+    public Page<OperationLogRespVo> selectPage(Page<OperationLogReqVo> page, OperationLogReqVo operationLogReqVo) {
+
+        Page<OperationLogRespVo> voPage=operationLogDao.selectPageList(page, operationLogReqVo);
+        voPage.getRecords().stream().forEach(e->{
+            e.setOpeFunctionLabel(OperationFunctionEnum.getByValue(e.getOpeFunction()));
+            e.setOpeButLabel(OperationButtonEnum.getByValue(e.getOpeBut()));
+        });
+
+        return voPage;
+    }
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/enums/OperationButtonEnum.java b/zq-erp/src/main/java/com/matrix/system/enums/OperationButtonEnum.java
new file mode 100644
index 0000000..5c774a5
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/enums/OperationButtonEnum.java
@@ -0,0 +1,77 @@
+package com.matrix.system.enums;
+
+import com.google.common.collect.Lists;
+import com.matrix.core.enums.EnumApiShowAble;
+import com.matrix.core.enums.EnumsShowVo;
+import com.matrix.core.exception.GlobleException;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 操作按钮枚举
+ * @author jyy
+ */
+public enum OperationButtonEnum implements EnumApiShowAble {
+
+    CREATE(1, "新增"),
+    UPDATE(2, "修改"),
+    DELETE(3, "删除"),
+    CANCEL(4, "取消"),
+    INVALID(5, "设置为无效"),
+    EFFECTIVE(6, "设置为有效"),
+    ORDER_SK(7, "订单收款"),
+    ORDER_TK(8, "订单退款"),
+    ORDER_UPDATE_TIME(9, "更新订单时间"),
+    EXPORT(10, "导出"),
+    SERVICE_ORDER_BEGIN(11, "开始服务单"),
+    SERVICE_ORDER_END(12, "完成服务单"),
+    SERVICE_ORDER_PL(13, "服务单配料"),
+    SERVICE_ORDER_HK(14, "划扣"),
+    SERVICE_ORDER_PB(15, "排班"),
+    SERVICE_ORDER_QRYY(16, "确认预约"),
+
+    ;
+
+    private Integer value;
+
+    private String displayName;
+
+    OperationButtonEnum(Integer value, String displayName) {
+        this.value = value;
+        this.displayName = displayName;
+    }
+
+    public static String getByValue(Integer value) {
+        for (int i = 0; i < values().length; i++) {
+            if (value.equals(values()[i].getValue())) {
+                return values()[i].displayName;
+            }
+        }
+        throw new GlobleException("无效枚举值");
+    }
+
+    @Override
+    public String getEnumCode() {
+        return "operationButton";
+    }
+
+    @Override
+    public List<EnumsShowVo> getEnumsShowVos() {
+        return Lists.newArrayList(values()).stream().map(item ->
+                EnumsShowVo.builder()
+                        .displayName(item.getDisplayName())
+                        .value(item.value)
+                        .build()
+        ).collect(Collectors.toList());
+    }
+
+    public Integer getValue() {
+        return value;
+    }
+
+    public String getDisplayName() {
+        return displayName;
+    }
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/enums/OperationFunctionEnum.java b/zq-erp/src/main/java/com/matrix/system/enums/OperationFunctionEnum.java
new file mode 100644
index 0000000..a8e24c1
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/enums/OperationFunctionEnum.java
@@ -0,0 +1,64 @@
+package com.matrix.system.enums;
+
+import com.google.common.collect.Lists;
+import com.matrix.core.enums.EnumApiShowAble;
+import com.matrix.core.enums.EnumsShowVo;
+import com.matrix.core.exception.GlobleException;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 操作功能枚举
+ *
+ * @author jyy
+ */
+public enum OperationFunctionEnum implements EnumApiShowAble {
+
+    ORDER(1, "订单"),
+    SERVICE_ORDER(2, "服务单"),
+    ;
+
+    private Integer value;
+
+    private String displayName;
+
+    OperationFunctionEnum(Integer value, String displayName) {
+        this.value = value;
+        this.displayName = displayName;
+    }
+
+    @Override
+    public String getEnumCode() {
+        return "operationFunction";
+    }
+
+    @Override
+    public List<EnumsShowVo> getEnumsShowVos() {
+        return Lists.newArrayList(values()).stream().map(item ->
+                EnumsShowVo.builder()
+                        .displayName(item.getDisplayName())
+                        .value(item.value)
+                        .build()
+        ).collect(Collectors.toList());
+    }
+
+    public static String getByValue(Integer value) {
+        for (int i = 0; i < values().length; i++) {
+            if (value.equals(values()[i].getValue())) {
+                return values()[i].displayName;
+            }
+        }
+        throw new GlobleException("无效枚举值");
+    }
+
+
+    public Integer getValue() {
+        return value;
+    }
+
+    public String getDisplayName() {
+        return displayName;
+    }
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/enums/PayMethodEnum.java b/zq-erp/src/main/java/com/matrix/system/enums/PayMethodEnum.java
new file mode 100644
index 0000000..41529e8
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/enums/PayMethodEnum.java
@@ -0,0 +1,55 @@
+package com.matrix.system.enums;
+
+import com.google.common.collect.Lists;
+import com.matrix.core.enums.EnumApiShowAble;
+import com.matrix.core.enums.EnumsShowVo;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 支付方式
+ * @author jyy
+ */
+public enum PayMethodEnum implements EnumApiShowAble {
+
+    CASH(1, "现金"),
+    WECHAT(2, "微信"),
+    ALIPAY(3, "支付宝"),
+    BANK_CARD(4, "银行卡"),
+    BANK_MT(5, "美团"),
+    VIP_CARD(6, "会员卡");
+
+    private Integer value;
+
+    private String displayName;
+
+    PayMethodEnum(Integer value, String displayName) {
+        this.value = value;
+        this.displayName = displayName;
+    }
+
+    @Override
+    public String getEnumCode() {
+        return "payMethod";
+    }
+
+    @Override
+    public List<EnumsShowVo> getEnumsShowVos() {
+        return Lists.newArrayList(values()).stream().map(item ->
+                EnumsShowVo.builder()
+                        .displayName(item.getDisplayName())
+                        .value(item.value)
+                        .build()
+        ).collect(Collectors.toList());
+    }
+
+    public Integer getValue() {
+        return value;
+    }
+
+    public String getDisplayName() {
+        return displayName;
+    }
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/enums/SmsPlatformEnum.java b/zq-erp/src/main/java/com/matrix/system/enums/SmsPlatformEnum.java
new file mode 100644
index 0000000..c936723
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/enums/SmsPlatformEnum.java
@@ -0,0 +1,50 @@
+package com.matrix.system.enums;
+
+import com.google.common.collect.Lists;
+import com.matrix.core.enums.EnumApiShowAble;
+import com.matrix.core.enums.EnumsShowVo;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+
+public enum SmsPlatformEnum implements EnumApiShowAble {
+
+
+    ALIBABA(1 ,"阿里云短信"),
+    HUYIWUXIAN(2, "互亿无线");
+
+    private  Integer value;
+
+    private  String displayName;
+
+    SmsPlatformEnum(Integer value, String displayName) {
+        this.value = value;
+        this.displayName = displayName;
+    }
+
+
+
+    @Override
+    public String getEnumCode() {
+        return "smsPlatform";
+    }
+
+    @Override
+    public List<EnumsShowVo> getEnumsShowVos() {
+        return Lists.newArrayList(values()).stream().map(item ->
+                EnumsShowVo.builder()
+                        .displayName(item.getDisplayName())
+                        .value(item.value)
+                        .build()
+        ).collect(Collectors.toList());
+    }
+
+    public Integer getValue() {
+        return value;
+    }
+
+    public String getDisplayName() {
+        return displayName;
+    }
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/enums/SmsTypeEnum.java b/zq-erp/src/main/java/com/matrix/system/enums/SmsTypeEnum.java
new file mode 100644
index 0000000..0b84c69
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/enums/SmsTypeEnum.java
@@ -0,0 +1,53 @@
+package com.matrix.system.enums;
+
+import com.google.common.collect.Lists;
+import com.matrix.core.enums.EnumApiShowAble;
+import com.matrix.core.enums.EnumsShowVo;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 短信类型
+ */
+public enum SmsTypeEnum implements EnumApiShowAble {
+
+
+    VERIFY_CODE(1, "验证码"),
+    SMS_NOTICE(2, "短信通知"),
+    PROMOTE(3, "推广短信");
+
+    private  Integer value;
+
+    private  String displayName;
+
+    SmsTypeEnum(Integer value, String displayName) {
+        this.value = value;
+        this.displayName = displayName;
+    }
+
+
+
+    @Override
+    public String getEnumCode() {
+        return "smsType";
+    }
+
+    @Override
+    public List<EnumsShowVo> getEnumsShowVos() {
+        return Lists.newArrayList(values()).stream().map(item ->
+                EnumsShowVo.builder()
+                        .displayName(item.getDisplayName())
+                        .value(item.value)
+                        .build()
+        ).collect(Collectors.toList());
+    }
+
+    public Integer getValue() {
+        return value;
+    }
+
+    public String getDisplayName() {
+        return displayName;
+    }
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java
index 9113db7..c31ba85 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java
@@ -1,9 +1,8 @@
 package com.matrix.system.hive.action;
 
 import cn.hutool.core.collection.CollUtil;
+import com.alibaba.fastjson.JSON;
 import com.matrix.component.asyncmessage.AsyncMessageManager;
-import com.matrix.component.rabbitmq.RabiitMqTemplate;
-import com.matrix.core.constance.MatrixConstance;
 import com.matrix.core.exception.GlobleException;
 import com.matrix.core.pojo.AjaxResult;
 import com.matrix.core.pojo.PaginationVO;
@@ -18,9 +17,12 @@
 import com.matrix.system.common.constance.AppConstance;
 import com.matrix.system.common.dao.BusParameterSettingsDao;
 import com.matrix.system.common.dao.SysCompanyDao;
+import com.matrix.system.common.service.OperationLogService;
 import com.matrix.system.common.tools.DataAuthUtil;
 import com.matrix.system.common.tools.ResponseHeadUtil;
 import com.matrix.system.constance.Dictionary;
+import com.matrix.system.enums.OperationButtonEnum;
+import com.matrix.system.enums.OperationFunctionEnum;
 import com.matrix.system.hive.bean.*;
 import com.matrix.system.hive.dao.*;
 import com.matrix.system.hive.plugin.util.CollectionUtils;
@@ -28,7 +30,6 @@
 import com.matrix.system.shopXcx.mqTask.AsyncMessageRouting;
 import com.matrix.system.wechart.templateMsg.UniformMsgParam;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Controller;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.ui.ModelMap;
@@ -106,8 +107,10 @@
     @Autowired
     private AsyncMessageManager asyncMessageManager;
 
-    @Value("${evn}")
-    private String evn;
+
+    @Autowired
+    private OperationLogService operationLogService;
+
 
     /**
      * 计算订单金额
@@ -233,7 +236,7 @@
     SysCompanyDao companyDao;
 
     /**
-     * 收款
+     * 打印订单
      */
     @RequestMapping(value = "/printOrder")
     public @ResponseBody
@@ -266,6 +269,7 @@
      */
     @RequestMapping(value = "/updateOrderTime")
     public @ResponseBody
+    @Transactional(rollbackFor = Exception.class)
     AjaxResult updateOrderTime(SysOrder sysOrder) {
 
         sysOrderDao.updateOrderTime(sysOrder.getPayTime(), sysOrder.getId());
@@ -278,6 +282,15 @@
         //更新收款流水时间
         sysOrderFlowDao.updateTimeByOrderId(sysOrder.getId(), sysOrder.getPayTime());
 
+        //保存单据日志
+        sysOrder= sysOrderDao.selectById(sysOrder.getId());
+        operationLogService.saveOperation(sysOrder.getCompanyId(), sysOrder.getShopId(),getMe().getSuId(),
+                OperationFunctionEnum.ORDER,
+                OperationButtonEnum.ORDER_UPDATE_TIME,
+                sysOrder.getId(),
+                sysOrder.getOrderNo(),
+                sysOrder.getVipId(),
+                "更新参数: "+JSON.toJSONString(sysOrder));
 
         return new AjaxResult(AjaxResult.STATUS_SUCCESS, "修改成功");
     }
@@ -505,8 +518,7 @@
     @RequestMapping(value = "/exportExcel")
     public void report(ModelMap model, HttpServletRequest request, HttpServletResponse response,
                        SysOrder sysOrder) throws Exception {
-        SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
-        sysOrder.setShopId(sysUsers.getShopId());
+        sysOrder.setShopId(getMe().getShopId());
         doExportOrder(response, sysOrder);
         return;
 
@@ -519,6 +531,7 @@
     public void erpExportExcel(ModelMap model, HttpServletRequest request, HttpServletResponse response,
                                SysOrder sysOrder) throws Exception {
         doExportOrder(response, sysOrder);
+
         return;
 
     }
@@ -532,6 +545,13 @@
      * @throws IOException
      */
     private void doExportOrder(HttpServletResponse response, SysOrder sysOrder) throws IOException {
+
+        //保存单据日志
+        operationLogService.saveOperation(getMe().getCompanyId(), getMe().getShopId(),getMe().getSuId(),
+                OperationFunctionEnum.ORDER,
+                OperationButtonEnum.EXPORT,
+                String.format("导出参数:%s" , JSON.toJSONString(sysOrder)));
+
         List<ExcelSheetPO> res = new ArrayList<>();
         ExcelSheetPO orderSheet = new ExcelSheetPO();
         String title = "订单记录";
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java
index f8b24a4..968cd07 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java
@@ -3,6 +3,7 @@
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.util.StrUtil;
+import com.alibaba.fastjson.JSON;
 import com.matrix.core.anotations.RemoveRequestToken;
 import com.matrix.core.constance.MatrixConstance;
 import com.matrix.core.exception.GlobleException;
@@ -15,16 +16,18 @@
 import com.matrix.core.tools.excl.ExcelSheetPO;
 import com.matrix.core.tools.excl.ExcelUtil;
 import com.matrix.core.tools.excl.ExcelVersion;
-import com.matrix.system.app.dto.IdSubmitDto;
 import com.matrix.system.common.bean.BusParameterSettings;
 import com.matrix.system.common.bean.SysUsers;
 import com.matrix.system.common.constance.AppConstance;
 import com.matrix.system.common.dao.BusParameterSettingsDao;
 import com.matrix.system.common.dao.SysCompanyDao;
+import com.matrix.system.common.service.OperationLogService;
 import com.matrix.system.common.service.SysUsersService;
 import com.matrix.system.common.tools.DataAuthUtil;
 import com.matrix.system.common.tools.ResponseHeadUtil;
 import com.matrix.system.constance.Dictionary;
+import com.matrix.system.enums.OperationButtonEnum;
+import com.matrix.system.enums.OperationFunctionEnum;
 import com.matrix.system.hive.action.util.QueryUtil;
 import com.matrix.system.hive.bean.*;
 import com.matrix.system.hive.dao.*;
@@ -35,8 +38,8 @@
 import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.ui.ModelMap;
-import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.servlet.ModelAndView;
 
@@ -108,6 +111,10 @@
 
     @Autowired
     SysShopInfoDao shopInfoDao;
+
+    @Autowired
+    private OperationLogService operationLogService;
+
 
     /**
      * 根据id查询服务单信息
@@ -464,6 +471,7 @@
      */
     @RequestMapping(value = "/updateOrderTime")
     public @ResponseBody
+    @Transactional(rollbackFor = Exception.class)
     AjaxResult updateOrderTime(@RequestBody  ServiceOrderTimeDto serviceOrderTimeDto) {
         sysProjServicesDao.updateOrderTime(serviceOrderTimeDto);
         // 更新业绩时间
@@ -471,6 +479,15 @@
         achieveNew.setServiceOrderId(serviceOrderTimeDto.getId());
         achieveNew.setDatatime(serviceOrderTimeDto.getConsumeTime());
         achieveNewService.modifyAchieveTime(achieveNew);
+        SysProjServices projServices = sysProjServicesDao.selectById(serviceOrderTimeDto.getId());
+        //保存单据日志
+        operationLogService.saveOperation(projServices.getCompanyId(), projServices.getShopId(),getMe().getSuId(),
+                OperationFunctionEnum.SERVICE_ORDER,
+                OperationButtonEnum.ORDER_UPDATE_TIME,
+                projServices.getId(),
+                projServices.getServiceNo(),
+                projServices.getVipId(),
+                "更新参数: "+JSON.toJSONString(serviceOrderTimeDto));
         return new AjaxResult(AjaxResult.STATUS_SUCCESS, "修改成功");
     }
 
@@ -515,20 +532,7 @@
         return mv;
     }
 
-    /**
-     * 根据id对服务单进行派单
-     */
-    @RequestMapping(value = "/paidan")
-    public @ResponseBody
-    AjaxResult paidan(Long id) {
-        SysProjServices services = sysProjServicesService.findById(id);
-        int i = sysProjServicesService.modifyPDProjServices(services);
-        if (i > 0) {
-            return new AjaxResult(AjaxResult.STATUS_SUCCESS, "派单成功");
-        } else {
-            return new AjaxResult(AjaxResult.STATUS_FAIL, "派单失败");
-        }
-    }
+
 
     @Autowired
     BusParameterSettingsDao busParameterSettingsDao;
@@ -660,12 +664,6 @@
     }
 
 
-    @RequestMapping(value = "/addServiceProj")
-    @ResponseBody
-    public AjaxResult addServiceProj(SysProjServices sysProjServices) {
-
-        return AjaxResult.buildSuccessInstance("保存成功");
-    }
 
     /**
      * 删除服务单项目/套餐
@@ -725,6 +723,14 @@
 
 
     private void doExportServiceOrder(HttpServletResponse response, SysProjServices projServices) throws IOException {
+
+        //保存单据日志
+        operationLogService.saveOperation(getMe().getCompanyId(), getMe().getShopId(),getMe().getSuId(),
+                OperationFunctionEnum.SERVICE_ORDER,
+                OperationButtonEnum.EXPORT,
+                String.format("导出参数:%s" , JSON.toJSONString(projServices)));
+
+
         List<ExcelSheetPO> res = new ArrayList<>();
         ExcelSheetPO orderSheet = new ExcelSheetPO();
         String title = "服务订单明细";
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/VipInfoController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/VipInfoController.java
index 64ae132..d71a0a0 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/action/VipInfoController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/action/VipInfoController.java
@@ -640,4 +640,23 @@
     public String toImportForm() {
         return "admin/hive/vip/vipImport-form";
     }
+
+    @RequestMapping(value = "/validFlagChange")
+    @ResponseBody
+    public AjaxResult validFlagChange(Long id) {
+        SysVipInfo sysVipInfo = vipInfoService.findById(id);
+
+        if (sysVipInfo == null) {
+            return AjaxResult.buildFailInstance("用户不存在");
+        }
+
+        if (SysVipInfo.VALID_FLAG_Y == sysVipInfo.getValidFlag()) {
+            sysVipInfo.setValidFlag(SysVipInfo.VALID_FLAG_N);
+        } else {
+            sysVipInfo.setValidFlag(SysVipInfo.VALID_FLAG_Y);
+        }
+
+        vipInfoService.modify(sysVipInfo);
+        return AjaxResult.buildSuccessInstance("设置成功");
+    }
 }
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipInfo.java b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipInfo.java
index 09224d4..2fafe6a 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipInfo.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipInfo.java
@@ -40,6 +40,16 @@
 	public static final int UNDEAL_VIP = 2;
 
 	/**
+	 * 生效
+	 */
+	public static final int VALID_FLAG_Y = 1;
+
+	/**
+	 * 失效
+	 */
+	public static final int VALID_FLAG_N = 2;
+
+	/**
 	 * 会员助记码
 	 */
 	private String zjm;
@@ -440,5 +450,10 @@
 
 	private BigDecimal arrears;
 
+	/**
+	 * 生效标识 1-生效 2-失效
+	 */
+	private Integer validFlag;
+
 
 }
\ No newline at end of file
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/SysOrderService.java b/zq-erp/src/main/java/com/matrix/system/hive/service/SysOrderService.java
index 2be2912..5f21562 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/SysOrderService.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/SysOrderService.java
@@ -39,7 +39,7 @@
 	 */
 	public int remove(List<Long> list);
 
-	public int cancelOrder(Long id);
+	public void cancelOrder(Long id);
 	/**
 	 * 根据id删除SysOrder
 	 *
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java
index e42eaaf..8660274 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java
@@ -20,7 +20,10 @@
 import com.matrix.system.common.constance.AppConstance;
 import com.matrix.system.common.dao.BusParameterSettingsDao;
 import com.matrix.system.common.dao.SysUsersDao;
+import com.matrix.system.common.service.OperationLogService;
 import com.matrix.system.constance.Dictionary;
+import com.matrix.system.enums.OperationButtonEnum;
+import com.matrix.system.enums.OperationFunctionEnum;
 import com.matrix.system.hive.bean.*;
 import com.matrix.system.hive.dao.*;
 import com.matrix.system.hive.plugin.util.CollectionUtils;
@@ -126,6 +129,9 @@
     @Autowired
     private AsyncMessageManager asyncMessageManager;
 
+    @Autowired
+    private OperationLogService operationLogService;
+
 
     @Override
     public int add(SysOrder sysOrder) {
@@ -184,6 +190,7 @@
 
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public SysOrder checkAndSaveOrder(SysOrder sysOrder) {
 
         // 计算订单折扣金额,收款情况下 计算订单总额
@@ -233,12 +240,27 @@
             //新增订单
             sysOrder.setOrderNo(codeService.getOrderCode());
             sysOrderDao.insert(sysOrder);
+            //保存单据日志
+            operationLogService.saveOperation(sysOrder.getCompanyId(), sysOrder.getShopId(), user.getSuId(),
+                    OperationFunctionEnum.ORDER,
+                    OperationButtonEnum.CREATE,
+                    sysOrder.getId(),
+                    sysOrder.getOrderNo(),
+                    sysOrder.getVipId());
 
         } else {
             //更新订单
             sysOrderDao.update(sysOrder);
             //删除原有订单明细
             orderItemDao.deleteByOrderId(sysOrder.getId());
+            //保存单据日志
+            operationLogService.saveOperation(sysOrder.getCompanyId(), sysOrder.getShopId(), user.getSuId(),
+                    OperationFunctionEnum.ORDER,
+                    OperationButtonEnum.UPDATE,
+                    sysOrder.getId(),
+                    sysOrder.getOrderNo(),
+                    sysOrder.getVipId(),
+                    "修改订单内容");
         }
 
         sysOrder.getItems().forEach(sysOrderItem -> {
@@ -266,9 +288,10 @@
      */
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public int cancelOrder(Long id) {
+    public void cancelOrder(Long id) {
 
         SysOrder order = sysOrderDao.selectById(id);
+        SysUsers sysUsers = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
         if (order.getStatu().equals(Dictionary.ORDER_STATU_DFK)) {
 
             order.setStatu(Dictionary.ORDER_STATU_YQX);
@@ -277,10 +300,17 @@
             //发送微信公众号提醒
             UniformMsgParam uniformMsgParam = new UniformMsgParam(order.getCompanyId(), UniformMsgParam.GZH_DDQX);
             uniformMsgParam.put("orderId", order.getId());
-            asyncMessageManager.sendMsg(AsyncMessageRouting.SEND_UNIFORM_TEMPLATE_MSG ,uniformMsgParam);
+            asyncMessageManager.sendMsg(AsyncMessageRouting.SEND_UNIFORM_TEMPLATE_MSG, uniformMsgParam);
 
-            return sysOrderDao.update(order);
-
+            sysOrderDao.update(order);
+            //保存单据日志
+            operationLogService.saveOperation(order.getCompanyId(), order.getShopId(),sysUsers.getSuId(),
+                    OperationFunctionEnum.ORDER,
+                    OperationButtonEnum.CANCEL,
+                    order.getId(),
+                    order.getOrderNo(),
+                    order.getVipId(),
+                    "未付款取消订单");
         } else {
 
             //一个订单只能被取消一次
@@ -377,8 +407,18 @@
 
             // 取消订单
             order.setStatu(Dictionary.ORDER_STATU_YQX);
-            return sysOrderDao.update(order);
+            sysOrderDao.update(order);
+            //保存单据日志
+            operationLogService.saveOperation(order.getCompanyId(), order.getShopId(),sysUsers.getSuId(),
+                    OperationFunctionEnum.ORDER,
+                    OperationButtonEnum.CANCEL,
+                    order.getId(),
+                    order.getOrderNo(),
+                    order.getVipId(),
+                    "已付款取消订单");
         }
+
+
 
     }
 
@@ -512,10 +552,12 @@
         //设置会员积分
         addVipScore(pageOrder);
 
+
     }
 
     /**
      * 付款后更新订单信息
+     *
      * @param pageOrder
      */
     private void updateOrderInfo(SysOrder pageOrder) {
@@ -542,12 +584,20 @@
 
         double sum = flows.stream().mapToDouble(item -> item.getAmount().doubleValue()).sum();
 
-        if(sum>0 && cardPayAmount.doubleValue()==0 && cashPayAmount.doubleValue()==0 ){
+        if (sum > 0 && cardPayAmount.doubleValue() == 0 && cashPayAmount.doubleValue() == 0) {
             throw new GlobleException("订单更新失败,支付金额计算错误,请联系管理员");
         }
 
 
         sysOrderDao.update(pageOrder);
+
+        //保存单据日志
+        operationLogService.saveOperation(pageOrder.getCompanyId(), pageOrder.getShopId(), user.getSuId(),
+                OperationFunctionEnum.ORDER,
+                OperationButtonEnum.ORDER_SK,
+                pageOrder.getId(),
+                pageOrder.getOrderNo(),
+                pageOrder.getVipId());
     }
 
     private void checkOrder(SysOrder pageOrder) {
@@ -579,7 +629,7 @@
             entries.forEach(entrie -> {
                 double sum = entrie.getValue().stream().mapToDouble(AchieveNew::getGoodsCash).sum();
                 //todo 目前使用js计算金额可能存在精度的误差展示用0.1屏蔽
-                if (Math.abs(sum- (item.getZkPrice()*item.getCount()) )>0.1) {
+                if (Math.abs(sum - (item.getZkPrice() * item.getCount())) > 0.1) {
                     ShoppingGoods shopGoods = shoppingGoodsDao.selectById(item.getGoodsId());
                     throw GlobleException.instance(shopGoods.getName() + "," + entrie.getKey() + "业绩金额与收款金额不一致");
                 }
@@ -995,7 +1045,7 @@
      * @date 2016年9月19日
      */
     public void addMoneyCardUse(SysOrder sourceOrder) {
-
+        SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
         List<SysOrderItem> orderItemList = sourceOrder.getItems();
         for (SysOrderItem sysOrderItem : orderItemList) {
             // 如果购买的是充值卡
@@ -1034,6 +1084,7 @@
                     moneyCardUse.setFailTime(invalidTime);
 
                     moneyCardUseDao.insert(moneyCardUse);
+
                 }
             }
         }
@@ -1414,9 +1465,9 @@
             boolean zsConsumeAchieve = projServicesService.skipServiceOrderStep(Dictionary.ZS_CONSUME_ACHIEVE);
             if (zsConsumeAchieve) {
                 //赠送情况下,如果收款金额大于0,就是赠送金额划扣的情况,金额即为划扣的折扣金额
-                if(sysOrderItem.getZkPrice()>0){
+                if (sysOrderItem.getZkPrice() > 0) {
                     puse.setPrice(sysOrderItem.getZkPrice());
-                }else{
+                } else {
                     puse.setPrice(sysOrderItem.getShoppingGoods().getSealPice());
                 }
             } else {
@@ -1640,6 +1691,14 @@
         // 设置业绩
         achieveNewService.addAchaeveByOrder(sysOrder);
 
+        //保存单据日志
+        operationLogService.saveOperation(sysOrder.getCompanyId(), sysOrder.getShopId(), user.getSuId(),
+                OperationFunctionEnum.ORDER,
+                OperationButtonEnum.ORDER_TK,
+                sysOrder.getId(),
+                sysOrder.getOrderNo(),
+                sysOrder.getVipId());
+
     }
 
     private void addRefundOrderFlow(SysOrder sourceOrder) {
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java
index 28a71f0..e370684 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java
@@ -19,7 +19,10 @@
 import com.matrix.system.common.dao.BusParameterSettingsDao;
 import com.matrix.system.common.dao.SysUsersDao;
 import com.matrix.system.common.service.BusParameterSettingService;
+import com.matrix.system.common.service.OperationLogService;
 import com.matrix.system.constance.Dictionary;
+import com.matrix.system.enums.OperationButtonEnum;
+import com.matrix.system.enums.OperationFunctionEnum;
 import com.matrix.system.hive.bean.*;
 import com.matrix.system.hive.dao.*;
 import com.matrix.system.hive.plugin.util.MoneyUtil;
@@ -61,7 +64,8 @@
     @Autowired
     private SysProjUseDao sysProjUseDao;
 
-
+    @Autowired
+    private OperationLogService operationLogService;
     @Autowired
     private SysOutStoreDao sysOutStoreDao;
 
@@ -141,10 +145,10 @@
     @Transactional(rollbackFor = Exception.class)
     @Override
     public SysProjServices addSysProjServices(SysProjServices sysProjServices) throws GlobleException {
-
+        SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
         //创建服务单
         if (WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY) != null) {
-            SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
+
             sysProjServices.setCreateStaffId(user.getSuId());
             sysProjServices.setShopId(user.getShopId());
             sysProjServices.setCompanyId(user.getCompanyId());
@@ -249,6 +253,15 @@
         sysProjServices.setTotalTime(totalTime);
         sysProjServices.setMoney(new BigDecimal(hkPrice).setScale(2, BigDecimal.ROUND_HALF_DOWN).doubleValue());
         sysProjServicesDao.update(sysProjServices);
+
+        //保存单据日志
+        operationLogService.saveOperation(sysProjServices.getCompanyId(), sysProjServices.getShopId(),user.getSuId(),
+                OperationFunctionEnum.SERVICE_ORDER,
+                OperationButtonEnum.CREATE,
+                sysProjServices.getId(),
+                sysProjServices.getServiceNo(),
+                sysProjServices.getVipId());
+
         return sysProjServices;
     }
 
@@ -464,6 +477,14 @@
             autoBatching(projServices);
         }
 
+        SysUsers users = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
+        //保存单据日志
+        operationLogService.saveOperation(checkProjServices.getCompanyId(), checkProjServices.getShopId(),users.getSuId(),
+                OperationFunctionEnum.SERVICE_ORDER,
+                OperationButtonEnum.SERVICE_ORDER_PB,
+                checkProjServices.getId(),
+                checkProjServices.getServiceNo(),
+                checkProjServices.getVipId());
 
         return i;
     }
@@ -567,6 +588,16 @@
         }
         //删除积分
         scoreVipDetailService.removeByBusinessId(checkProjServices.getVipId(), checkProjServices.getId());
+
+        SysUsers users = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
+        //保存单据日志
+        operationLogService.saveOperation(checkProjServices.getCompanyId(), checkProjServices.getShopId(),users.getSuId(),
+                OperationFunctionEnum.SERVICE_ORDER,
+                OperationButtonEnum.CANCEL,
+                checkProjServices.getId(),
+                checkProjServices.getServiceNo(),
+                checkProjServices.getVipId());
+
 
         //更新服务单状态
         return sysProjServicesDao.update(checkProjServices);
@@ -722,6 +753,14 @@
             asyncMessageManager.sendMsg(AsyncMessageRouting.SEND_UNIFORM_TEMPLATE_MSG, uniformMsgParam);
             //发送划扣短信提醒
             taiYanAliyunSmsService.sendHkNotice(projServices);
+
+            //保存单据日志
+            operationLogService.saveOperation(projServices.getCompanyId(), projServices.getShopId(),users.getSuId(),
+                    OperationFunctionEnum.SERVICE_ORDER,
+                    OperationButtonEnum.SERVICE_ORDER_HK,
+                    projServices.getId(),
+                    projServices.getServiceNo(),
+                    projServices.getVipId());
 
             return result;
         }
@@ -964,6 +1003,15 @@
 //        // 判断是服务超时还是服务提前结束,如果minspace大于0则是超时服务,小于0则是提前结束服务
 //        projServices.setIsOverTime(minspace + "");
 //        projServices.setState(Dictionary.SERVICE_STATU_FWWC);
+        //保存单据日志
+        operationLogService.saveOperation(projServices.getCompanyId(), projServices.getShopId(),sysUsers.getSuId(),
+                OperationFunctionEnum.SERVICE_ORDER,
+                OperationButtonEnum.SERVICE_ORDER_PL,
+                projServices.getId(),
+                projServices.getServiceNo(),
+                projServices.getVipId());
+
+
         return sysProjServicesDao.update(projServices);
     }
 
@@ -1020,6 +1068,14 @@
         // 设置美疗师实际开始时间
         checkBeauticianState.setState(Dictionary.BEATUI_STATE_SYZ);
         projServices.getVipId();
+        //保存单据日志
+        operationLogService.saveOperation(projServices.getCompanyId(), projServices.getShopId(),users.getSuId(),
+                OperationFunctionEnum.SERVICE_ORDER,
+                OperationButtonEnum.SERVICE_ORDER_BEGIN,
+                projServices.getId(),
+                projServices.getServiceNo(),
+                projServices.getVipId());
+
         return beauticianStateDao.update(checkBeauticianState);
     }
 
@@ -1062,7 +1118,13 @@
             checkprojServices.setState(Dictionary.SERVICE_STATU_FWWC);
             sysProjServicesDao.update(checkprojServices);
         }
-
+        //保存单据日志
+        operationLogService.saveOperation(projServices.getCompanyId(), projServices.getShopId(),users.getSuId(),
+                OperationFunctionEnum.SERVICE_ORDER,
+                OperationButtonEnum.SERVICE_ORDER_END,
+                projServices.getId(),
+                projServices.getServiceNo(),
+                projServices.getVipId());
         return rerunlt;
     }
 
@@ -1114,11 +1176,22 @@
 
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public int confirmServiceOrder(Long id) {
+        SysUsers users = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
         SysProjServices services = new SysProjServices();
         services.setId(id);
         services.setState(Dictionary.BEATUI_STATE_DYY);
         int i = modify(services);
+        SysProjServices projServices =findById(id);
+         //保存单据日志
+        operationLogService.saveOperation(projServices.getCompanyId(), projServices.getShopId(),users.getSuId(),
+                OperationFunctionEnum.SERVICE_ORDER,
+                OperationButtonEnum.SERVICE_ORDER_QRYY,
+                projServices.getId(),
+                projServices.getServiceNo(),
+                projServices.getVipId());
+
         if (i > 0) {
             //发送微信公众号提醒
             services = findById(services.getId());
diff --git a/zq-erp/src/main/java/com/matrix/system/hiveErp/action/OperationLogController.java b/zq-erp/src/main/java/com/matrix/system/hiveErp/action/OperationLogController.java
new file mode 100644
index 0000000..c9b9303
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/hiveErp/action/OperationLogController.java
@@ -0,0 +1,106 @@
+package com.matrix.system.hiveErp.action;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.core.tools.DateUtil;
+import com.matrix.core.tools.excl.ExcelSheetPO;
+import com.matrix.core.tools.excl.ExcelUtil;
+import com.matrix.core.tools.excl.ExcelVersion;
+import com.matrix.system.common.bean.reqVO.OperationLogReqVo;
+import com.matrix.system.common.bean.respVO.OperationLogRespVo;
+import com.matrix.system.common.service.OperationLogService;
+import com.matrix.system.common.tools.ResponseHeadUtil;
+import com.matrix.system.hive.action.util.QueryUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.net.URLEncoder;
+import java.util.ArrayList;
+import java.util.List;
+
+@RestController
+@RequestMapping(value = "admin/operation")
+public class OperationLogController {
+
+
+    @Autowired
+    private OperationLogService operationLogService;
+
+    /**
+     * 查询单据操作记录
+     *
+     * @param operationLogReqVo
+     * @return
+     */
+    @PostMapping(value = "/getOperation")
+    public
+    AjaxResult getOperation(@RequestBody OperationLogReqVo operationLogReqVo) {
+        QueryUtil.setQueryLimitCom(operationLogReqVo);
+        Page<OperationLogReqVo> page = new Page<>(operationLogReqVo.getPageNum(),operationLogReqVo.getPageSize());
+
+        Page<OperationLogRespVo> pageResult = operationLogService.selectPage(page,operationLogReqVo);
+
+        return AjaxResult.buildSuccessInstance(pageResult.getRecords(),pageResult.getTotal());
+    }
+
+    /**
+     * 导出操作记录
+     */
+    @RequestMapping(value = "/exportExcel")
+    public void exportExcel(ModelMap model, HttpServletRequest request, HttpServletResponse response,OperationLogReqVo operationLogReqVo) throws Exception {
+
+        doExportExcel(response, operationLogReqVo);
+    }
+
+
+    private void doExportExcel(HttpServletResponse response, OperationLogReqVo operationLogReqVo) throws IOException {
+
+
+
+        List<ExcelSheetPO> res = new ArrayList<>();
+        ExcelSheetPO orderSheet = new ExcelSheetPO();
+        String title = "系统操作记录";
+        orderSheet.setSheetName(title);
+        orderSheet.setTitle(title);
+        String[] header = {"门店","操作用户", "操作时间", "操作功能","操作按钮", "单据号","操作会员","备注","IP地址"};
+        orderSheet.setHeaders(header);
+
+        QueryUtil.setQueryLimitCom(operationLogReqVo);
+        Page<OperationLogReqVo> page = new Page<>(operationLogReqVo.getPageNum(),operationLogReqVo.getPageSize());
+
+        Page<OperationLogRespVo> pageResult = operationLogService.selectPage(page,operationLogReqVo);
+
+        List<List<Object>> list = new ArrayList<>();
+        if (pageResult.getRecords().size() > 0) {
+            for (OperationLogRespVo item : pageResult.getRecords()) {
+                List<Object> temp = new ArrayList<>();
+                temp.add(item.getShopName());
+                temp.add(item.getOpeUser());
+                temp.add(DateUtil.dateToString(item.getCreateTime(), DateUtil.DATE_FORMAT_MM));
+                temp.add(item.getOpeFunctionLabel());
+                temp.add(item.getOpeButLabel());
+                temp.add(item.getBillNo());
+                temp.add(item.getVipName());
+                temp.add(item.getNote());
+                temp.add(item.getIp());
+                list.add(temp);
+            }
+        }
+        orderSheet.setDataList(list);
+        res.add(orderSheet);
+        response = ResponseHeadUtil.setExcelHead(response);
+        response.setHeader("Content-Disposition",
+                "attachment;filename=" + URLEncoder.encode(title + DateUtil.getTimeMark() + ".xlsx".trim(), "UTF-8"));
+        OutputStream os = response.getOutputStream();
+        ExcelUtil.createWorkbookAtOutStream(ExcelVersion.V2007, res, os, true);
+    }
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxErpOrderAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxErpOrderAction.java
index e127ce4..78a6730 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxErpOrderAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxErpOrderAction.java
@@ -75,6 +75,12 @@
         SysVipInfo vipInfo = userCacheManager.getLoginUser();
         
         erpOrderListDto.setVipId(vipInfo.getId());
+
+        SysVipInfo sysVipInfo = vipInfoDao.selectById(vipInfo.getId());
+        if (sysVipInfo.getValidFlag() == SysVipInfo.VALID_FLAG_N) {
+            return AjaxResult.buildSuccessInstance(new ArrayList<>(), "查询成功");
+        }
+
         List<ErpOrderDetailVo> rows = sysOrderDao.selectErpOrderList(erpOrderListDto);
         rows.forEach(item -> {
             item.setItems(orderItemDao.selectErpOrderItemByOrderId(item.getOrderId()));
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxUserAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxUserAction.java
index e07d511..8916a52 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxUserAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxUserAction.java
@@ -1,6 +1,7 @@
 package com.matrix.system.shopXcx.api.action;
 
 import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.ObjectUtil;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.matrix.system.common.constance.AppConstance;
 import com.matrix.system.common.init.UserCacheManager;
@@ -159,8 +160,17 @@
     AjaxResult findUserInfo() {
         SysVipInfo loginUser = userCacheManager.getLoginUser();
         SysVipInfo sysVipInfo = sysVipInfoService.findById(loginUser.getId());
-        sysVipInfo.setPointAll(scoreVipDetailDao.selectUserTotalScore(loginUser.getId()));
-        sysVipInfo.setBalance(moneyCardUseDao.selectVipCardTotalMoney(loginUser.getId()));
+
+        if (sysVipInfo != null) {
+            if (SysVipInfo.VALID_FLAG_Y == sysVipInfo.getValidFlag()) {
+                sysVipInfo.setBalance(moneyCardUseDao.selectVipCardTotalMoney(loginUser.getId()));
+                sysVipInfo.setPointAll(scoreVipDetailDao.selectUserTotalScore(loginUser.getId()));
+            } else {
+                sysVipInfo.setBalance(0D);
+                sysVipInfo.setPointAll(0);
+            }
+        }
+
         AjaxResult res = new AjaxResult();
         res.putInMap("couponCount", shopCouponRecordDao.countUnuseCouponRecord(loginUser.getId()));
         res.putInMap("prizeCount", activitySignReceiveRecordDao.getSignAwardReceiveCount(loginUser.getId(), loginUser.getCompanyId()));
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/YuyueAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/YuyueAction.java
index 4e958b3..19fc17f 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/YuyueAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/YuyueAction.java
@@ -225,6 +225,13 @@
         if (vipInfo == null) {
             throw new GlobleException("会员不存在");
         }
+
+        if (SysVipInfo.VALID_FLAG_N == vipInfo.getValidFlag()) {
+            AjaxResult ajaxResult = AjaxResult.buildSuccessInstance(new ArrayList<>(), "获取成功");
+            ajaxResult.putInMap("proj", new ServiceProductListVo());
+            return ajaxResult;
+        }
+
         ServiceProductListVo productListVo = new ServiceProductListVo();
         productListVo.setName(vipInfo.getVipName());
         productListVo.setVipId(vipInfo.getId());
@@ -366,6 +373,12 @@
     public AjaxResult findServiceOrderList(@RequestBody @Validated ErpServiceOrderListDto orderListDto) {
         SysVipInfo sysVipInfo = userCacheManager.getLoginUser();
         orderListDto.setVipId(sysVipInfo.getId());
+
+        SysVipInfo vipInfo = sysVipInfoDao.selectById(sysVipInfo.getId());
+        if (SysVipInfo.VALID_FLAG_N == vipInfo.getValidFlag()) {
+            return AjaxResult.buildSuccessInstance(new ArrayList<>(), "查询成功");
+        }
+
         List<ErpServiceOrderListVo> apiServiceOrderListInPage = projServicesDao.findWxServiceOrderList(orderListDto);
         return AjaxResult.buildSuccessInstance(apiServiceOrderListInPage,"查询成功");
     }
diff --git a/zq-erp/src/main/resources/config/application-alpha.properties b/zq-erp/src/main/resources/config/application-alpha.properties
index 9ebe364..fa5c768 100644
--- a/zq-erp/src/main/resources/config/application-alpha.properties
+++ b/zq-erp/src/main/resources/config/application-alpha.properties
@@ -3,9 +3,9 @@
 
 
 #线上测试环境
-spring.datasource.username=ct_test
-spring.datasource.password=123456
-spring.datasource.url=jdbc:mysql://120.27.238.55:3306/hive_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
+spring.datasource.username=hive
+spring.datasource.password=hive123!@#
+spring.datasource.url=jdbc:mysql://124.70.222.34/hive_prd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
 
 
 
@@ -37,10 +37,11 @@
 
 
 #rabbitMQ配置
-rabbitmq.host=120.27.238.55
+rabbitmq.host=47.111.134.136
 rabbitmq.port=5672
-rabbitmq.username=ct_rabbit
-rabbitmq.password=123456
+rabbitmq.username=hivequeue
+rabbitmq.password=hivequeueadmin
+useRabbit=true
 
 server.session.timeout=120
 
@@ -61,7 +62,7 @@
 #是否启用debug模式
 debug=false
 # 日志文件保存地址
-log_path=/home/javaweb/hive/log
+log_path=/mnt/hive/log
 
 # 系统语言环境 zh中文,us英文
 system_language=zh
@@ -72,9 +73,9 @@
 default_password=123
 
 #nginx静态资源访问地址
-static_resource_url=http://120.27.238.55:8000/hive/static/uploadeFile/
+static_resource_url=https://hive.file.csxuncong.com/uploadeFile/
 #文件保存地址
-file_storage_path=/home/javaweb/webresource/hive/static/uploadeFile/
+file_storage_path=/mnt/hive/static/uploadeFile/
 #文件上传大小字节为单位  10MB
 maxUploadSize=10485760
 
diff --git a/zq-erp/src/main/resources/config/application-meidusw.properties b/zq-erp/src/main/resources/config/application-meidusw.properties
new file mode 100644
index 0000000..ebf48df
--- /dev/null
+++ b/zq-erp/src/main/resources/config/application-meidusw.properties
@@ -0,0 +1,68 @@
+#数据库链接
+spring.datasource.username=meidu_data
+spring.datasource.password=meidu_4321#&@
+spring.datasource.url=jdbc:mysql://47.111.134.136/db_meidu_sw?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
+
+
+#是否启用debug模式
+debug=false
+# 日志文件保存地址
+log_path=/mnt/md-hive/log
+
+#nginx静态资源访问地址
+static_resource_url=https://filehive2.jyymatrix.cc/uploadeFile/md/
+#文件保存地址
+file_storage_path=/mnt/hive/static/uploadeFile/md/
+
+#微信支付调试开关
+wx_pay_debug_onoff = false
+
+#快递鸟用户id
+logistics.eBusinessID=1530881
+#快递鸟密钥
+logistics.appKey=f1cf9777-26fb-4e3f-a14d-896075e6384e
+#快递鸟接口地址
+logistics.url=http://api.kdniao.com/Ebusiness/EbusinessOrderHandle.aspx
+#快递鸟接口指令
+logistics.requestType=1002
+
+
+#发送短信配置
+crm.request_url = http://192.168.1.248
+sms.request_url = http://smssh1.253.com
+sms.login_account = M7315130
+sms.login_password = J7FAoehPkv63e3
+sms.login_accountNe = N4617160
+sms.login_passwordNe = rb1cxLitRB83e0
+
+
+qrcodeBackgroundImgPath=/mnt/xcshop/webresource/static/xcxresource/bj1.png
+qrcodeFrontImgPath=/mnt/xcshop/webresource/static/xcxresource/qj2.png
+
+
+#是否启用异常上报
+is_open_exception_report=true
+showExcptionUrl=http://hive.mydoline.com/showException
+
+
+#百度编辑器,覆盖默认配置
+ueditor.imageUrlPrefix=http://filehive2.jyymatrix.cc/uploadeFile/md
+ueditor.imagePathFormat=/image/{yyyy}{mm}{dd}/{time}{rand:6}
+
+ueditor.scrawlPathFormat=/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}
+ueditor.scrawlUrlPrefix=http://filehive2.jyymatrix.cc/uploadeFile/md
+
+ueditor.snapscreenPathFormat=/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}
+ueditor.snapscreenUrlPrefix=http://filehive2.jyymatrix.cc/uploadeFile/md
+
+ueditor.catcherPathFormat=/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}
+ueditor.catcherUrlPrefix=http://filehive2.jyymatrix.cc/uploadeFile/md
+
+ueditor.videoPathFormat=/ueditor/jsp/upload/video/{yyyy}{mm}{dd}/{time}{rand:6}
+ueditor.videoUrlPrefix=http://127.0.0.1:1088/uploadeFile/
+
+ueditor.filePathFormat=/ueditor/jsp/upload/file/{yyyy}{mm}{dd}/{time}{rand:6}
+ueditor.fileUrlPrefix=http://127.0.0.1:1088/uploadeFile/
+
+ueditor.imageManagerListPath=http://127.0.0.1:1088/uploadeFile/
+ueditor.fileManagerListPath=http://127.0.0.1:1088/uploadeFile/
diff --git a/zq-erp/src/main/resources/config/application.properties b/zq-erp/src/main/resources/config/application.properties
index 7ab9f40..ddb6608 100644
--- a/zq-erp/src/main/resources/config/application.properties
+++ b/zq-erp/src/main/resources/config/application.properties
@@ -1,5 +1,5 @@
 
-spring.profiles.active=meidu
+spring.profiles.active=test
 evn=dev
 server.port=8080
 
diff --git a/zq-erp/src/main/resources/config/prd/system.properties b/zq-erp/src/main/resources/config/prd/system.properties
index 6e6d637..bc8d752 100644
--- a/zq-erp/src/main/resources/config/prd/system.properties
+++ b/zq-erp/src/main/resources/config/prd/system.properties
@@ -95,7 +95,7 @@
 platform_verity_url = http://stg1-xcerp-ca.xc.jyymatrix.cc/platform/getUserInfo
 
 #微信支付回调地址
-pay_notify_url = https://xcxhive2.jyymatrix.cc/wxCommon/wxpayCallback
+pay_notify_url=https://xcxhive2.jyymatrix.cc/wxCommon/wxpayCallback
 
 
 qrcodeBackgroundImgPath=/mnt/xcshop/webresource/static/xcxresource/bj1.png
diff --git a/zq-erp/src/main/resources/mybatis/mapper/common/OperstionLogDao.xml b/zq-erp/src/main/resources/mybatis/mapper/common/OperstionLogDao.xml
new file mode 100644
index 0000000..3fe7b82
--- /dev/null
+++ b/zq-erp/src/main/resources/mybatis/mapper/common/OperstionLogDao.xml
@@ -0,0 +1,68 @@
+<?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.matrix.system.common.dao.OperationLogDao">
+
+
+    <select id="selectPageList" resultType="com.matrix.system.common.bean.respVO.OperationLogRespVo">
+
+        SELECT
+        a.id,
+        a.ope_function,
+        a.ope_but,
+        d.shop_short_name as shop_name,
+        b.su_name AS opeUser,
+        c.vip_name,
+        a.bill_no,
+        a.ip,
+        a.note,
+        a.create_time
+        FROM
+        sys_operation_log a
+        LEFT JOIN sys_users b ON a.ope_user_id = b.su_id
+        LEFT JOIN sys_vip_info c ON a.vip_id = c.id
+        LEFT JOIN sys_shop_info d ON a.shop_id = d.id
+        <where>
+            a.company_id=#{param.companyId}
+            <if test="param.shopId != null and param.shopId != 0  ">
+                and  a.shop_id=#{param.shopId}
+            </if>
+            <if test="param.opeUserId != null">
+                and  a.ope_user_id=#{param.opeUserId}
+            </if>
+
+            <if test="param.vipQueryKey != null and param.vipQueryKey != ''  ">
+                and c.VIP_NAME like concat('%',#{param.vipQueryKey},'%')
+                or (c.VIP_NO like concat('%',#{param.vipQueryKey},'%')
+                or c.PHONE like concat('%',#{param.vipQueryKey},'%')
+                )
+            </if>
+            <if test="param.opeFunction != null">
+                and a.ope_function=#{param.opeFunction}
+            </if>
+
+            <if test="param.opeBut != null">
+                and a.ope_but=#{param.opeBut}
+            </if>
+            <if test="param.billNo != null  and param.billNo != ''">
+                and a.bill_no like concat('%',#{param.billNo},'%')
+            </if>
+            <if test="param.ip != null  and param.ip != ''">
+                and a.ip like concat('%',#{param.ip},'%')
+            </if>
+            <if test="param.note != null and param.note != ''">
+                and a.note like concat('%',#{param.note},'%')
+            </if>
+            <if test="param.startTime != null  ">
+                and a.create_time  <![CDATA[>=]]> #{param.startTime}
+            </if>
+            <if test="param.endTime != null">
+                and a.create_time <![CDATA[<=]]> #{param.endTime}
+            </if>
+            order by ${param.sort} ${param.order}
+        </where>
+
+
+    </select>
+</mapper>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml
index ae9ebb7..b23d511 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml
@@ -61,6 +61,7 @@
         <result property="country" column="country" />
         <result property="sessionKey" column="session_key" />
         <result property="userIsAuthorize" column="user_is_authorize" />
+        <result property="validFlag" column="valid_flag" />
 
         <!-- 扩展属性 -->
         <result property="staffName" column="STAFF_NAME"/>
@@ -124,6 +125,7 @@
         <result property="country" column="country" />
         <result property="sessionKey" column="session_key" />
         <result property="userIsAuthorize" column="user_is_authorize" />
+        <result property="validFlag" column="valid_flag" />
 
         <!-- 扩展属性 -->
         <result property="staffName" column="STAFF_NAME"/>
@@ -537,6 +539,9 @@
             <if test="avatarUrl != null and avatarUrl != '' ">
                 avatar_url  = #{avatarUrl},
             </if>
+            <if test="validFlag != null and validFlag != '' ">
+                valid_flag  = #{validFlag},
+            </if>
 
 
         </set>
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/operation-list.html b/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/operation-list.html
new file mode 100644
index 0000000..e0fd0a3
--- /dev/null
+++ b/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/operation-list.html
@@ -0,0 +1,333 @@
+<!DOCTYPE HTML>
+<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
+<head>
+    <meta charset="utf-8">
+    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
+    <meta http-equiv="Cache-Control" content="no-siteapp"/>
+    <LINK rel="Bookmark" href="../images/favicon.ico">
+    <!-- 本框架基本脚本和样式 -->
+    <script type="text/javascript" th:src="@{/js/systools/MBaseVue.js}"></script>
+    <link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}">
+    <link th:href="@{/css/styleOne/style.min.css}" rel="stylesheet" type="text/css"/>
+    <title></title>
+    <style>
+        .panel-body{
+            overflow: hidden;
+        }
+        .buttonPanel{
+            background: #ffffff;
+            padding: 10px 10px ;
+            margin: 0px 0px 10px 0px;
+        }
+        .rowPanel{
+            background: #ffffff;
+            padding: 0px 10px ;
+            padding-top: 10px;
+            margin: 0px 0px 10px 0px;
+        }
+        .paginationStyle{
+            background: #ffffff;
+            padding: 10px 10px;
+            margin: 0px 0px 10px 0px;
+            text-align: right;
+        }
+    </style>
+</head>
+<body>
+<div class="panel-body" id="app">
+
+    <el-row class="buttonPanel">
+        <el-button @click="exportExcel" type="primary" >导出</el-button>
+    </el-row>
+
+    <el-row class="rowPanel"  >
+        <el-form ref="form" :model="form" inline >
+
+            <el-form-item label="操作人" prop="flowType">
+                <el-select v-model="form.opeUserId" placeholder="">
+                    <el-option
+                            v-for="item in userList"
+                            :key="item.suId"
+                            :label="item.suName"
+                            :value="item.suId">
+                    </el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item label="操作功能" prop="flowType">
+                <el-select v-model="form.opeFunction" placeholder="">
+                    <el-option
+                            v-for="item in functionList"
+                            :key="item.value"
+                            :label="item.displayName"
+                            :value="item.value">
+                    </el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item label="操作按钮" prop="flowType">
+                <el-select v-model="form.opeBut" placeholder="">
+                    <el-option
+                            v-for="item in btnList"
+                            :key="item.value"
+                            :label="item.displayName"
+                            :value="item.value">
+                    </el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item label="会员" prop="vipQueryKey">
+                <el-input v-model="form.vipQueryKey" placeholder="请输入会员姓名/编号/手机"></el-input>
+            </el-form-item>
+            <el-form-item label="门店" prop="shopId">
+                <el-select v-model="form.shopId" placeholder="请选择">
+                    <el-option
+                            v-for="item in shopList"
+                            :key="item.shopShortName"
+                            :label="item.shopShortName"
+                            :value="item.id">
+                    </el-option>
+                </el-select>
+            </el-form-item>
+
+            <el-form-item label="订单号" prop="billNo">
+                <el-input v-model="form.billNo"></el-input>
+            </el-form-item>
+            <el-form-item label="IP" prop="ip">
+                <el-input v-model="form.ip"></el-input>
+            </el-form-item>
+
+            <el-form-item label="备注" prop="note">
+                <el-input v-model="form.note"></el-input>
+            </el-form-item>
+
+
+            <el-form-item label="时间" prop="datetimeArr">
+                <el-date-picker
+                        v-model="form.datetimeArr"
+                        type="daterange"
+                        range-separator="至" format="yyyy-MM-dd HH:mm"
+                        start-placeholder="开始日期"
+                        end-placeholder="结束日期">
+                </el-date-picker>
+            </el-form-item>
+
+
+
+
+
+            <el-button type="primary" @click="search" >搜索</el-button>
+            <el-button @click="resetForm('form')">重置</el-button>
+        </el-form>
+    </el-row>
+
+    <el-row class="table-style"  >
+
+        <el-table id="proj" :data="table.rows"  :height="height" stripe @sort-change="sortChange">
+            <el-table-column
+                    prop="shopName"
+                    label="门店"
+                    width="180">
+            </el-table-column>
+            <el-table-column
+                    prop="opeUser"
+                    label="操作用户"
+                    width="240">
+            </el-table-column>
+            <el-table-column
+                    prop="createTime"
+                    sortable="custom"
+                    label="操作时间"
+                    show-overflow-tooltip
+                    width="180">
+            </el-table-column>
+            <el-table-column
+                    prop="opeFunctionLabel"
+                    label="操作功能">
+            </el-table-column>
+            <el-table-column
+                    prop="opeButLabel"
+                    label="操作按钮">
+            </el-table-column>
+            <el-table-column
+                    prop="billNo"
+                    label="单据号">
+            </el-table-column>
+            <el-table-column
+                    prop="vipName"
+                    label="操作会员">
+            </el-table-column>
+            <el-table-column
+                    prop="note"
+                    label="备注">
+            </el-table-column>
+            <el-table-column
+                    prop="ip"
+                    label="IP地址">
+            </el-table-column>
+        </el-table>
+    </el-row>
+    <el-row class="paginationStyle"  >
+        <el-pagination background
+                       @size-change="changePageSize"
+                       @current-change="changeCurrentPage"
+                       :current-page="table.currentPage"
+                       :page-sizes="[10, 20, 30, 50]"
+                       :page-size="table.pageSize"
+                       layout="total, sizes, prev, pager, next, jumper"
+                       :total="table.total">
+        </el-pagination>
+    </el-row>
+
+</div>
+</body>
+<script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/jquery.query.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/layer/layer.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/moment.min.js}"></script>
+<script type="text/javascript" th:inline="javascript">
+
+    var vue = new Vue({
+        el: '#app',
+        data: {
+            table:{
+                rows:[],
+                total:0,
+                pageSize:10,
+                currentPage:1,
+            },
+            form:{
+                name:null,
+                datetimeArr:'',
+                payMethod:'',
+                flowType:'',
+                orderNo:'',
+                oprationMan:'',
+                queryKey:'',
+                shopId:'',
+            },
+            userList: [],
+            height:'calc(100vh - 240px)',
+            functionList:[],
+            btnList:[],
+            shopList:[{id:0,shopShortName:'全部'}],
+        },
+        created: function () {
+            let _this=this;
+            //用户列表
+            AjaxProxy.requst({
+                app: _this,
+                url: basePath + '/admin/allUser',
+                callback: function (data) {
+                    _this.userList = data.rows;
+                }
+            });
+            //获取枚举列表
+            AjaxProxy.requst({
+                app: _this,
+                url: basePath + '/common/data/getEnums',
+                data:{"enumCodes":["operationFunction","operationButton"]},
+                callback: function (data) {
+                    _this.btnList = data.data.operationButton;
+                    _this.functionList = data.data.operationFunction;
+                    _this.form.opeFunction=_this.functionList[0].value;
+                }
+            });
+
+            //加载门店
+            AjaxProxy.requst({
+                app:_this,
+                url:basePath+"/admin/shopInfo/findAll",
+                callback:function (data) {
+                    data.rows.forEach(shop=>{
+                        _this.shopList.push(shop);
+                    });
+                }
+
+            })
+
+            this.loadData();
+            window.addEventListener("keydown", this.keydown);
+        },
+        methods: {
+            changePageSize(val) {
+                this.table.pageSize = val;
+                this.loadData();
+            },
+            changeCurrentPage(val) {
+                this.table.currentPage = val;
+                this.loadData();
+            },
+            resetForm(formName) {
+                this.$refs[formName].resetFields();
+            },
+            sortChange:function (column){
+                if(column.order){
+                    if(column.order.indexOf("desc")){
+                        this.form.order="desc";
+                    }else{
+                        this.form.order="asc";
+                    }
+                    this.form.sort=column.prop;
+                    this.loadData();
+                }
+            },
+            loadData:function(){
+                let _this = this;
+                let data=_this.getRequestParam();
+                data.pageSize=_this.table.pageSize;
+                data.pageNum=_this.table.currentPagey56u;
+                AjaxProxy.requst({
+                    app: _this,
+                    data:data,
+                    url: basePath + '/admin/operation/getOperation',
+                    callback: function (data) {
+                        _this.table.rows = data.rows;
+                        _this.table.total=data.total;
+                    }
+                });
+            },
+            getRequestParam(){
+                let _this = this;
+                let data=   {
+                    shopId:_this.form.shopId,
+                    opeUserId:_this.form.opeUserId,
+                    vipQueryKey:_this.form.vipQueryKey,
+                    opeFunction:_this.form.opeFunction,
+                    opeBut:_this.form.opeBut,
+                    billNo:_this.form.billNo,
+                    ip:_this.form.ip,
+                    note:_this.form.note,
+                    startTime:_this.form.datetimeArr?moment(_this.form.datetimeArr[0]).format("YYYY-MM-DD HH:mm"):'',
+                    endTime:_this.form.datetimeArr?moment(_this.form.datetimeArr[1]).format("YYYY-MM-DD HH:mm"):'',
+                    order:_this.form.order,
+                }
+                console.log(data);
+                return data;
+            },
+            search:function(){
+                this.table.currentPage=1;
+                this.loadData();
+            },
+            keydown(evt){
+                if(evt.keyCode==13) {
+                    this.search();
+                }
+            },
+
+            //导出
+            exportExcel(){
+                window.location.href=basePath+"/admin/operation/exportExcel?"+MTools.jsonToUrlParam(this.getRequestParam());
+            }
+
+        }
+    });
+
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/vip/vipInfo-list.html b/zq-erp/src/main/resources/templates/views/admin/hive/vip/vipInfo-list.html
index 2ad4dad..9d86ad6 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/vip/vipInfo-list.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/vip/vipInfo-list.html
@@ -142,6 +142,7 @@
                 <th data-field="vipState">会员活跃度</th>
                 <th data-field="arrivalWay">到店途径</th>
                 <th data-field="staffName">健康顾问</th>
+                <th data-field="validFlag" data-formatter="miniQuery">小程序查询权限</th>
                 <th data-field="staffName" data-formatter="buildOperation">操作</th>
             </tr>
             </thead>
@@ -174,7 +175,14 @@
     btns[0]="";
     function buildOperation(value, row, index) {
         var html = "";
+        var desc;
+        if (row.validFlag == 1) {
+            desc = "关闭小程序查询权益";
+        } else {
+            desc = "开启小程序查询权益";
+        }
         html += '<a class="text-info" href="javascript:void(0)" onClick="openVipDetail(\''+row.phone+'\')">查看详情</a>&nbsp;&nbsp;'
+        + btns[0].replace("VALUE", row.id).replace("FLAG", row.validFlag).replace("DESC", desc);
         return html;
     }
 
@@ -224,6 +232,14 @@
             }else{
                 return value;
             }
+    }
+
+    function miniQuery(value, row, index) {
+        if(row.validFlag==1){
+            return "已开启"
+        }else{
+            return "已关闭";
+        }
     }
 
 
@@ -407,7 +423,22 @@
         window.location.href=basePath+"/admin/vipInfo/exportExcel?"+param;
     }
 
-</script>
+    function vipInfoValid(id, validFlag) {
+        var desc;
+        if (validFlag == 1) {
+            desc = "确认要关闭小程序查询权益?";
+        } else {
+            desc = "确认要开启小程序查询权益?";
+        }
+        MTools.handleItem(
+            basePath + '/admin/vipInfo/validFlagChange?id=' + id, desc, function () {
+                myGrid.serchData();
+            });
+    }
 
+</script>
+<script matrix:btn="vipInfo-miniQuery">
+    btns[0]='<a class="text-info" href="javascript:void(0)" onClick="vipInfoValid(\'VALUE\', \'FLAG\')" >DESC</a>&nbsp;&nbsp;'
+</script>
 </body>
 </html>

--
Gitblit v1.9.1